static inline int hub_is_superspeed(struct usb_device *hdev) { return (hdev->descriptor.bDeviceProtocol == USB_HUB_PR_SS); }
ch11.h:
/* * Hub Device descriptor * USB Hub class device protocols */ #define USB_HUB_PR_FS 0 /* Full speed hub */ #define USB_HUB_PR_HS_NO_TT 0 /* Hi-speed hub without TT */ #define USB_HUB_PR_HS_SINGLE_TT 1 /* Hi-speed hub with single TT */ #define USB_HUB_PR_HS_MULTI_TT 2 /* Hi-speed hub with multiple TT */ #define USB_HUB_PR_SS 3 /* Super speed hub */
ch9.h:
hubdev->state
enum usb_device_state { /* NOTATTACHED isn't in the USB spec, and this state acts * the same as ATTACHED ... but it's clearer this way. */ USB_STATE_NOTATTACHED = 0, /* chapter 9 and authentication (wireless) device states */ USB_STATE_ATTACHED, USB_STATE_POWERED, /* wired */ USB_STATE_RECONNECTING, /* auth */ USB_STATE_UNAUTHENTICATED, /* auth */ USB_STATE_DEFAULT, /* limited function */ USB_STATE_ADDRESS, USB_STATE_CONFIGURED, /* most functions */ USB_STATE_SUSPENDED /* NOTE: there are actually four different SUSPENDED * states, returning to POWERED, DEFAULT, ADDRESS, or * CONFIGURED respectively when SOF tokens flow again. * At this level there's no difference between L1 and L2 * suspend states. (L2 being original USB 1.1 suspend.) */ };
沒有留言:
張貼留言