patch-2.3.24 linux/drivers/usb/hub.h

Next file: linux/drivers/usb/ohci-hcd.c
Previous file: linux/drivers/usb/hub.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.23/linux/drivers/usb/hub.h linux/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 @@
 };
 
 #endif
-

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)