diff options
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r-- | sys/dev/usb/uhci.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 851265b..577b3c8 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -535,7 +535,7 @@ uhci_init(uhci_softc_t *sc) LIST_INIT(&sc->sc_intrhead); - SIMPLEQ_INIT(&sc->sc_free_xfers); + STAILQ_INIT(&sc->sc_free_xfers); usb_callout_init(sc->sc_poll_handle); @@ -604,10 +604,10 @@ uhci_detach(struct uhci_softc *sc, int flags) /* Free all xfers associated with this HC. */ for (;;) { - xfer = SIMPLEQ_FIRST(&sc->sc_free_xfers); + xfer = STAILQ_FIRST(&sc->sc_free_xfers); if (xfer == NULL) break; - SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, next); + STAILQ_REMOVE_HEAD(&sc->sc_free_xfers, next); free(xfer, M_USB); } @@ -635,9 +635,9 @@ uhci_allocx(struct usbd_bus *bus) struct uhci_softc *sc = (struct uhci_softc *)bus; usbd_xfer_handle xfer; - xfer = SIMPLEQ_FIRST(&sc->sc_free_xfers); + xfer = STAILQ_FIRST(&sc->sc_free_xfers); if (xfer != NULL) { - SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, next); + STAILQ_REMOVE_HEAD(&sc->sc_free_xfers, next); #ifdef DIAGNOSTIC if (xfer->busy_free != XFER_FREE) { printf("uhci_allocx: xfer=%p not free, 0x%08x\n", xfer, @@ -678,7 +678,7 @@ uhci_freex(struct usbd_bus *bus, usbd_xfer_handle xfer) return; } #endif - SIMPLEQ_INSERT_HEAD(&sc->sc_free_xfers, xfer, next); + STAILQ_INSERT_HEAD(&sc->sc_free_xfers, xfer, next); } /* @@ -782,7 +782,7 @@ uhci_dumpregs(uhci_softc_t *sc) { DPRINTFN(-1,("%s regs: cmd=%04x, sts=%04x, intr=%04x, frnum=%04x, " "flbase=%08x, sof=%04x, portsc1=%04x, portsc2=%04x\n", - USBDEVNAME(sc->sc_bus.bdev), + device_get_nameunit(sc->sc_bus.bdev), UREAD2(sc, UHCI_CMD), UREAD2(sc, UHCI_STS), UREAD2(sc, UHCI_INTR), @@ -1222,7 +1222,7 @@ uhci_intr1(uhci_softc_t *sc) #ifdef USB_DEBUG if (uhcidebug > 15) { - DPRINTF(("%s: uhci_intr1\n", USBDEVNAME(sc->sc_bus.bdev))); + DPRINTF(("%s: uhci_intr1\n", device_get_nameunit(sc->sc_bus.bdev))); uhci_dumpregs(sc); } #endif @@ -1237,7 +1237,7 @@ uhci_intr1(uhci_softc_t *sc) if (sc->sc_suspend != PWR_RESUME) { printf("%s: interrupt while not operating ignored\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); UWRITE2(sc, UHCI_STS, status); /* acknowledge the ints */ return (0); } @@ -1250,23 +1250,23 @@ uhci_intr1(uhci_softc_t *sc) if (status & UHCI_STS_RD) { ack |= UHCI_STS_RD; #ifdef USB_DEBUG - printf("%s: resume detect\n", USBDEVNAME(sc->sc_bus.bdev)); + printf("%s: resume detect\n", device_get_nameunit(sc->sc_bus.bdev)); #endif } if (status & UHCI_STS_HSE) { ack |= UHCI_STS_HSE; - printf("%s: host system error\n", USBDEVNAME(sc->sc_bus.bdev)); + printf("%s: host system error\n", device_get_nameunit(sc->sc_bus.bdev)); } if (status & UHCI_STS_HCPE) { ack |= UHCI_STS_HCPE; printf("%s: host controller process error\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); } if (status & UHCI_STS_HCH) { /* no acknowledge needed */ if (!sc->sc_dying) { printf("%s: host controller halted\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); #ifdef USB_DEBUG uhci_dump_all(sc); #endif @@ -1281,7 +1281,7 @@ uhci_intr1(uhci_softc_t *sc) sc->sc_bus.no_intrs++; usb_schedsoftintr(&sc->sc_bus); - DPRINTFN(15, ("%s: uhci_intr: exit\n", USBDEVNAME(sc->sc_bus.bdev))); + DPRINTFN(15, ("%s: uhci_intr: exit\n", device_get_nameunit(sc->sc_bus.bdev))); return (1); } @@ -1292,7 +1292,7 @@ uhci_softintr(void *v) uhci_softc_t *sc = v; uhci_intr_info_t *ii, *nextii; - DPRINTFN(10,("%s: uhci_softintr (%d)\n", USBDEVNAME(sc->sc_bus.bdev), + DPRINTFN(10,("%s: uhci_softintr (%d)\n", device_get_nameunit(sc->sc_bus.bdev), sc->sc_bus.intr_context)); sc->sc_bus.intr_context++; @@ -1601,7 +1601,7 @@ uhci_reset(uhci_softc_t *sc) usb_delay_ms(&sc->sc_bus, 1); if (n >= UHCI_RESET_TIMEOUT) printf("%s: controller did not reset\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); } usbd_status @@ -1631,7 +1631,7 @@ uhci_run(uhci_softc_t *sc, int run) usb_delay_ms(&sc->sc_bus, 1); } splx(s); - printf("%s: cannot %s\n", USBDEVNAME(sc->sc_bus.bdev), + printf("%s: cannot %s\n", device_get_nameunit(sc->sc_bus.bdev), run ? "start" : "stop"); return (USBD_IOERROR); } @@ -1930,7 +1930,7 @@ uhci_device_bulk_transfer(usbd_xfer_handle xfer) * Pipe isn't running (otherwise err would be USBD_INPROG), * so start it first. */ - return (uhci_device_bulk_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (uhci_device_bulk_start(STAILQ_FIRST(&xfer->pipe->queue))); } usbd_status @@ -2192,7 +2192,7 @@ uhci_device_ctrl_transfer(usbd_xfer_handle xfer) * Pipe isn't running (otherwise err would be USBD_INPROG), * so start it first. */ - return (uhci_device_ctrl_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (uhci_device_ctrl_start(STAILQ_FIRST(&xfer->pipe->queue))); } usbd_status @@ -2232,7 +2232,7 @@ uhci_device_intr_transfer(usbd_xfer_handle xfer) * Pipe isn't running (otherwise err would be USBD_INPROG), * so start it first. */ - return (uhci_device_intr_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (uhci_device_intr_start(STAILQ_FIRST(&xfer->pipe->queue))); } usbd_status @@ -2518,7 +2518,7 @@ uhci_device_isoc_transfer(usbd_xfer_handle xfer) /* and start if the pipe wasn't running */ if (!err) - uhci_device_isoc_start(SIMPLEQ_FIRST(&xfer->pipe->queue)); + uhci_device_isoc_start(STAILQ_FIRST(&xfer->pipe->queue)); return (err); } @@ -3353,7 +3353,7 @@ uhci_root_ctrl_transfer(usbd_xfer_handle xfer) * Pipe isn't running (otherwise err would be USBD_INPROG), * so start it first. */ - return (uhci_root_ctrl_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (uhci_root_ctrl_start(STAILQ_FIRST(&xfer->pipe->queue))); } usbd_status @@ -3727,7 +3727,7 @@ uhci_root_intr_transfer(usbd_xfer_handle xfer) * Pipe isn't running (otherwise err would be USBD_INPROG), * so start it first. */ - return (uhci_root_intr_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (uhci_root_intr_start(STAILQ_FIRST(&xfer->pipe->queue))); } /* Start a transfer on the root interrupt pipe */ |