X-Git-Url: http://git.rot13.org/?p=linux-2.4.git;a=blobdiff_plain;f=drivers%2Fusb%2Fhub.c;h=08a212d8386eae1a7068e580191c18a8354f846d;hp=3a87b01608cba138c87206e730b3d713582ac3cc;hb=904d0fff2f350e94668043c0de413c4500b33809;hpb=36708c548618f25ac0f89b8724557dcf854a30f9 diff --git a/drivers/usb/hub.c b/drivers/usb/hub.c index 3a87b01..08a212d 100644 --- a/drivers/usb/hub.c +++ b/drivers/usb/hub.c @@ -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;