Work around a problem with some VIA USB controllers: prevent
plugging of new devices killing devices already plugged. This
patch by itself fixes the problem (uhci.c only for the moment -
if you think it is OK I will make a patch for usb-uhci and 2.5).
The following patches fix some related minor problems.
Patch is against 2.4.19.
--- linux/drivers/usb/uhci.c.orig 2002-10-25 22:54:25.000000000 +0200
+++ linux/drivers/usb/uhci.c 2002-10-26 00:20:11.000000000 +0200
@@ -2184,6 +2184,9 @@
SET_RH_PORTSTAT(USBPORTSC_SUSP);
OK(0);
case RH_PORT_RESET:
+ if (uhci->rh.needs_suspend)
+ suspend_hc (uhci);
+
SET_RH_PORTSTAT(USBPORTSC_PR);
mdelay(50); /* USB v1.1 7.1.7.3 */
uhci->rh.c_p_r[wIndex - 1] = 1;
@@ -2192,6 +2195,10 @@
SET_RH_PORTSTAT(USBPORTSC_PE);
mdelay(10);
SET_RH_PORTSTAT(0xa);
+
+ if (uhci->rh.needs_suspend)
+ wakeup_hc (uhci);
+
OK(0);
case RH_PORT_POWER:
OK(0); /* port power ** */
@@ -2817,6 +2824,11 @@
uhci->rh.numports = port;
+ uhci->rh.needs_suspend = 0;
+
+ if ((dev->vendor == 0x1106) && (dev->device == 0x3038))
+ uhci->rh.needs_suspend = 1;
+
uhci->bus->root_hub = uhci->rh.dev = usb_alloc_dev(NULL, uhci->bus);
if (!uhci->rh.dev) {
err("unable to allocate root hub");
--- linux/drivers/usb/uhci.h.orig 2002-10-25 22:54:20.000000000 +0200
+++ linux/drivers/usb/uhci.h 2002-10-25 22:55:57.000000000 +0200
@@ -274,6 +274,7 @@
int send;
int interval;
int numports;
+ int needs_suspend;
int c_p_r[8];
struct timer_list rh_int_timer;
};
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel