uhci.c (185950) | uhci.c (186454) |
---|---|
1/*- 2 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 3 * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. 4 * Copyright (c) 1998 Lennart Augustsson. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 3 * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. 4 * Copyright (c) 1998 Lennart Augustsson. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/usb2/controller/uhci2.c 185950 2008-12-11 23:17:48Z thompsa $"); | 29__FBSDID("$FreeBSD: head/sys/dev/usb2/controller/uhci2.c 186454 2008-12-23 19:59:21Z thompsa $"); |
30 31/* 32 * USB Universal Host Controller driver. 33 * Handles e.g. PIIX3 and PIIX4. 34 * 35 * UHCI spec: http://developer.intel.com/design/USB/UHCI11D.htm 36 * USB spec: http://www.usb.org/developers/docs/usbspec.zip 37 * PIIXn spec: ftp://download.intel.com/design/intarch/datashts/29055002.pdf --- 1451 unchanged lines hidden (view full) --- 1489 1490/* 1491 * called when a request does not complete 1492 */ 1493static void 1494uhci_timeout(void *arg) 1495{ 1496 struct usb2_xfer *xfer = arg; | 30 31/* 32 * USB Universal Host Controller driver. 33 * Handles e.g. PIIX3 and PIIX4. 34 * 35 * UHCI spec: http://developer.intel.com/design/USB/UHCI11D.htm 36 * USB spec: http://www.usb.org/developers/docs/usbspec.zip 37 * PIIXn spec: ftp://download.intel.com/design/intarch/datashts/29055002.pdf --- 1451 unchanged lines hidden (view full) --- 1489 1490/* 1491 * called when a request does not complete 1492 */ 1493static void 1494uhci_timeout(void *arg) 1495{ 1496 struct usb2_xfer *xfer = arg; |
1497 uhci_softc_t *sc = xfer->usb2_sc; | |
1498 1499 DPRINTF("xfer=%p\n", xfer); 1500 | 1497 1498 DPRINTF("xfer=%p\n", xfer); 1499 |
1501 USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); | 1500 USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED); |
1502 1503 /* transfer is transferred */ 1504 uhci_device_done(xfer, USB_ERR_TIMEOUT); | 1501 1502 /* transfer is transferred */ 1503 uhci_device_done(xfer, USB_ERR_TIMEOUT); |
1505 1506 USB_BUS_UNLOCK(&sc->sc_bus); | |
1507} 1508 1509static void 1510uhci_do_poll(struct usb2_bus *bus) 1511{ 1512 struct uhci_softc *sc = UHCI_BUS2SC(bus); 1513 1514 USB_BUS_LOCK(&sc->sc_bus); --- 1392 unchanged lines hidden (view full) --- 2907 /* 2908 * no change or controller not running, try again in a while 2909 */ 2910 uhci_root_intr_start(xfer); 2911 } else { 2912 usb2_sw_transfer(&sc->sc_root_intr, 2913 &uhci_root_intr_done); 2914 } | 1504} 1505 1506static void 1507uhci_do_poll(struct usb2_bus *bus) 1508{ 1509 struct uhci_softc *sc = UHCI_BUS2SC(bus); 1510 1511 USB_BUS_LOCK(&sc->sc_bus); --- 1392 unchanged lines hidden (view full) --- 2904 /* 2905 * no change or controller not running, try again in a while 2906 */ 2907 uhci_root_intr_start(xfer); 2908 } else { 2909 usb2_sw_transfer(&sc->sc_root_intr, 2910 &uhci_root_intr_done); 2911 } |
2915 USB_BUS_UNLOCK(&sc->sc_bus); | |
2916} 2917 2918struct usb2_pipe_methods uhci_root_intr_methods = 2919{ 2920 .open = uhci_root_intr_open, 2921 .close = uhci_root_intr_close, 2922 .enter = uhci_root_intr_enter, 2923 .start = uhci_root_intr_start, --- 281 unchanged lines hidden --- | 2912} 2913 2914struct usb2_pipe_methods uhci_root_intr_methods = 2915{ 2916 .open = uhci_root_intr_open, 2917 .close = uhci_root_intr_close, 2918 .enter = uhci_root_intr_enter, 2919 .start = uhci_root_intr_start, --- 281 unchanged lines hidden --- |