U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Caleb Connolly <caleb.connolly@linaro.org>,
	Tom Rini <trini@konsulko.com>
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	u-boot@lists.denx.de, u-boot-qcom@groups.io
Subject: Re: [PATCH 1/3] scsi: fix typo in setup_read_ext()
Date: Tue, 25 Mar 2025 14:25:03 +0100	[thread overview]
Message-ID: <a3c1663f-ffec-4015-8ed7-ebdfe169aec7@linaro.org> (raw)
In-Reply-To: <20250325-scsi-sync-on-write-v1-1-3575aa1342e0@linaro.org>

On 25/03/2025 14:02, Caleb Connolly wrote:
> This clears the 6th byte of cmd twice rather than setting the 9th byte
> to 0. Fix it.
> 
> The only other command that sets the 9th byte is the 64-bit read, so
> this likely never caused issues in practise.
> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>   drivers/scsi/scsi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
> index cd0b84c062252118d250b9305728e03f61736600..34ac47c03ab397ca999abf130d84ccbd3be4c419 100644
> --- a/drivers/scsi/scsi.c
> +++ b/drivers/scsi/scsi.c
> @@ -89,9 +89,9 @@ static void scsi_setup_read_ext(struct scsi_cmd *pccb, lbaint_t start,
>   	pccb->cmd[5] = (unsigned char)start & 0xff;
>   	pccb->cmd[6] = 0;
>   	pccb->cmd[7] = (unsigned char)(blocks >> 8) & 0xff;
>   	pccb->cmd[8] = (unsigned char)blocks & 0xff;
> -	pccb->cmd[6] = 0;
> +	pccb->cmd[9] = 0;
>   	pccb->cmdlen = 10;
>   	pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */
>   	debug("scsi_setup_read_ext: cmd: %02X %02X startblk %02X%02X%02X%02X blccnt %02X%02X\n",
>   	      pccb->cmd[0], pccb->cmd[1],
> 

Good catch


Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

  reply	other threads:[~2025-03-25 13:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 13:02 [PATCH 0/3] scsi: ensure writes are flushed to disk Caleb Connolly
2025-03-25 13:02 ` [PATCH 1/3] scsi: fix typo in setup_read_ext() Caleb Connolly
2025-03-25 13:25   ` Neil Armstrong [this message]
2025-03-25 13:02 ` [PATCH 2/3] scsi: de-dup calls to scsi_setup_write_ext() Caleb Connolly
2025-03-25 13:38   ` Neil Armstrong
2025-03-25 13:45     ` Caleb Connolly
2025-03-25 13:02 ` [PATCH 3/3] scsi: sync cache on write Caleb Connolly
2025-03-25 13:33   ` Neil Armstrong
2025-03-25 13:49     ` Caleb Connolly
2025-03-25 15:18       ` neil.armstrong
2025-03-25 17:57         ` Caleb Connolly

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=a3c1663f-ffec-4015-8ed7-ebdfe169aec7@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=caleb.connolly@linaro.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=quentin.schulz@cherry.de \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.denx.de \
    /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