Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCSI inquiry length is 37, should be 36 #14

Open
dpgeorge opened this issue Mar 1, 2022 · 2 comments
Open

SCSI inquiry length is 37, should be 36 #14

dpgeorge opened this issue Mar 1, 2022 · 2 comments

Comments

@dpgeorge
Copy link

dpgeorge commented Mar 1, 2022

With the RP2040 in bootloader mode, one gets:

$ sg_inq --only /dev/sdb
standard INQUIRY:
  PQual=0  PDT=0  RMB=1  LU_CONG=0  hot_pluggable=0  version=0x02  [SCSI-2]
  [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
    length=37 (0x25), but only fetched 36 bytes   Peripheral device type: disk
 Vendor identification: RPI     
 Product identification: RP2             
 Product revision level: 2   

Note that the length=37 but it should be 36.

The issue is this line: https://github.com/raspberrypi/pico-bootrom/blob/master/usb_device_tiny/scsi_ir.h#L32
The - 4 should be a - 5.

Originally discussed here: hathach/tinyusb#1349

@kilograham
Copy link
Contributor

interesting - i guess the TinyUSB bug was different (there was no shared lineage there)

Note this does not make the USB IF MSC tests complain!

@dpgeorge
Copy link
Author

dpgeorge commented Mar 1, 2022

i guess the TinyUSB bug was different (there was no shared lineage there)

I think the USB spec is a bit hard to understand on what value to put in the additional length field. See discussion on the linked TinyUSB issue above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants