diff options
author | joe <joe@FreeBSD.org> | 2002-01-26 12:04:22 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-01-26 12:04:22 +0000 |
commit | 102fdc4f0a532992ab09937febc22df37cc7b579 (patch) | |
tree | 8222196b5e2a8f7ebfce2834d2eb9a1be1b2cbaf /sys/dev/usb/uhci.c | |
parent | cc5a433a5e8a9fedce126874b6188478b8453575 (diff) | |
download | FreeBSD-src-102fdc4f0a532992ab09937febc22df37cc7b579.zip FreeBSD-src-102fdc4f0a532992ab09937febc22df37cc7b579.tar.gz |
Merge from NetBSD:
ohci.c: revision 1.72 and 1.73
ohcivar.h: revision 1.19 and 1.20
uhci.c: revision 1.85
usbdi.h: a small part of revision 1.40
usbdivar.h: revision 1.47
Relevant commit messages from NetBSD are:
date: 2000/02/22 11:30:54; author: augustss; state: Exp;
Prepare a little for having USB interrupt processing done
outside the hard interrupt level (in a thread or a softintr).
No real soft processing done yet.
----------------------------
date: 2000/02/01 05:42:53; author: augustss; state: Exp;
Put some #ifdefs around power and shutdown hooks.
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r-- | sys/dev/usb/uhci.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index df19aac..06cbcec 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.84 2000/01/28 00:44:27 augustss Exp $ */ +/* $NetBSD: uhci.c,v 1.85 2000/02/22 11:30:55 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -243,6 +243,7 @@ Static void uhci_root_intr_done(usbd_xfer_handle); Static usbd_status uhci_open(usbd_pipe_handle); Static void uhci_poll(struct usbd_bus *); +Static void uhci_softintr __P((struct usbd_bus *)); Static usbd_status uhci_device_request(usbd_xfer_handle xfer); @@ -287,6 +288,7 @@ void uhci_dump(void); struct usbd_bus_methods uhci_bus_methods = { uhci_open, + uhci_softintr, uhci_poll, uhci_allocm, uhci_freem, @@ -1077,7 +1079,6 @@ uhci_intr(void *arg) uhci_softc_t *sc = arg; int status; int ack; - uhci_intr_info_t *ii; /* * It can happen that an interrupt will be delivered to @@ -1146,8 +1147,24 @@ uhci_intr(void *arg) return (0); } - sc->sc_bus.intr_context++; sc->sc_bus.no_intrs++; + usb_schedsoftintr(&sc->sc_bus); + + DPRINTFN(10, ("%s: uhci_intr: exit\n", USBDEVNAME(sc->sc_bus.bdev))); + + return (1); +} + +void +uhci_softintr(bus) + struct usbd_bus *bus; +{ + uhci_softc_t *sc = (uhci_softc_t *)bus; + uhci_intr_info_t *ii; + + DPRINTFN(10,("%s: uhci_softintr\n", USBDEVNAME(sc->sc_bus.bdev))); + + sc->sc_bus.intr_context++; /* * Interrupts on UHCI really suck. When the host controller @@ -1163,11 +1180,7 @@ uhci_intr(void *arg) LIST_FOREACH(ii, &sc->sc_intrhead, list) uhci_check_intr(sc, ii); - DPRINTFN(10, ("%s: uhci_intr: exit\n", USBDEVNAME(sc->sc_bus.bdev))); - sc->sc_bus.intr_context--; - - return (1); } /* Check for an interrupt. */ |