public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Md Sadre Alam <quic_mdalam@quicinc.com>
Cc: mani@kernel.org, richard@nod.at, vigneshr@ti.com,
	linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_srichara@quicinc.com
Subject: Re: [PATCH 1/3] mtd: rawnand: qcom: Update read_loc size to 512
Date: Fri, 18 Aug 2023 21:59:08 +0200	[thread overview]
Message-ID: <20230818215908.0e60b00b@xps-13> (raw)
In-Reply-To: <20230818145101.23825-2-quic_mdalam@quicinc.com>

Hi Md,

quic_mdalam@quicinc.com wrote on Fri, 18 Aug 2023 20:20:59 +0530:

> For parameter page read upper layer is passing len
> as 256 bytes and if we try to configure 256 bytes
> size in read loaction register then subsequent bam
> transaction is getting timed out for 4K nand devices.
> So update this length as one step size if its
> less than NANDC_STEP_SIZE.
> 
> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>

I'm fine with patches 2 and 3 and will take them. But this one does not
seem legitimate. I don't like it. Are you sure the ECC engine was not
enabled when it timed out? Default should be having the ECC disabled
and it should just get enabled when you need it. There is no reason
why, specifically on NAND devices, it would not be possible to read 256
bytes.

> ---
>  drivers/mtd/nand/raw/qcom_nandc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
> index d4ba0d04c970..413e214c8e87 100644
> --- a/drivers/mtd/nand/raw/qcom_nandc.c
> +++ b/drivers/mtd/nand/raw/qcom_nandc.c
> @@ -2885,6 +2885,9 @@ static int qcom_param_page_type_exec(struct nand_chip *chip,  const struct nand_
>  	op_id = q_op.data_instr_idx;
>  	len = nand_subop_get_data_len(subop, op_id);
>  
> +	if (len < NANDC_STEP_SIZE)
> +		len = NANDC_STEP_SIZE;
> +
>  	nandc_set_read_loc(chip, 0, 0, 0, len, 1);
>  
>  	if (!nandc->props->qpic_v2) {


Thanks,
Miquèl

  reply	other threads:[~2023-08-18 20:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 14:50 [PATCH 0/3]mtd: rawnand: qcom: Fixes for exec_op Md Sadre Alam
2023-08-18 14:50 ` [PATCH 1/3] mtd: rawnand: qcom: Update read_loc size to 512 Md Sadre Alam
2023-08-18 19:59   ` Miquel Raynal [this message]
2023-08-21  5:30     ` Md Sadre Alam
2023-08-18 14:51 ` [PATCH 2/3] mtd: rawnand: qcom: Clear buf_count and buf_start in raw read Md Sadre Alam
2023-08-18 20:02   ` Miquel Raynal
2023-08-18 14:51 ` [PATCH 3/3] mtd: rawnand: qcom: Add read/read_start ops in exec_op path Md Sadre Alam
2023-08-18 20:02   ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230818215908.0e60b00b@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mani@kernel.org \
    --cc=quic_mdalam@quicinc.com \
    --cc=quic_srichara@quicinc.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox