public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] mmc: dw_mmc: Stop bounce buffer even in case of failure
@ 2015-07-27 20:39 Marek Vasut
  2015-07-27 20:39 ` [U-Boot] [PATCH 2/4] mmc: dw_mmc: Zap endless timeout Marek Vasut
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Marek Vasut @ 2015-07-27 20:39 UTC (permalink / raw)
  To: u-boot

The driver didn't stop the bounce buffer in case a data transfer
failed. This would lead to memory leakage if the communication
between the CPU and the card is unreliable. Add the missing call
to stop the bounce buffer.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
---
 drivers/mmc/dw_mmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 53a8aca..3fffa71 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -215,6 +215,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
 			mask = dwmci_readl(host, DWMCI_RINTSTS);
 			if (mask & (DWMCI_DATA_ERR | DWMCI_DATA_TOUT)) {
 				printf("%s: DATA ERROR!\n", __func__);
+				bounce_buffer_stop(&bbstate);
 				return -1;
 			}
 		} while (!(mask & DWMCI_INTMSK_DTO));
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-09-12 16:17 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 20:39 [U-Boot] [PATCH 1/4] mmc: dw_mmc: Stop bounce buffer even in case of failure Marek Vasut
2015-07-27 20:39 ` [U-Boot] [PATCH 2/4] mmc: dw_mmc: Zap endless timeout Marek Vasut
2015-08-12  7:26   ` Pantelis Antoniou
2015-09-11  7:59   ` Alexey Brodkin
2015-09-11 11:49     ` Marek Vasut
2015-09-11 17:04       ` Alexey Brodkin
2015-09-12 16:17         ` Marek Vasut
2015-07-27 20:39 ` [U-Boot] [PATCH 3/4] mmc: dw_mmc: Improve handling of data transfer failure Marek Vasut
2015-08-12  7:27   ` Pantelis Antoniou
2015-07-27 20:39 ` [U-Boot] [PATCH 4/4] mmc: dw_mmc: Probe the MMC from OF Marek Vasut
2015-08-12  7:35   ` Pantelis Antoniou
2015-08-12 20:43     ` [U-Boot] [PATCH V2 " Marek Vasut
2015-08-19 21:58       ` Marek Vasut
2015-08-19 22:55         ` Pantelis Antoniou
2015-08-19 22:57           ` Marek Vasut
2015-08-12 20:43     ` [U-Boot] [PATCH " Marek Vasut
2015-08-12  7:25 ` [U-Boot] [PATCH 1/4] mmc: dw_mmc: Stop bounce buffer even in case of failure Pantelis Antoniou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox