Bug 106931

Summary: ata_scsiop_inq_std() has wrong value for SPC-3 in versions[]
Product: IO/Storage Reporter: Tom Yan (tom.ty89)
Component: Serial ATAAssignee: Tejun Heo (tj)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.2.5 Subsystem:
Regression: No Bisected commit-id:

Description Tom Yan 2015-10-31 03:01:28 UTC
const u8 versions[] = {
		0x00,
		0x60,	/* SAM-3 (no version claimed) */

		0x03,
		0x20,	/* SBC-2 (no version claimed) */

		0x02,
		0x60	/* SPC-3 (no version claimed) */
	};

0260h is the value for SPC-2, which is incorrect according to the comment. Also hdr[] is claiming SPC-3 version compatibility correctly. It should be 0x03,0x00 instead.

[tom@localhost ~]$ sudo sg_inq -d /dev/sda
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  LU_CONG=0  version=0x05  [SPC-3]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=0  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  [BQue=0]
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  [Linked=0]  [TranDis=0]  CmdQue=0
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=96 (0x60)   Peripheral device type: disk
 Vendor identification: ATA     
 Product identification: INTEL SSDSC2BW24
 Product revision level: DC32
 Unit serial number: CVDA339603M02403GN  

  Version descriptors:
    SAM-3 (no version claimed)
    SBC-2 (no version claimed)
    SPC-2 (no version claimed)

You can see a mismatch of SPC version here.
Comment 1 Tom Yan 2016-07-19 11:41:48 UTC
Commit 29a37ea40147 ("
libata-scsi: correct SPC version descriptor") applied to libata/for-4.8