Messages in this thread Patches in this message |  | | Date | Mon, 9 Oct 2000 13:33:57 -0700 | From | Greg KH <> | Subject | Re: usb and smp problems with 2.4.0-test9/2.2.18-pre15 |
| |
On Mon, Oct 09, 2000 at 01:59:23PM -0400, Pete Toscano wrote: > anyway, i don't recall all of the usb errors, but i think there was > "breadth" in it, it had about four lines of error message produced and > they kept repeating until i unplugged all usb devices, and there were > timeouts. useful, eh? =8] like i said, i can get this info to you if > you think it'd be helpful.
It would be very helpful to see the real errors, thanks.
> i'm using a usb mouse. i have two usb hubs -- one in my keyboard > (ms natural pro) and one in my monitor (nokia 446xpro). i also have a > usb compact flash card reader and a rio 500. the mouse and the reader > are usually plugged into the monitor and the rio is plugged into the > keyboard, if at all. > > i'll send my .config file if you think it'd be helpful.
Can't hurt.
> it's set to mps 1.1. linux has issues with 1.4?
The USB code didn't like it for some SMP motherboards a while ago. This should be cured now, but is a good place to start if you are having problems.
> if it's not a problem, would you please send the patches or point me to > where i can pick them up?
There are patches needed for the usb-uhci.c driver, and the hub.c driver that you are using (there also other fixes for other drivers that you don't mention that you are using, like usbserial, visor, bluetooth, and others, see the linux-usb.org patch manager page for these.)
I've attached the patches that you need for 2.4.0-test9.
But your response about 2.2.18pre15 also troubles me, as I have not had any other problems mentioned about this tree. Kernel debug messages would greatly help out with this.
And let me know if you still have a problem with 2.4.0-test9 after you've applied these patches.
thanks,
greg k-h
-- greg@(kroah|wirex).com --- linux/drivers/usb-test9/hub.c Tue Oct 3 11:03:23 2000 +++ linux/drivers/usb/hub.c Fri Oct 6 08:38:41 2000 @@ -539,8 +539,6 @@ tempstr = kmalloc(1024, GFP_KERNEL); portstr = kmalloc(1024, GFP_KERNEL); - if (portstr) - portstr[0] = 0; for (i = 0; i < HUB_PROBE_TRIES; i++) { struct usb_device *pdev, *cdev; @@ -567,6 +565,7 @@ cdev = dev; pdev = dev->parent; if (portstr && tempstr) { + portstr[0] = 0; while (pdev) { int port; @@ -583,25 +582,15 @@ cdev = pdev; pdev = pdev->parent; } - } - - if (portstr) info("USB new device connect on bus%d/%s, assigned device number %d", dev->bus->busnum, portstr, dev->devnum); - else + } else info("USB new device connect on bus%d, assigned device number %d", dev->bus->busnum, dev->devnum); - if (portstr) - kfree(portstr); - if (tempstr) - kfree(tempstr); - /* Run it through the hoops (find a driver, etc) */ - if (!usb_new_device(dev)) { - up(&usb_address0_sem); - return; - } + if (!usb_new_device(dev)) + goto done; /* Free the configuration if there was an error */ usb_free_dev(dev); @@ -612,7 +601,12 @@ hub->children[port] = NULL; usb_hub_port_disable(hub, port); +done: up(&usb_address0_sem); + if (portstr) + kfree(portstr); + if (tempstr) + kfree(tempstr); } static void usb_hub_events(void)diff -u linux.afs/drivers/usb/usb-uhci.c.old linux.afs/drivers/usb/usb-uhci.c --- linux.afs/drivers/usb/usb-uhci.c.old Thu Oct 5 23:15:29 2000 +++ linux.afs/drivers/usb/usb-uhci.c Thu Oct 5 23:19:49 2000 @@ -12,7 +12,7 @@ * (C) Copyright 1999 Johannes Erdfelt * (C) Copyright 1999 Randy Dunlap * - * $Id: usb-uhci.c,v 1.239 2000/09/19 20:15:12 acher Exp $ + * $Id: usb-uhci.c,v 1.242 2000/10/05 21:19:49 acher Exp $ */ #include <linux/config.h> @@ -48,7 +48,7 @@ /* This enables an extra UHCI slab for memory debugging */ #define DEBUG_SLAB -#define VERSTR "$Revision: 1.239 $ time " __TIME__ " " __DATE__ +#define VERSTR "$Revision: 1.242 $ time " __TIME__ " " __DATE__ #include <linux/usb.h> #include "usb-uhci.h" @@ -2563,6 +2563,8 @@ uhci_submit_urb (urb); } } + else if (!urb->complete) + urb->dev = NULL; if (proceed && urb->next) { // if there are linked urbs - handle submitting of them right now. @@ -2580,9 +2582,10 @@ urb->dev=NULL; urb->complete ((struct urb *) urb); } + else + urb->dev=NULL; } - urb->dev=NULL; // Just in case no completion was called usb_dec_dev_use (usb_dev); spin_unlock(&urb->lock); spin_lock(&s->urb_list_lock); |  |