]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
scsi: fix typo in setup_read_ext()
authorCaleb Connolly <caleb.connolly@linaro.org>
Wed, 26 Mar 2025 12:24:08 +0000 (13:24 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 10 Apr 2025 20:21:41 +0000 (14:21 -0600)
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>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
drivers/scsi/scsi.c

index cd0b84c062252118d250b9305728e03f61736600..34ac47c03ab397ca999abf130d84ccbd3be4c419 100644 (file)
@@ -90,7 +90,7 @@ static void scsi_setup_read_ext(struct scsi_cmd *pccb, lbaint_t start,
        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",