special usb hub handling, IDE disks, and retries all over the place
[linux-2.4.git] / drivers / usb / hub.c
index 3a87b01..08a212d 100644 (file)
@@ -41,6 +41,15 @@ static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);
 static pid_t khubd_pid = 0;                    /* PID of khubd */
 static DECLARE_COMPLETION(khubd_exited);
 
+//+Wilson12032003
+extern void led_status(int);
+//int HubFlag = 0;     
+#define        LED_OFF         0
+#define        LED_GREEN       1
+#define LED_RED                2
+#define LED_HUB                3
+//Wilson12032003+
+
 #ifdef DEBUG
 static inline char *portspeed (int portstatus)
 {
@@ -179,6 +188,12 @@ static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor
        dev->maxchild = hub->descriptor->bNbrPorts;
        info("%d port%s detected", hub->descriptor->bNbrPorts, (hub->descriptor->bNbrPorts == 1) ? "" : "s");
 
+       //+Wilson12032003
+       /* Indicates that a usb hub is being detected, so the LED_RED of the led status is invalid now */
+       //led_status(LED_HUB);  
+       dev->HubFlag = 1;       
+       //Wilson12032003+
+
        le16_to_cpus(&hub->descriptor->wHubCharacteristics);
 
        if (hub->descriptor->wHubCharacteristics & HUB_CHAR_COMPOUND)
@@ -827,7 +842,8 @@ static void usb_hub_events(void)
                        hub->error = 0;
                }
 
-               for (i = 0; i < hub->descriptor->bNbrPorts; i++) {
+               //for (i = 0; i < hub->descriptor->bNbrPorts; i++) { //+Wilson04272004
+               for (i = (hub->descriptor->bNbrPorts - 1); i >= 0; i--) { //+Wilson04272004, Reversed the get port sequence
                        ret = usb_hub_port_status(dev, i, &portstatus, &portchange);
                        if (ret < 0) {
                                continue;