diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-04-25 21:10:06 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-04-25 21:10:06 +0000 |
commit | 1253be32753b7ab96a90d57fc07991ae8a154177 (patch) | |
tree | 6204fa982868a9530323799ccff1606ec998c2ba /sys/dev/usb/controller/uhci.c | |
parent | 50a34549cf93908659f1fb58b36fc7ed8ecfc3b8 (diff) | |
download | FreeBSD-src-1253be32753b7ab96a90d57fc07991ae8a154177.zip FreeBSD-src-1253be32753b7ab96a90d57fc07991ae8a154177.tar.gz |
Track the usb device state as its powered on, addressed and configured. This helps
to avoid touching the device when it is not going to respond and would otherwise
timeout.
Implement the suspend tracking as a udev state too.
Diffstat (limited to 'sys/dev/usb/controller/uhci.c')
-rw-r--r-- | sys/dev/usb/controller/uhci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c index ebbcb25..eaadf9e 100644 --- a/sys/dev/usb/controller/uhci.c +++ b/sys/dev/usb/controller/uhci.c @@ -1921,7 +1921,7 @@ uhci_device_bulk_start(struct usb2_xfer *xfer) qh->e_next = td; qh->qh_e_next = td->td_self; - if (xfer->xroot->udev->pwr_save.suspended == 0) { + if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) { UHCI_APPEND_QH(qh, sc->sc_bulk_p_last); uhci_add_loop(sc); xfer->flags_int.bandwidth_reclaimed = 1; @@ -1982,7 +1982,7 @@ uhci_device_ctrl_start(struct usb2_xfer *xfer) * NOTE: some devices choke on bandwidth- reclamation for control * transfers */ - if (xfer->xroot->udev->pwr_save.suspended == 0) { + if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) { if (xfer->xroot->udev->speed == USB_SPEED_LOW) { UHCI_APPEND_QH(qh, sc->sc_ls_ctl_p_last); } else { @@ -2071,7 +2071,7 @@ uhci_device_intr_start(struct usb2_xfer *xfer) qh->e_next = td; qh->qh_e_next = td->td_self; - if (xfer->xroot->udev->pwr_save.suspended == 0) { + if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) { /* enter QHs into the controller data structures */ UHCI_APPEND_QH(qh, sc->sc_intr_p_last[xfer->qh_pos]); |