Windows driver framework(WDF): USB3 host stops consuming data for SCSI Read16 commands in UAS mode
I have an inhouse developed WDF based driver which can run USB SCSI commands in UAS mode in USB3 speed.
Scenario:
The test script queues multiple Read16 SCSI commands to the USB device and the execution runs for approx. 1hr 45min without any issues. Post that at some point, 30 SCSI Read16 commands are pending to be completed by the device with tags assigned from 1 to 30 to the CommandIUs. Among these commands, there was a request for Tag=7 queued for status, data and command phase to the device.
Below table summarizes wireshark traces captured for CommandIU with Tag=7
30s is the timeout set for each phase of command(Command request, Data request and Status Request).
Among the pending commands, some commands had data transfer phase in progress but not completed and for some pending commands data transfer was not yet started but the command request was acknowledged successfully by the device.
As we can notice from the above table, one status request was acknowledged twice. First status response acknowledgement was with USBD_Status=USBD_STATUS_SUCCESSFUL even before data transfer started for the command and second status response acknowledgement was with USBD_Status=USBD_STATUS_CANCELLED.
Once the second acknowledgement was received by the host for Tag=7, all pending commands from Tag=1 to 30 which were pending for completion fail with USBD_STATUS_CANCELLED status.
My driver has no role in cancelling the commands. It just receives the callbacks registered for each phase of the command with USBD_STATUS_CANCELLED status from wdf framework.
Queries:
- Why did all pending commands gets cancelled?
- Is there any possibility of lower level USB stack that cancels the requests?
- Any possible ways to capture lower level driver traces which is not in control of my driver?