summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2012-10-24 07:23:29 +0000
committerhselasky <hselasky@FreeBSD.org>2012-10-24 07:23:29 +0000
commitddc1ceecb37fd6540ef54cf3194f65a36fd330e0 (patch)
treeb2f5dc26223f979365eae70ebbdf09f90d4c8dbd /sys/dev/usb/controller
parent63a4ea167200b31a05ebe40e5f607b26ec0a7c78 (diff)
downloadFreeBSD-src-ddc1ceecb37fd6540ef54cf3194f65a36fd330e0.zip
FreeBSD-src-ddc1ceecb37fd6540ef54cf3194f65a36fd330e0.tar.gz
Make several timing parameters of the USB enumeration sequence tuneable.
Also update the port reset time from 250ms to 50ms. Some USB devices have a hard limit in hardware at 222ms for the port reset time and will not enumerate unless this delay is closer to the usb.org defined value. This patch can fix enumeration with some USB devices. Tested by: Guido van Rooij Submitted by: Nick Hibma MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/controller')
-rw-r--r--sys/dev/usb/controller/ehci.c2
-rw-r--r--sys/dev/usb/controller/ohci.c2
-rw-r--r--sys/dev/usb/controller/uhci.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index 8131f60..035e760 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -3369,7 +3369,7 @@ ehci_roothub_exec(struct usb_device *udev,
/* Wait for reset to complete. */
usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY));
+ USB_MS_TO_TICKS(usb_port_root_reset_delay));
/* Terminate reset sequence. */
if (!(sc->sc_flags & EHCI_SCFLG_NORESTERM))
diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c
index 89517f3..b97d6dc 100644
--- a/sys/dev/usb/controller/ohci.c
+++ b/sys/dev/usb/controller/ohci.c
@@ -2345,7 +2345,7 @@ ohci_roothub_exec(struct usb_device *udev,
for (v = 0;; v++) {
if (v < 12) {
usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY));
+ USB_MS_TO_TICKS(usb_port_root_reset_delay));
if ((OREAD4(sc, port) & UPS_RESET) == 0) {
break;
diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c
index 680aac2..39588d4 100644
--- a/sys/dev/usb/controller/uhci.c
+++ b/sys/dev/usb/controller/uhci.c
@@ -2393,7 +2393,7 @@ uhci_portreset(uhci_softc_t *sc, uint16_t index)
UWRITE2(sc, port, x | UHCI_PORTSC_PR);
usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY));
+ USB_MS_TO_TICKS(usb_port_root_reset_delay));
DPRINTFN(4, "uhci port %d reset, status0 = 0x%04x\n",
index, UREAD2(sc, port));
@@ -2421,7 +2421,7 @@ uhci_portreset(uhci_softc_t *sc, uint16_t index)
for (lim = 0; lim < 12; lim++) {
usb_pause_mtx(&sc->sc_bus.bus_mtx,
- USB_MS_TO_TICKS(USB_PORT_RESET_DELAY));
+ USB_MS_TO_TICKS(usb_port_reset_delay));
x = UREAD2(sc, port);
OpenPOWER on IntegriCloud