public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations
@ 2025-12-08  9:14 Haibo Chen
  2025-12-12  7:20 ` Pratyush Yadav
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Haibo Chen @ 2025-12-08  9:14 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra
  Cc: Pratyush Yadav, linux-mtd, linux-kernel, imx, Haibo Chen

When check read operation, need to setting the op.dummy.nbytes based
on current read operation rather than the nor->read_proto.

Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 drivers/mtd/spi-nor/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index d3f8a78efd3bf9032b807e81b7a8b77556367e71..09312300108e4ac4307934a983e74a5510f3e844 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2393,7 +2393,7 @@ static int spi_nor_spimem_check_readop(struct spi_nor *nor,
 	/* convert the dummy cycles to the number of bytes */
 	op.dummy.nbytes = (read->num_mode_clocks + read->num_wait_states) *
 			  op.dummy.buswidth / 8;
-	if (spi_nor_protocol_is_dtr(nor->read_proto))
+	if (spi_nor_protocol_is_dtr(read->proto))
 		op.dummy.nbytes *= 2;
 
 	return spi_nor_spimem_check_op(nor, &op);

---
base-commit: 82bcd04d124a4d84580ea4a8ba6b120db5f512e7
change-id: 20251208-spi-nor-5f4dd001f7e1

Best regards,
-- 
Haibo Chen <haibo.chen@nxp.com>


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

* Re: [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations
  2025-12-08  9:14 [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations Haibo Chen
@ 2025-12-12  7:20 ` Pratyush Yadav
  2026-01-29  1:56 ` Bough Chen
  2026-03-13 10:43 ` Pratyush Yadav
  2 siblings, 0 replies; 5+ messages in thread
From: Pratyush Yadav @ 2025-12-12  7:20 UTC (permalink / raw)
  To: Haibo Chen
  Cc: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Pratyush Yadav,
	linux-mtd, linux-kernel, imx

On Mon, Dec 08 2025, Haibo Chen wrote:

> When check read operation, need to setting the op.dummy.nbytes based
> on current read operation rather than the nor->read_proto.
>
> Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol")
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

Reviewed-by: Pratyush Yadav <pratyush@kernel.org>

[...]

-- 
Regards,
Pratyush Yadav

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

* RE: [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations
  2025-12-08  9:14 [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations Haibo Chen
  2025-12-12  7:20 ` Pratyush Yadav
@ 2026-01-29  1:56 ` Bough Chen
  2026-01-30 16:43   ` Pratyush Yadav
  2026-03-13 10:43 ` Pratyush Yadav
  2 siblings, 1 reply; 5+ messages in thread
From: Bough Chen @ 2026-01-29  1:56 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra
  Cc: Pratyush Yadav, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev

Gentle ping...

> -----Original Message-----
> From: Bough Chen <haibo.chen@nxp.com>
> Sent: 2025年12月8日 17:14
> To: Tudor Ambarus <tudor.ambarus@linaro.org>; Pratyush Yadav
> <pratyush@kernel.org>; Michael Walle <mwalle@kernel.org>; Miquel Raynal
> <miquel.raynal@bootlin.com>; Richard Weinberger <richard@nod.at>; Vignesh
> Raghavendra <vigneshr@ti.com>
> Cc: Pratyush Yadav <p.yadav@ti.com>; linux-mtd@lists.infradead.org;
> linux-kernel@vger.kernel.org; imx@lists.linux.dev; Bough Chen
> <haibo.chen@nxp.com>
> Subject: [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check
> read operations
> 
> When check read operation, need to setting the op.dummy.nbytes based on
> current read operation rather than the nor->read_proto.
> 
> Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol")
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
>  drivers/mtd/spi-nor/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index
> d3f8a78efd3bf9032b807e81b7a8b77556367e71..09312300108e4ac4307934a9
> 83e74a5510f3e844 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -2393,7 +2393,7 @@ static int spi_nor_spimem_check_readop(struct
> spi_nor *nor,
>  	/* convert the dummy cycles to the number of bytes */
>  	op.dummy.nbytes = (read->num_mode_clocks + read->num_wait_states) *
>  			  op.dummy.buswidth / 8;
> -	if (spi_nor_protocol_is_dtr(nor->read_proto))
> +	if (spi_nor_protocol_is_dtr(read->proto))
>  		op.dummy.nbytes *= 2;
> 
>  	return spi_nor_spimem_check_op(nor, &op);
> 
> ---
> base-commit: 82bcd04d124a4d84580ea4a8ba6b120db5f512e7
> change-id: 20251208-spi-nor-5f4dd001f7e1
> 
> Best regards,
> --
> Haibo Chen <haibo.chen@nxp.com>


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

* Re: [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations
  2026-01-29  1:56 ` Bough Chen
@ 2026-01-30 16:43   ` Pratyush Yadav
  0 siblings, 0 replies; 5+ messages in thread
From: Pratyush Yadav @ 2026-01-30 16:43 UTC (permalink / raw)
  To: Bough Chen
  Cc: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Pratyush Yadav,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	imx@lists.linux.dev

Hi,

On Thu, Jan 29 2026, Bough Chen wrote:

> Gentle ping...

Sorry, this cycle I was really busy with some other things, so I didn't
get a chance to queue any content for this cycle. I will start queueing
patches once the merge window for the next kernel closes.

>
>> -----Original Message-----
>> From: Bough Chen <haibo.chen@nxp.com>
>> Sent: 2025年12月8日 17:14
>> To: Tudor Ambarus <tudor.ambarus@linaro.org>; Pratyush Yadav
>> <pratyush@kernel.org>; Michael Walle <mwalle@kernel.org>; Miquel Raynal
>> <miquel.raynal@bootlin.com>; Richard Weinberger <richard@nod.at>; Vignesh
>> Raghavendra <vigneshr@ti.com>
>> Cc: Pratyush Yadav <p.yadav@ti.com>; linux-mtd@lists.infradead.org;
>> linux-kernel@vger.kernel.org; imx@lists.linux.dev; Bough Chen
>> <haibo.chen@nxp.com>
>> Subject: [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check
>> read operations
>> 
>> When check read operation, need to setting the op.dummy.nbytes based on
>> current read operation rather than the nor->read_proto.
>> 
>> Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol")
>> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
[...]

-- 
Regards,
Pratyush Yadav

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

* Re: [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations
  2025-12-08  9:14 [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations Haibo Chen
  2025-12-12  7:20 ` Pratyush Yadav
  2026-01-29  1:56 ` Bough Chen
@ 2026-03-13 10:43 ` Pratyush Yadav
  2 siblings, 0 replies; 5+ messages in thread
From: Pratyush Yadav @ 2026-03-13 10:43 UTC (permalink / raw)
  To: Haibo Chen
  Cc: Tudor Ambarus, Pratyush Yadav, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Pratyush Yadav,
	linux-mtd, linux-kernel, imx

On Mon, Dec 08 2025, Haibo Chen wrote:

> When check read operation, need to setting the op.dummy.nbytes based
> on current read operation rather than the nor->read_proto.
>
> Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol")
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

Applied to spi-nor/next. Thanks.

[...]

-- 
Regards,
Pratyush Yadav

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

end of thread, other threads:[~2026-03-13 10:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-08  9:14 [PATCH] mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations Haibo Chen
2025-12-12  7:20 ` Pratyush Yadav
2026-01-29  1:56 ` Bough Chen
2026-01-30 16:43   ` Pratyush Yadav
2026-03-13 10:43 ` Pratyush Yadav

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