Hi All,
I am in the process of designing a driver for a USB device. Without going
into specifics, the device is a tester board for various kind of storage.
The requirement is such that the USB device should show up as a Mass Storage
Device, should be able to service SCSI_PASS_THROUGH commands and also expose
a private interface (IOCTL based) for user apps.
However the actual device doesn’t comply to the USB Mass Storage Device
Specs, hence can’t use in-box driver for mass storage class (usbstor.sys).
I have been thinking of two alternative architectures:
-
Write two drivers: One that is part of the USB stack and loads as a
function driver for the USB device enumerated by the USB bus, and another
one that communicates with the storage stack (scsi miniport?). The driver
that is in the storage stack will intercept the SRBs and convert those into
commands that the device actually understands and hand over the same to the
driver that is part of the USB stack for it to actually put on the USB.
Q: Do I have to write a miniport driver for scsiport or storport if
the device need to support the SCSI_PASS_THROUGH capabilities or is there
another way??? -
Write a lower filter to usbstor.sys that can hide the incompatibilities
of the device.
Q. Will SCSI_PASS_THROUGH commands reach the filter in this case???
Q. Can the filter driver expose a private interface to the user
applications???
Any inputs would be greatly appreciated.
TIA,
Bandeep