diff options
| author | Nick Hibma <n_hibma@FreeBSD.org> | 1999-07-25 18:54:22 +0000 |
|---|---|---|
| committer | Nick Hibma <n_hibma@FreeBSD.org> | 1999-07-25 18:54:22 +0000 |
| commit | 6d38342e16819a857398e65c51437b07e68e63f8 (patch) | |
| tree | d3613a1baf45d9d829958ff0126e9022196bacc0 /sys/dev/usb/usb.c | |
| parent | 6a8e2895aa630011ca88f63ea2aa5e4cecf00991 (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb/usb.c')
| -rw-r--r-- | sys/dev/usb/usb.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 9165a4f0083d..c6b825df90e5 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -243,6 +243,7 @@ usbioctl(dev, cmd, data, flag, p) if (sc == 0 || !sc->sc_running) return (ENXIO); + switch (cmd) { #ifdef USB_DEBUG case USB_SETDEBUG: @@ -345,23 +346,23 @@ usbpoll(dev, events, p) int events; struct proc *p; { - int revents, s; + int revents = 0; + int s; + USB_GET_SC(usb, USBUNIT(dev), sc); - DPRINTFN(2, ("usbpoll: sc=%p events=0x%x\n", sc, events)); s = splusb(); - revents = 0; + if (events & (POLLOUT | POLLWRNORM)) if (sc->sc_bus->needs_explore) revents |= events & (POLLOUT | POLLWRNORM); - DPRINTFN(2, ("usbpoll: revents=0x%x\n", revents)); - if (revents == 0) { - if (events & (POLLOUT | POLLWRNORM)) { - DPRINTFN(2, ("usbpoll: selrecord\n")); + + if (revents == 0) + if (events & (POLLOUT | POLLWRNORM)) selrecord(p, &sc->sc_consel); - } - } + splx(s); + return (revents); } |
