* [PATCH] usbcore, kernel 2.6.18.1
@ 2008-04-03 13:14 Gerd Luyten
2008-04-04 4:34 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Gerd Luyten @ 2008-04-03 13:14 UTC (permalink / raw)
To: linux-kernel
This patch is to eventually detect a Velleman K8055 USB device.
Without the patch it will fail detection with following errors:
usb 1-2: can't read configurations, error -110
=> probably because of usb non-conformance reason of the K8055 card.
(timing issues...)
With this patch, detection will keep on trying until usb card gets
recognized.
This patch adds a device reset in the "fail:" sequence instead of just
marking the device state as NOTATTACHED.
[gluyten@workstation pup214]$ diff -u
linux-2.6.18.1/drivers/usb/core/hub.c hub.c
--- linux-2.6.18.1/drivers/usb/core/hub.c 2006-10-14
05:34:03.000000000 +0200
+++ hub.c 2008-04-03 14:47:49.000000000 +0200
@@ -1450,7 +1450,9 @@
return 0;
fail:
- usb_set_device_state(udev, USB_STATE_NOTATTACHED);
+// usb_set_device_state(udev, USB_STATE_NOTATTACHED);
+ usb_lock_device_for_reset(udev, NULL);
+ usb_reset_composite_device(udev, NULL);
return err;
}
--
Gerd Luyten <gluyten@skynet.be>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] usbcore, kernel 2.6.18.1
2008-04-03 13:14 [PATCH] usbcore, kernel 2.6.18.1 Gerd Luyten
@ 2008-04-04 4:34 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2008-04-04 4:34 UTC (permalink / raw)
To: Gerd Luyten; +Cc: linux-kernel, linux-usb
On Thu, 03 Apr 2008 15:14:54 +0200 Gerd Luyten <gluyten@skynet.be> wrote:
> This patch is to eventually detect a Velleman K8055 USB device.
> Without the patch it will fail detection with following errors:
> usb 1-2: can't read configurations, error -110
> => probably because of usb non-conformance reason of the K8055 card.
> (timing issues...)
>
> With this patch, detection will keep on trying until usb card gets
> recognized.
> This patch adds a device reset in the "fail:" sequence instead of just
> marking the device state as NOTATTACHED.
>
> [gluyten@workstation pup214]$ diff -u
> linux-2.6.18.1/drivers/usb/core/hub.c hub.c
> --- linux-2.6.18.1/drivers/usb/core/hub.c 2006-10-14
> 05:34:03.000000000 +0200
> +++ hub.c 2008-04-03 14:47:49.000000000 +0200
> @@ -1450,7 +1450,9 @@
> return 0;
>
> fail:
> - usb_set_device_state(udev, USB_STATE_NOTATTACHED);
> +// usb_set_device_state(udev, USB_STATE_NOTATTACHED);
> + usb_lock_device_for_reset(udev, NULL);
> + usb_reset_composite_device(udev, NULL);
> return err;
> }
>
2.6.18 is very old. Does 2.6.24 (or later) also need fixing?
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-04 4:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-03 13:14 [PATCH] usbcore, kernel 2.6.18.1 Gerd Luyten
2008-04-04 4:34 ` Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.