diff mbox series

scsi: make minimum cdb size 6 for group codes 6 and 7

Message ID CH3PR10MB7762FE48ED542A0BF7C1B59BFF822@CH3PR10MB7762.namprd10.prod.outlook.com
State New
Headers show
Series scsi: make minimum cdb size 6 for group codes 6 and 7 | expand

Commit Message

Txanton Bejos Aug. 17, 2024, 3:55 a.m. UTC
In Linux 0.99.12, a table of the command size for different CDB group
codes was added with a value of 10 for groups 6 and 7. In the SCSI
specification it is specified that for groups 6 and 7, the length of
the CDB is vendor-specific.

This fixes an issue when sending a CDB of size 6 with a group code of 6
or 7, where libata will respond with DID_ERROR instead of sending the
command because the length is below the value of 10 found in this table.

Signed-off-by: Txanton Bejos <txb2@live.com>
---
 drivers/scsi/scsi_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 5f36bd89a9948ae23571f9ffd122d7de1ced73e0
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_common.c b/drivers/scsi/scsi_common.c
index 04749fde1636..b482c8732f75 100644
--- a/drivers/scsi/scsi_common.c
+++ b/drivers/scsi/scsi_common.c
@@ -17,7 +17,7 @@  MODULE_LICENSE("GPL v2");
 
 /* Command group 3 is reserved and should never be used.  */
 const unsigned char scsi_command_size_tbl[8] = {
-	6, 10, 10, 12, 16, 12, 10, 10
+	6, 10, 10, 12, 16, 12, 6, 6
 };
 EXPORT_SYMBOL(scsi_command_size_tbl);