From bb16998a24692792cdd527f165d7e91d24a9d762 Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Sat, 30 May 2026 01:12:41 -0400 Subject: [PATCH] mtd: spi-nor: call schedule() in read loop to service watchdog The erase and write loops already call schedule() to prevent watchdog starvation, but spi_nor_read() had no equivalent. During 'sf update', if the target region matches the source (no erase/write needed), only reads occur and the watchdog is never serviced, causing a reset on large flash operations. Signed-off-by: Jie Zhang --- drivers/mtd/spi/spi-nor-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 76c33b243682..a270af9a88fc 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -1605,6 +1605,7 @@ static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len, } while (len) { + schedule(); read_len = len; offset = from;