USB: Command fails with USBD_STATUS_CANCELLED and windows driver sends task management IU

Veeresh Koninti 0 Reputation points
2024-04-03T09:39:18.5+00:00

On checking the PCAP logs, I see that TestUnitReady, ReadCapacity cmds are sent as part of re-enumeration of the drive. Intermittently, windows driver sends commands without the knowledge of the CVF/test script. One such command is READ16 with LBA=0, SectorCoutn=0x1 which has failed. SecurityProtocolIn cmd request is sent to the device from the test script and before the response is received for any of the individual phases, windows driver has queued TMIU LUN_RESET request. Now, both SecurityProtocolIn and TMIU LUN_RESET have failed with USBD_STATUS_CANCELLED. Again windows driver has sent TMIU IT_Nexus_Reset and this is acknowledged successfully but the response code indicates TASK MANAGEMENT FUNCTION NOT SUPPORTED.

Sequence of last few packets exchanged in PCAP trace:

1. READ16 StatusRequest URB for SenseIU
2. READ16 StatusRequest URB for ReadReadyIU
3. READ16 Request for CmdIU(Tag 2)
4. READ16 Request for CmdIU is acknowledged successfully
5. READ16 StatusRequest for SenseBuffer is acknowledged successfully and below is the senseBuffer of the failure.
		SenseBuffer dump for READ16:
		03 00 00 02 00 00 02 00 00 00 00 00 00 00 00 12 70 00 05 00 00 00 00 0a 00 00 00 00 74 79 00 00 00 00
6. READ16 StatusRequest for ReadReady is acknowledged with USBD_STATUS_CANCELLED
7. SecurityProtocolIn StatusRequest URB for SenseIU
8. SecurityProtocolIn StatusRequest URB for ReadReadyIU
9. SecurityProtocolIn Request for CmdIU(Tag 2)
10. TMIU LunReset ResponseRequest URB for ResponseIU
11. TMIU LunReset Request(Tag 3)
12. SecurityProtocolIn Request for CmdIU is acknowledged with USBD_STATUS_CANCELLED
13. SecurityProtocolIn StatusRequest URB for ReadReady is acknowledged with USBD_STATUS_CANCELLED
14. SecurityProtocolIn StatusRequest URB for SenseBuffer is acknowledged with USBD_STATUS_CANCELLED
15. TMIU LunReset ResponseRequest URB for ResponseIU is acknowledged with USBD_STATUS_CANCELLED
16. TMIU LunReset Request is acknowledged with USBD_STATUS_CANCELLED
17. TMIU IT_Nexus_Reset ResponseRequest URB for ResponseIU
18. TMIU IT_Nexus_Reset Request(Tag 2)
15. TMIU IT_Nexus_Reset Request is acknowledged successfully
16. TMIU IT_Nexus_Reset ResponseRequest URB for ResponseIU is acknowledged successfully and the TMIU Response is as below which indicates TASK MANAGEMENT FUNCTION NOT SUPPORTED.
		ResponseIU dump for IT_Nexus_Reset:
		04 00 00 02 00 00 00 04

Please help with below queries:
a. Does the device respond with USBD_STATUS_CANCELLED status or will it be some underlying layer in USB stack which gives this response?

b. When will windows driver send Task Management IU to the device? Is there any documentation available for windows driver?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,760 questions
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,629 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.