diff options
Diffstat (limited to 'drivers/usb/hub.h')
-rw-r--r-- | drivers/usb/hub.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/usb/hub.h b/drivers/usb/hub.h index 49c531d30..c95a07d74 100644 --- a/drivers/usb/hub.h +++ b/drivers/usb/hub.h @@ -4,7 +4,7 @@ #include <linux/list.h> /* - * Hub feature numbers + * Hub Class feature numbers */ #define C_HUB_LOCAL_POWER 0 #define C_HUB_OVER_CURRENT 1 @@ -25,7 +25,12 @@ #define USB_PORT_FEAT_C_OVER_CURRENT 19 #define USB_PORT_FEAT_C_RESET 20 -/* wPortStatus */ +struct usb_port_status { + __u16 wPortStatus; + __u16 wPortChange; +} __attribute__ ((packed)); + +/* wPortStatus bits */ #define USB_PORT_STAT_CONNECTION 0x0001 #define USB_PORT_STAT_ENABLE 0x0002 #define USB_PORT_STAT_SUSPEND 0x0004 @@ -34,7 +39,7 @@ #define USB_PORT_STAT_POWER 0x0100 #define USB_PORT_STAT_LOW_SPEED 0x0200 -/* wPortChange */ +/* wPortChange bits */ #define USB_PORT_STAT_C_CONNECTION 0x0001 #define USB_PORT_STAT_C_ENABLE 0x0002 #define USB_PORT_STAT_C_SUSPEND 0x0004 @@ -46,6 +51,20 @@ #define HUB_CHAR_COMPOUND 0x0004 #define HUB_CHAR_OCPM 0x0018 +struct usb_hub_status { + __u16 wHubStatus; + __u16 wHubChange; +} __attribute__ ((packed)); + +/* + *Hub Status & Hub Change bit masks + */ +#define HUB_STATUS_LOCAL_POWER 0x0001 +#define HUB_STATUS_OVERCURRENT 0x0002 + +#define HUB_CHANGE_LOCAL_POWER 0x0001 +#define HUB_CHANGE_OVERCURRENT 0x0002 + /* Hub descriptor */ struct usb_hub_descriptor { __u8 bLength; @@ -103,4 +122,3 @@ struct usb_hub { }; #endif - |