BlueSCSI / BlueSCSI-v2

Open source, open hardware, SCSI emulator using the Pi Pico PR2040
https://bluescsi.com
GNU General Public License v3.0
237 stars 25 forks source link

Inquiry data truncated #152

Closed nielsmh closed 1 week ago

nielsmh commented 4 months ago

Responses to standard (non-EVPD) Inquiry commands are truncated at 31 "additional data" bytes, meaning that the vendor-specific information (such as firmware revision) gets truncated, though the truncation might be happening in the ASPI driver on PC.

https://github.com/BlueSCSI/BlueSCSI-v2/blob/19633f4fc952ec90c7ccf8666947e09b34c6bab0/lib/SCSI2SD/src/firmware/inquiry.c#L32

The additional data size field (index 4) should probably be updated somewhere before s2s_getStandardInquiry returns: https://github.com/BlueSCSI/BlueSCSI-v2/blob/19633f4fc952ec90c7ccf8666947e09b34c6bab0/lib/SCSI2SD/src/firmware/inquiry.c#L270-L276

Additionally, the data in the PLATFORM_INQUIRY constant (that I currently can't read with software) seems to be 24 bytes long, but the Vendor-Specific field at offset 36 it gets written to is only specified to be 20 bytes long, meaning this code writes into reserved space as well.