Details
-
Bug
-
Resolution: Fixed
-
Major
Description
Created an attachment (id=8072)
Implement generic USBSTOR_SendUnknownRequest and use it for SCSIOP_MECHANISM_STATUS
My USB3 hard disk "Toshiba STOR.E ALU 2S" provides a virtual CD drive with documentation on it.
Attaching this to ROS leads to a debug break in USBSTOR_HandleExecuteSCSI due to the unimplemented operation code 0xBD (SCSIOP_MECHANISM_STATUS) – which is sent by cdrom.sys's IsThisAnAtapiChanger.
I'm not quite sure why USBStor has to explicitly handle every SRB, as it seems to me that they can just be sent to the device.
Linux's usb_stor_Bulk_transport (drivers/usb/storage/transport.c) seems to support this theory, as it simply does:
memcpy(bcb->CDB, srb->cmnd, bcb->Length);
I've implemented a generic handler to that effect (-> attached patch).
But that results in STATUS_INFO_LENGTH_MISMATCH apparently (see comment 1), and I don't really know what I'm doing anyway.
I might try with an actual CD drive later to see if it behaves the same.