scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic
authorMatt Wang <wwentao@vmware.com>
Tue, 11 May 2021 03:04:37 +0000 (03:04 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 15 May 2021 02:19:04 +0000 (22:19 -0400)
commit56f396146af278135c0ff958c79b5ee1bd22453d
tree001a7397df73064734000111daf2f395bf1c0d55
parentc625b80b9d00f3546722cd77527f9697c8c4c911
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>
drivers/scsi/BusLogic.c
drivers/scsi/BusLogic.h