summaryrefslogtreecommitdiffstats
path: root/uClinux-2.4.20-uc1/drivers/usb/hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'uClinux-2.4.20-uc1/drivers/usb/hub.c')
-rw-r--r--uClinux-2.4.20-uc1/drivers/usb/hub.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/uClinux-2.4.20-uc1/drivers/usb/hub.c b/uClinux-2.4.20-uc1/drivers/usb/hub.c
index 841ae09..3ba5efe 100644
--- a/uClinux-2.4.20-uc1/drivers/usb/hub.c
+++ b/uClinux-2.4.20-uc1/drivers/usb/hub.c
@@ -165,6 +165,9 @@ static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor
err("Unable to kmalloc %Zd bytes for hub descriptor", sizeof(*hub->descriptor));
return -1;
}
+#ifdef CONFIG_BOARD_W90N745
+ hub->descriptor = (struct usb_hub_descriptor *)((unsigned long)hub->descriptor | 0x80000000);
+#endif
/* Request the entire hub descriptor. */
ret = usb_get_hub_descriptor(dev, hub->descriptor, sizeof(*hub->descriptor));
@@ -198,7 +201,7 @@ static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor
dbg("unknown reserved power switching mode");
break;
}
-
+#ifndef CONFIG_BOARD_W90N745
switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) {
case 0x00:
dbg("global over-current protection");
@@ -211,7 +214,7 @@ static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor
dbg("no over-current protection");
break;
}
-
+#endif
switch (dev->descriptor.bDeviceProtocol) {
case 0:
break;
@@ -264,6 +267,9 @@ static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor
kfree(hub->descriptor);
return -1;
}
+#ifdef CONFIG_BOARD_W90N745
+ hubstatus = (struct usb_hub_status *)((unsigned long)hubstatus | 0x80000000);
+#endif
ret = usb_get_hub_status(dev, hubstatus);
if (ret < 0) {
err("Unable to get hub status (err = %d)", ret);
@@ -519,6 +525,9 @@ static int usb_hub_port_status(struct usb_device *hub, int port,
portsts = kmalloc(sizeof(*portsts), GFP_KERNEL);
if (portsts) {
+#ifdef CONFIG_BOARD_W90N745
+ portsts = (struct usb_port_status *)((unsigned long)portsts|0x80000000);
+#endif
ret = usb_get_port_status(hub, port + 1, portsts);
if (ret < 0)
err("%s (%d) failed (err = %d)", __FUNCTION__, hub->devnum, ret);
@@ -757,8 +766,13 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
if (len == sizeof dev->devpath)
warn ("devpath size! usb/%03d/%03d path %s",
dev->bus->busnum, dev->devnum, dev->devpath);
+#ifndef CONFIG_BOARD_W90N745
info("new USB device %s-%s, assigned address %d",
dev->bus->bus_name, dev->devpath, dev->devnum);
+#else
+ info("new USB device %s, assigned address %d",
+ dev->devpath, dev->devnum);
+#endif
/* Run it through the hoops (find a driver, etc) */
if (!usb_new_device(dev))
@@ -877,6 +891,9 @@ static void usb_hub_events(void)
if (!hubsts) {
err("couldn't allocate hubsts");
} else {
+#ifdef CONFIG_BOARD_W90N745
+ hubsts = (struct usb_hub_status *)((unsigned long)hubsts|0x80000000);
+#endif
if (usb_get_hub_status(dev, hubsts) < 0)
err("get_hub_status failed");
else {
@@ -1055,6 +1072,9 @@ int usb_reset_device(struct usb_device *dev)
if (!descriptor) {
return -ENOMEM;
}
+#ifdef CONFIG_BOARD_W90N745
+ descriptor = (struct usb_device_descriptor *)((unsigned long)descriptor|0x80000000);
+#endif
ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, descriptor,
sizeof(*descriptor));
if (ret < 0)