NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/48496: uhub.c - usbd_new_device needs to be retried as many as 5 times for touch screen controller on Panasonic Toughbook CF19 mk5
>Number: 48496
>Category: kern
>Synopsis: uhub.c - usbd_new_device needs to be retried as many as 5
>times for touch screen controller on Panasonic Toughbook CF19 mk5
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 04 01:05:00 +0000 2014
>Originator: Nat Sloss
>Release: NetBSD 6.1.1
>Organization:
>Environment:
NetBSD beast 6.1.1_PATCH NetBSD 6.1.1_PATCH (C3TEST) #0: Thu Jan 2 10:54:36
EST 2014 build@microrusty:/usr/src/sys/arch/i386/compile/obj/C3TEST i386
>Description:
The touch screen controller on the Panasonic Toughbook CF19 mk5 is erratic.
Sometimes it will attach first go but most often it wont and the port is
disabled.
I found that retrying usbd_new_device up to 5 times fixes the problem.
I don't know if the same results are obtained on an amd64 kernel I am still
running an i386 kernel.
>How-To-Repeat:
Refer to above.
>Fix:
Apply this patch which retries usbd_new_device at most 8 times:
Index: sys/dev/usb/uhub.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/uhub.c,v
retrieving revision 1.114.10.1
diff -u -r1.114.10.1 uhub.c
--- sys/dev/usb/uhub.c 19 Mar 2012 23:13:59 -0000 1.114.10.1
+++ sys/dev/usb/uhub.c 3 Jan 2014 23:55:31 -0000
@@ -544,6 +544,8 @@
else
speed = USB_SPEED_FULL;
/* Get device info and set its address. */
+ int new_device_tries = 8;
+newdev_retry:
err = usbd_new_device(sc->sc_dev, dev->bus,
dev->depth + 1, speed, port, up);
/* XXX retry a few times? */
@@ -553,6 +555,16 @@
/* Avoid addressing problems by disabling. */
/* usbd_reset_port(dev, port, &up->status); */
+ /* The touch screen controller on the Panasonic
Toughbook CF19 - Mk 5
+ * responds to new device erratically sometimes in as
many as 5
+ * attempts.
+ */
+ if (new_device_tries > 0) {
+ new_device_tries--;
+ delay(200);
+ goto newdev_retry;
+ }
+
/*
* The unit refused to accept a new address, or had
* some other serious problem. Since we cannot leave
NB: This patch is my own work which I submit under the NetBSD license.
Regards,
Nat.
Home |
Main Index |
Thread Index |
Old Index