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)
{
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)
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;