forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork1
Commit47b7de2
mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs
It was found that in IDMAC mode after soft-reset driver switchesto PIO mode.That's what happens in case of DTO timeout overflow calculation failure:1. soft-reset is called2. driver restarts dma3. descriptors states are checked, one of descriptor is owned by the IDMAC.4. driver can't use DMA and then switches to PIO mode.Failure was already fixed in:https://www.spinics.net/lists/linux-mmc/msg48125.html.Behaviour while soft-reset is not something we except oreven want to happen. So we switch from dw_mci_idmac_resetto dw_mci_idmac_init, so descriptors are cleaned before starting dma.And while at it explicitly zero des0 which otherwise mightcontain garbage as being allocated by dmam_alloc_coherent().Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>Cc: Jaehoon Chung <jh80.chung@samsung.com>Cc: Ulf Hansson <ulf.hansson@linaro.org>Cc: Andy Shevchenko <andy.shevchenko@gmail.com>Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>Cc: Shawn Lin <shawn.lin@rock-chips.com>Cc: Alexey Brodkin <abrodkin@synopsys.com>Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>Cc: linux-snps-arc@lists.infradead.orgCc: <stable@vger.kernel.org> # 4.4+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>1 parentc658dc5 commit47b7de2
1 file changed
+4
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
564 | 564 |
| |
565 | 565 |
| |
566 | 566 |
| |
| 567 | + | |
567 | 568 |
| |
568 | 569 |
| |
569 | 570 |
| |
| |||
586 | 587 |
| |
587 | 588 |
| |
588 | 589 |
| |
| 590 | + | |
589 | 591 |
| |
590 | 592 |
| |
591 | 593 |
| |
| |||
1801 | 1803 |
| |
1802 | 1804 |
| |
1803 | 1805 |
| |
1804 |
| - | |
1805 |
| - | |
| 1806 | + | |
| 1807 | + | |
1806 | 1808 |
| |
1807 | 1809 |
| |
1808 | 1810 |
| |
|
0 commit comments
Comments
(0)