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/ohci.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/ohci.c')
-rw-r--r-- | sys/dev/usb/controller/ohci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c index eb98ff3..ea59c54 100644 --- a/sys/dev/usb/controller/ohci.c +++ b/sys/dev/usb/controller/ohci.c @@ -1020,7 +1020,7 @@ ohci_check_transfer_sub(struct usb2_xfer *xfer) * writing the BLF and CLF bits: */ - if (xfer->xroot->udev->pwr_save.suspended) { + if (xfer->xroot->udev->state == USB_STATE_SUSPENDED) { /* nothing to do */ } else if (xfer->pipe->methods == &ohci_device_bulk_methods) { ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus); @@ -1589,7 +1589,7 @@ ohci_setup_standard_chain(struct usb2_xfer *xfer, ohci_ed_t **ed_last) ed->ed_headp = td->td_self; - if (xfer->xroot->udev->pwr_save.suspended == 0) { + if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) { /* the append function will flush the endpoint descriptor */ OHCI_APPEND_QH(ed, *ed_last); |