diff options
author | Matt Wang <wwentao@vmware.com> | 2021-05-11 05:04:37 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-05-15 04:19:04 +0200 |
commit | 56f396146af278135c0ff958c79b5ee1bd22453d (patch) | |
tree | 001a7397df73064734000111daf2f395bf1c0d55 /drivers/scsi/BusLogic.h | |
parent | scsi: ufs: ufs-mediatek: Fix power down spec violation (diff) | |
download | linux-56f396146af278135c0ff958c79b5ee1bd22453d.tar.xz linux-56f396146af278135c0ff958c79b5ee1bd22453d.zip |
scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic
Commit 391e2f25601e ("[SCSI] BusLogic: Port driver to 64-bit")
introduced a serious issue for 64-bit systems. With this commit,
64-bit kernel will enumerate 8*15 non-existing disks. This is caused
by the broken CCB structure. The change from u32 data to void *data
increased CCB length on 64-bit system, which introduced an extra 4
byte offset of the CDB. This leads to incorrect response to INQUIRY
commands during enumeration.
Fix disk enumeration failure by reverting the portion of the commit
above which switched the data pointer from u32 to void.
Link: https://lore.kernel.org/r/C325637F-1166-4340-8F0F-3BCCD59D4D54@vmware.com
Acked-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: Matt Wang <wwentao@vmware.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/BusLogic.h')
-rw-r--r-- | drivers/scsi/BusLogic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h index a8e4a19788a7..7d1ec10f2430 100644 --- a/drivers/scsi/BusLogic.h +++ b/drivers/scsi/BusLogic.h @@ -806,7 +806,7 @@ struct blogic_ccb { unsigned char cdblen; /* Byte 2 */ unsigned char sense_datalen; /* Byte 3 */ u32 datalen; /* Bytes 4-7 */ - void *data; /* Bytes 8-11 */ + u32 data; /* Bytes 8-11 */ unsigned char:8; /* Byte 12 */ unsigned char:8; /* Byte 13 */ enum blogic_adapter_status adapter_status; /* Byte 14 */ |