All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: sh_mmcif: fix error handling
@ 2026-12-02 15:23 Arnd Bergmann
  2026-12-02 15:23 ` [PATCH 2/2] mmc: convert sg_miter user to SG_MITER_LOCAL Arnd Bergmann
  2026-12-02 19:57 ` [PATCH 1/2] mmc: sh_mmcif: fix error handling Wolfram Sang
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2026-12-02 15:23 UTC (permalink / raw)
  To: Ulf Hansson, Linus Walleij, Arnd Bergmann
  Cc: Geert Uytterhoeven, Wolfram Sang, Frank Li, Runyu Xiao,
	Matthew Wilcox (Oracle), Samarth Narang, Pan Chuang, linux-mmc

From: Arnd Bergmann <arnd@arndb.de>

My earlier patch introduced a bug in the error handling code,
as Sashiko-bot reported.

Fix this by only resetting the number of bytes transferred
if a request has a 'data' member.

Cc: Linus Walleij <linusw@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Fixes: d372d206e6e0 ("mmc: sh_mmcif: rework sg_miter handling")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
If possible, please fold this into the earlier patch, otherwise
this can go on top.
---
 drivers/mmc/host/sh_mmcif.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index c6033c6596e0..9850d2ae6f16 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1388,7 +1388,8 @@ static void sh_mmcif_timeout_work(struct work_struct *work)
 		BUG();
 	}
 
-	mrq->data->bytes_xfered = 0;
+	if (mrq->data)
+		mrq->data->bytes_xfered = 0;
 	host->state = STATE_IDLE;
 	host->wait_for = MMCIF_WAIT_FOR_REQUEST;
 	host->mrq = NULL;
-- 
2.53.0


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

end of thread, other threads:[~2026-12-02 19:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 15:23 [PATCH 1/2] mmc: sh_mmcif: fix error handling Arnd Bergmann
2026-12-02 15:23 ` [PATCH 2/2] mmc: convert sg_miter user to SG_MITER_LOCAL Arnd Bergmann
2026-12-02 15:30   ` sashiko-bot
2026-12-02 15:46     ` Arnd Bergmann
2026-12-02 19:57 ` [PATCH 1/2] mmc: sh_mmcif: fix error handling Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.