summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@kernel.org>2026-10-13 11:42:53 +0200
committerMartin K. Petersen (Oracle) <mkp@kernel.org>2026-10-28 21:12:00 -0400
commit9a2690eb4bbea8d7fbc3dfe478fca75fe956abb4 (patch)
tree0b12d8475605fe785d8af64a21429d42935c84b6 /drivers
parent3650bb41391b51d9dcf87b0480ecafeb1526252f (diff)
scsi: aic7xxx: Fix REQUEST SENSE allocation length on big-endian hosts
The REQUEST SENSE length was taken from sg->len after the AHC_DMA_LAST_SEG flag was or-ed in and the value converted to little-endian, so the 8-bit field is 0x80 on big-endian hosts and the target is asked for 128 bytes into a 32-byte buffer. Use the buffer size, as aic79xx does. On an SGI O2 with a Fujitsu MAX3147NC, the sense data of its CHECK CONDITIONs during probe was lost. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Imre Kaloz <kaloz@kernel.org> Link: https://patch.msgid.link/20261013094253.2956-1-kaloz@kernel.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index b9761f9f0bbc..db330ca92767 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -1097,7 +1097,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
sc->byte2 = SCB_GET_LUN(scb) << 5;
sc->unused[0] = 0;
sc->unused[1] = 0;
- sc->length = sg->len;
+ sc->length = ahc_get_sense_bufsize(ahc, scb);
sc->control = 0;
/*