question

Michael-0048 avatar image
0 Votes"
Michael-0048 asked Michael-0048 answered

USB Attached SCSI Mode not selected

I wrote a USB Host Controller driver using the UCX framework (which advertises the static stream capability) however when a UASP capable USB disk is connected to it, Windows chooses USBSTOR mode instead of UASP mode even through the disk descriptors show UASP as supported on interface 0 alt 1 Is there a way to log the Pnp decision tree as to which driver it uses? (I have turned on logman logging for UCX and usb using the busiotools/usb project but that only goes as far as passing the device to the Pnp manager after enumeration and i dont know how to log past that point)

windows-hardware-wdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DoronHolan avatar image
0 Votes"
DoronHolan answered

look in setupapi.dev.log. you may want to crank up setupapi logging to the max if the log doesn't initially have enough information. you would then need to reinstall the driver to get the more verbose logs

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Michael-0048 avatar image
0 Votes"
Michael-0048 answered

Yes i tried that already, but found out that setupapi.dev.log just logs driver installation initially not every time a device is connected. So its not useful unfortunately.

I was hoping there was a way to trace the Pnp Kernel and Userspace Pnp Manager parts to see why its choosing BOT instead of UASP, as im assuming thats where the choice is made. (Or is it made in the USB3HUB object?)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DoronHolan avatar image
0 Votes"
DoronHolan answered

I think after initial enumerating, the BOT/UASP decision is cached. If that is true, you need to uninstall the device and reinstall each time you want to trace what is going on. Capturing USB logs might provide insight. Have you read these two UASP related docs?

https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn642103(v=vs.85)
https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn642113(v=vs.85)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Michael-0048 avatar image
0 Votes"
Michael-0048 answered

Those are 404's :) anyway i think you were referring to this document http://download.microsoft.com/download/3/0/2/3027d574-c433-412a-a8b6-5e0a75d5b237/loading-uasp-driver.docx .

I have found a possible way forward, so attempted to turn on more tracing in the USBHUB3 driver referring to this document https://techcommunity.microsoft.com/t5/microsoft-usb-blog/how-to-include-and-view-wpp-trace-messages-in-a-driver-8217-s/ba-p/270778#Microsoft_Drivers_with_tmf

but alas i cant get symbols for usbhub3.sys using the symchk command for windows 1909 and 20H2 , it always returns no symbols.

I guess the next step is to determine why there are no symbols, especially for windows 1909 i think they should be there its a older build of windows?

Note: searching here, this guy has the identical problem i do regarding symbols https://social.msdn.microsoft.com/Forums/vstudio/en-US/793e7d13-280a-4312-82a6-1be9594c32d3/analyzing-usb-events-in-windows-tracing?forum=windbg and nothing was answered so that was not good :(

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.