Understanding the USB 3.0 Drivers USB 3.0 Driver Stack Client Drivers Client Drivers Client Drivers USBCCGP WINUSB Legend USBHUB3 (USB 3.0 Hub Driver) UCX (Host Controller Extension Driver) Hardware Existing USB.

Download Report

Transcript Understanding the USB 3.0 Drivers USB 3.0 Driver Stack Client Drivers Client Drivers Client Drivers USBCCGP WINUSB Legend USBHUB3 (USB 3.0 Hub Driver) UCX (Host Controller Extension Driver) Hardware Existing USB.

Understanding the USB
3.0 Drivers
USB 3.0 Driver Stack
Client Drivers
Client Drivers
Client Drivers
USBCCGP
WINUSB
Legend
USBHUB3 (USB 3.0 Hub Driver)
UCX (Host Controller Extension Driver)
Hardware
Existing USB Stack
Components
USB 3.0 Stack
Components
Class or Vendor
Drivers
USBXHCI (xHCI Driver)
xHCI Host Controller and Root Hub
• Diagnose USB driver issues faster by examining USB controller
and device state with the USB 3.0 Kernel Debug Extension
• Troubleshoot USB device issues more easily by analyzing
recent USB interactions using USB WPP and Event Tracing
• Leverage USB domain knowledge to reduce ramp up time
with these tools
0
1
Doorbell Array
(256 Doorbell
Registers)
255
0
1
2
256 Device Context
Base Address Array
255
Command Ring
TRB
Event Ring
TRB
0
1
Slot Context
Device Context
31
0
1
EndPoint
Context
Dequeue
Enqueue
Device Context
EndPoint
Context
31
Dequeue
Enqueue
TRB
TRB
TRB
Data
Data
Data
Transfer Ring
TRB
TRB
TRB
TRB
TRB
TRB – Transfer Request Block
TD – Transfer Descriptor
TD
TD
T
R
A
N
S
F
E
R
Debugging USB 3.0
HUB
!usb_tree <optional 1> or !hub_tree
!hub_info <DeviceExtension>
!hub_info_from_fdo <DeviceObject>
!device_info <DEVICE_CONTEXT>
!device_info_from_pdo <DeviceObject>
!port_info <PORT_CONTEXT>
Controller Extension
!ucx_controller_list
!ucx_controller <UCXCONTROLLER_PRIVCONTEXT>
!ucx_device <UCXUSBDEVICE_PRIVCONTEXT>
!ucx_endpoint <UCXENDPOINT_PRIVCONTEXT>
Controller
!xhci_dumpall <1>
!xhci_capability <DeviceExtension>
!xhci_commandring <DeviceExtension>
!xhci_deviceslots <DeviceExtension>
!xhci_eventring <DeviceExtension>
!xhci_registers <DeviceExtension>
!xhci_resourceusage <DeviceExtension>
!xhci_trb <trb_address> <count>
!xhci_transferring <transferring_address>
Misc
!usbdstatus <URB_STATUS>
!urb <UrbAddress>
!xhci_dumpall
!usb_tree
!ucx_controller_list
• Diagnose USB driver issues faster by examining USB controller
and device state with the USB 3.0 Kernel Debug Extension
• Troubleshoot USB device and host issues more easily by
analyzing recent USB interactions using USB WPP Recorder
logs
• Leverage USB domain knowledge to reduce ramp up time
with these tools
/* Optional Keywords: PartialDataBusTrace, FullDataBusTrace */
<Reproduce Issue>
/* This creates a usbtrace.etl file in the current folder */
Application A
Application B
USB Transfer B
UMDF Driver
? ? ? ? ? ?
USB Core Stack
Application A
Application B
USB Transfer B
UMDF Driver
B B B A A A
USB Core Stack
• Collect ETW traces from your customers to diagnose USB
issues remotely
• Use Netmon and USB parsers to analyze ETW traces quickly
• Add ETW events with activity IDs to your drivers and
applications to improve debugging
http://forums.dev.windows.com
http://bldw.in/SessionFeedback