[3.2.3] A3000 scsi.device and SCSI reads where result is not a multiple of four bytes.

Post Reply
dlundqvist
Posts: 3
Joined: Sat Jan 17, 2026 4:51 pm

[3.2.3] A3000 scsi.device and SCSI reads where result is not a multiple of four bytes.

Post by dlundqvist »

I'm developing a utility to communicate with SCSI emulators such as BlueSCSI, using their Toolbox API to switch CD:s and so on. This utility is using HD_SCSICMD from scsi.device to send vendor specific commands to the SCSI emulator. While adding support for the WiFi commands I noticed that I was not getting back expected data. After a bit of troubleshooting I discovered that if response size is not a multiple of four bytes, the rest bytes are not written to the buffer specified in SCSICmd::scsi_Data. In this instance result is only one byte, and my buffer did not contain correct value in the first byte. This is easily reproducible for any result size that is not divisible by four, only data up highest multiple offset of four contain correct data. SCSICmd::scsi_Actual does contain the correct value as the number of bytes sent by the device, so it seems that scsi.device have in some way understood how many bytes the response are. For this vendor specific command I'm reading from the device so SCSICmd::scsi_Flags contains SCSIF_READ.

Is this a "known" issue that A3000 scsi.device have this limitation? I could not find anything in AutoDocs mentioning this particular situation. Or is the problem somewhere else?
Post Reply