Hello.
Greg KH wrote:
> On Thu, Jun 20, 2002 at 08:24:12AM +0200, M. Stolle wrote:
>>>>I'm trying to get an Acer BT500 Bluetooth USB adapter up and running
>>>>
>>>>The box I use runs a self compiled unpatched 2.4.18 kernel and
>>>>RedHat 7.2. All USB / Bluetooth drivers are compiled as modules. The
>>>>box has a Gigabyte 7IXE4 motherboard with an OHCI USB Controller.
>>>
>>>The 2.4.19-pre kernel has a change that should fix this problem for
>>>you. Could you try it out and let us know if that works or not?
>>
>>I just tried 2.4.19-pre9
>>
>>Jun 20 08:17:50 server kernel: hub.c: USB new device connect on bus1/2, assigned
>device number 2
>>Jun 20 08:17:50 server kernel: usb.c: USB device not accepting new address=2
>(error=-110)
>>Jun 20 08:17:50 server kernel: hub.c: USB new device connect on bus1/2, assigned
>device number 3
>>Jun 20 08:17:50 server kernel: usb.c: USB device not accepting new address=3
>(error=-110)
I have a similar problem with my sl11r usb harddisk. Does hotplug work
after applying the attached patch? This is a patch from Georg Acher
(Thanks!) which forces the driver to wait longer for a usb device to
become available after a (hotplug-) "reset".
Please report success/failure.
bye,
eduard
diff -u linux/drivers/usb/usb.c linux.afs/drivers/usb/usb.c
--- linux/drivers/usb/usb.c Tue Aug 7 10:48:27 2001
+++ linux.afs/drivers/usb/usb.c Wed Aug 29 16:55:26 2001
@@ -2169,6 +2169,7 @@
int usb_new_device(struct usb_device *dev)
{
int err;
+ int n,m;
/* USB v1.1 5.5.3 */
/* We read the first 8 bytes from the device descriptor to get to */
@@ -2177,18 +2178,31 @@
dev->epmaxpacketin [0] = 8;
dev->epmaxpacketout[0] = 8;
- err = usb_set_address(dev);
- if (err < 0) {
- err("USB device not accepting new address=%d (error=%d)",
- dev->devnum, err);
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
- dev->devnum = -1;
- return 1;
- }
+ for(m=0;m<2;m++) {
+
+ for(n=0;n<2;n++) {
+ err = usb_set_address(dev);
+ if (err>=0)
+ break;
+ wait_ms(200);
+ }
+
+ if (err < 0) {
+ err("USB device not accepting new address=%d (error=%d)",
+ dev->devnum, err);
+ clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ dev->devnum = -1;
+ return 1;
+ }
- wait_ms(10); /* Let the SET_ADDRESS settle */
+ wait_ms(10); /* Let the SET_ADDRESS settle */
- err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, 8);
+ err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, 8);
+ if (err >= 8)
+ break;
+ wait_ms(100);
+ }
+
if (err < 8) {
if (err < 0)
err("USB device not responding, giving up (error=%d)", err);
@@ -2198,6 +2212,7 @@
dev->devnum = -1;
return 1;
}
+
dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0;
dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0;