diff options
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ohci.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/ugen.c | 22 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/uhid.c | 30 | ||||
-rw-r--r-- | sys/dev/usb/ulpt.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/umodem.c | 18 | ||||
-rw-r--r-- | sys/dev/usb/ums.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/urio.c | 14 | ||||
-rw-r--r-- | sys/dev/usb/usb.c | 24 | ||||
-rw-r--r-- | sys/dev/usb/usbdi.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/uscanner.c | 12 |
11 files changed, 71 insertions, 71 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 38dab89..14d8f3a 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1887,7 +1887,7 @@ ohci_abort_xfer(xfer, status) timeout(ohci_abort_xfer_end, xfer, hz / USB_FRAMES_PER_SECOND); } else { #if defined(DIAGNOSTIC) && defined(__i386__) && defined(__FreeBSD__) - KASSERT(curproc->p_intr_nesting_level == 0, + KASSERT(curthread->td_intr_nesting_level == 0, ("ohci_abort_req in interrupt context")); #endif usb_delay_ms(opipe->pipe.device->bus, 1); diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 637c7a0..2f65a8a 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -157,7 +157,7 @@ Static void ugen_isoc_rintr(usbd_xfer_handle xfer, usbd_private_handle addr, Static int ugen_do_read(struct ugen_softc *, int, struct uio *, int); Static int ugen_do_write(struct ugen_softc *, int, struct uio *, int); Static int ugen_do_ioctl(struct ugen_softc *, int, u_long, - caddr_t, int, struct proc *); + caddr_t, int, struct thread *); #if defined(__FreeBSD__) Static void ugen_make_devnodes(struct ugen_softc *sc); Static void ugen_destroy_devnodes(struct ugen_softc *sc); @@ -358,7 +358,7 @@ ugen_set_config(struct ugen_softc *sc, int configno) } int -ugenopen(dev_t dev, int flag, int mode, struct proc *p) +ugenopen(dev_t dev, int flag, int mode, struct thread *td) { struct ugen_softc *sc; int unit = UGENUNIT(dev); @@ -490,7 +490,7 @@ ugenopen(dev_t dev, int flag, int mode, struct proc *p) } int -ugenclose(dev_t dev, int flag, int mode, struct proc *p) +ugenclose(dev_t dev, int flag, int mode, struct thread *td) { int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; @@ -1034,7 +1034,7 @@ ugen_get_alt_index(struct ugen_softc *sc, int ifaceidx) Static int ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, - caddr_t addr, int flag, struct proc *p) + caddr_t addr, int flag, struct thread *td) { struct ugen_endpoint *sce; usbd_status err; @@ -1223,7 +1223,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, uio.uio_offset = 0; uio.uio_segflg = UIO_USERSPACE; uio.uio_rw = UIO_READ; - uio.uio_procp = p; + uio.uio_td = td; #if defined(__NetBSD__) || defined(__OpenBSD__) error = uiomove((caddr_t)cdesc, len, &uio); #elif defined(__FreeBSD__) @@ -1273,7 +1273,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, uio.uio_rw = ur->request.bmRequestType & UT_READ ? UIO_READ : UIO_WRITE; - uio.uio_procp = p; + uio.uio_td = td; ptr = malloc(len, M_TEMP, M_WAITOK); if (uio.uio_rw == UIO_WRITE) { error = uiomove(ptr, len, &uio); @@ -1310,7 +1310,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, } int -ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) +ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; @@ -1319,14 +1319,14 @@ ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) USB_GET_SC(ugen, UGENUNIT(dev), sc); sc->sc_refcnt++; - error = ugen_do_ioctl(sc, endpt, cmd, addr, flag, p); + error = ugen_do_ioctl(sc, endpt, cmd, addr, flag, td); if (--sc->sc_refcnt < 0) usb_detach_wakeup(USBDEV(sc->sc_dev)); return (error); } int -ugenpoll(dev_t dev, int events, struct proc *p) +ugenpoll(dev_t dev, int events, struct thread *td) { struct ugen_softc *sc; struct ugen_endpoint *sce; @@ -1350,7 +1350,7 @@ ugenpoll(dev_t dev, int events, struct proc *p) if (sce->q.c_cc > 0) revents |= events & (POLLIN | POLLRDNORM); else - selrecord(p, &sce->rsel); + selrecord(td, &sce->rsel); } break; case UE_ISOCHRONOUS: @@ -1358,7 +1358,7 @@ ugenpoll(dev_t dev, int events, struct proc *p) if (sce->cur != sce->fill) revents |= events & (POLLIN | POLLRDNORM); else - selrecord(p, &sce->rsel); + selrecord(td, &sce->rsel); } break; case UE_BULK: diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 5ae6070..7358fe1 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1613,7 +1613,7 @@ uhci_abort_xfer(usbd_xfer_handle xfer, usbd_status status) timeout(uhci_abort_xfer_end, xfer, hz / USB_FRAMES_PER_SECOND); } else { #if defined(DIAGNOSTIC) && defined(__i386__) && defined(__FreeBSD__) - KASSERT(curproc->p_intr_nesting_level == 0, + KASSERT(curthread->td_intr_nesting_level == 0, ("ohci_abort_req in interrupt context")); #endif usb_delay_ms(xfer->pipe->device->bus, 1); diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index cffc5e5..7914cb3 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -163,7 +163,7 @@ Static void uhid_intr(usbd_xfer_handle, usbd_private_handle, Static int uhid_do_read(struct uhid_softc *, struct uio *uio, int); Static int uhid_do_write(struct uhid_softc *, struct uio *uio, int); Static int uhid_do_ioctl(struct uhid_softc *, u_long, caddr_t, int, - struct proc *); + struct thread *); USB_DECLARE_DRIVER(uhid); @@ -373,11 +373,11 @@ uhid_intr(xfer, addr, status) } int -uhidopen(dev, flag, mode, p) +uhidopen(dev, flag, mode, td) dev_t dev; int flag; int mode; - struct proc *p; + struct thread *td; { struct uhid_softc *sc; usbd_status err; @@ -422,11 +422,11 @@ uhidopen(dev, flag, mode, p) } int -uhidclose(dev, flag, mode, p) +uhidclose(dev, flag, mode, td) dev_t dev; int flag; int mode; - struct proc *p; + struct thread *td; { struct uhid_softc *sc; @@ -588,12 +588,12 @@ uhidwrite(dev, uio, flag) } int -uhid_do_ioctl(sc, cmd, addr, flag, p) +uhid_do_ioctl(sc, cmd, addr, flag, td) struct uhid_softc *sc; u_long cmd; caddr_t addr; int flag; - struct proc *p; + struct thread *td; { struct usb_ctl_report_desc *rd; struct usb_ctl_report *re; @@ -614,8 +614,8 @@ uhid_do_ioctl(sc, cmd, addr, flag, p) if (*(int *)addr) { if (sc->sc_async != NULL) return (EBUSY); - sc->sc_async = p; - DPRINTF(("uhid_do_ioctl: FIOASYNC %p\n", p)); + sc->sc_async = td->td_proc; /* XXXKSE */ + DPRINTF(("uhid_do_ioctl: FIOASYNC %p\n", td->td_proc)); } else sc->sc_async = NULL; break; @@ -703,12 +703,12 @@ uhid_do_ioctl(sc, cmd, addr, flag, p) } int -uhidioctl(dev, cmd, addr, flag, p) +uhidioctl(dev, cmd, addr, flag, td) dev_t dev; u_long cmd; caddr_t addr; int flag; - struct proc *p; + struct thread *td; { struct uhid_softc *sc; int error; @@ -716,17 +716,17 @@ uhidioctl(dev, cmd, addr, flag, p) USB_GET_SC(uhid, UHIDUNIT(dev), sc); sc->sc_refcnt++; - error = uhid_do_ioctl(sc, cmd, addr, flag, p); + error = uhid_do_ioctl(sc, cmd, addr, flag, td); if (--sc->sc_refcnt < 0) usb_detach_wakeup(USBDEV(sc->sc_dev)); return (error); } int -uhidpoll(dev, events, p) +uhidpoll(dev, events, td) dev_t dev; int events; - struct proc *p; + struct thread *td; { struct uhid_softc *sc; int revents = 0; @@ -744,7 +744,7 @@ uhidpoll(dev, events, p) if (sc->sc_q.c_cc > 0) revents |= events & (POLLIN | POLLRDNORM); else - selrecord(p, &sc->sc_rsel); + selrecord(td, &sc->sc_rsel); } splx(s); diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 524bc83..052583b 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -467,7 +467,7 @@ int ulptusein = 1; * Reset the printer, then wait until it's selected and not busy. */ int -ulptopen(dev_t dev, int flag, int mode, struct proc *p) +ulptopen(dev_t dev, int flag, int mode, struct thread *td) { u_char flags = ULPTFLAGS(dev); struct ulpt_softc *sc; @@ -586,7 +586,7 @@ ulpt_statusmsg(u_char status, struct ulpt_softc *sc) } int -ulptclose(dev_t dev, int flag, int mode, struct proc *p) +ulptclose(dev_t dev, int flag, int mode, struct thread *td) { struct ulpt_softc *sc; @@ -676,7 +676,7 @@ ulptwrite(dev_t dev, struct uio *uio, int flags) } int -ulptioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) +ulptioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int error = 0; diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 05c9a47..ad24d94 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -571,10 +571,10 @@ umodemparam(tp, t) } int -umodemopen(dev, flag, mode, p) +umodemopen(dev, flag, mode, td) dev_t dev; int flag, mode; - struct proc *p; + struct thread *td; { int unit = UMODEMUNIT(dev); struct umodem_softc *sc; @@ -599,7 +599,7 @@ umodemopen(dev, flag, mode, p) if (ISSET(tp->t_state, TS_ISOPEN) && ISSET(tp->t_state, TS_XCLUDE) && - suser(p)) + suser_td(td)) return (EBUSY); /* @@ -781,10 +781,10 @@ umodemreadcb(xfer, p, status) } int -umodemclose(dev, flag, mode, p) +umodemclose(dev, flag, mode, td) dev_t dev; int flag, mode; - struct proc *p; + struct thread *td; { struct umodem_softc *sc; struct tty *tp; @@ -924,12 +924,12 @@ umodemtty(dev) } int -umodemioctl(dev, cmd, data, flag, p) +umodemioctl(dev, cmd, data, flag, td) dev_t dev; u_long cmd; caddr_t data; int flag; - struct proc *p; + struct thread *td; { struct umodem_softc *sc; struct tty *tp; @@ -946,12 +946,12 @@ umodemioctl(dev, cmd, data, flag, p) DPRINTF(("umodemioctl: cmd=0x%08lx\n", cmd)); - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p); + error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); if (error >= 0) return (error); #if defined(__NetBSD__) || defined(__OpenBSD__) - error = ttioctl(tp, cmd, data, flag, p); + error = ttioctl(tp, cmd, data, flag, td); #elif defined(__FreeBSD__) error = ttioctl(tp, cmd, data, flag); #endif diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index ffabb7b..2a72120 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -586,7 +586,7 @@ ums_disable(priv) } Static int -ums_open(dev_t dev, int flag, int fmt, struct proc *p) +ums_open(dev_t dev, int flag, int fmt, struct thread *td) { struct ums_softc *sc; @@ -596,7 +596,7 @@ ums_open(dev_t dev, int flag, int fmt, struct proc *p) } Static int -ums_close(dev_t dev, int flag, int fmt, struct proc *p) +ums_close(dev_t dev, int flag, int fmt, struct thread *td) { struct ums_softc *sc; @@ -682,7 +682,7 @@ ums_read(dev_t dev, struct uio *uio, int flag) } Static int -ums_poll(dev_t dev, int events, struct proc *p) +ums_poll(dev_t dev, int events, struct thread *td) { struct ums_softc *sc; int revents = 0; @@ -699,7 +699,7 @@ ums_poll(dev_t dev, int events, struct proc *p) revents = events & (POLLIN | POLLRDNORM); } else { sc->state |= UMS_SELECT; - selrecord(p, &sc->rsel); + selrecord(td, &sc->rsel); } } splx(s); @@ -708,7 +708,7 @@ ums_poll(dev_t dev, int events, struct proc *p) } int -ums_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) +ums_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct ums_softc *sc; int error = 0; diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index 1e86195..e1ad11b 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -291,11 +291,11 @@ USB_ATTACH(urio) int -urioopen(dev, flag, mode, p) +urioopen(dev, flag, mode, td) dev_t dev; int flag; int mode; - struct proc *p; + struct thread *td; { #if (USBDI >= 1) struct urio_softc * sc; @@ -335,11 +335,11 @@ urioopen(dev, flag, mode, p) } int -urioclose(dev, flag, mode, p) +urioclose(dev, flag, mode, td) dev_t dev; int flag; int mode; - struct proc *p; + struct thread *td; { #if (USBDI >= 1) struct urio_softc * sc; @@ -509,12 +509,12 @@ uriowrite(dev, uio, flag) int -urioioctl(dev, cmd, addr, flag, p) +urioioctl(dev, cmd, addr, flag, td) dev_t dev; u_long cmd; caddr_t addr; int flag; - struct proc *p; + struct thread *td; { #if (USBDI >= 1) struct urio_softc * sc; @@ -584,7 +584,7 @@ urioioctl(dev, cmd, addr, flag, p) uio.uio_rw = req.bmRequestType & UT_READ ? UIO_READ : UIO_WRITE; - uio.uio_procp = p; + uio.uio_td = td; ptr = malloc(len, M_TEMP, M_WAITOK); if (uio.uio_rw == UIO_WRITE) { error = uiomove(ptr, len, &uio); diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 2b4ad42..9457ef2 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -129,7 +129,7 @@ d_open_t usbopen; d_close_t usbclose; d_read_t usbread; d_ioctl_t usbioctl; -int usbpoll(dev_t, int, struct proc *); +d_poll_t usbpoll; struct cdevsw usb_cdevsw = { /* open */ usbopen, @@ -336,10 +336,10 @@ usbctlprint(aux, pnp) #endif /* defined(__NetBSD__) || defined(__OpenBSD__) */ int -usbopen(dev, flag, mode, p) +usbopen(dev, flag, mode, td) dev_t dev; int flag, mode; - struct proc *p; + struct thread *td; { int unit = USBUNIT(dev); struct usb_softc *sc; @@ -398,10 +398,10 @@ usbread(dev, uio, flag) } int -usbclose(dev, flag, mode, p) +usbclose(dev, flag, mode, td) dev_t dev; int flag, mode; - struct proc *p; + struct thread *td; { int unit = USBUNIT(dev); @@ -414,12 +414,12 @@ usbclose(dev, flag, mode, p) } int -usbioctl(devt, cmd, data, flag, p) +usbioctl(devt, cmd, data, flag, td) dev_t devt; u_long cmd; caddr_t data; int flag; - struct proc *p; + struct thread *td; { struct usb_softc *sc; int unit = USBUNIT(devt); @@ -432,7 +432,7 @@ usbioctl(devt, cmd, data, flag, p) case FIOASYNC: if (*(int *)data) - usb_async_proc = p; + usb_async_proc = td->td_proc; else usb_async_proc = 0; return (0); @@ -492,7 +492,7 @@ usbioctl(devt, cmd, data, flag, p) uio.uio_rw = ur->request.bmRequestType & UT_READ ? UIO_READ : UIO_WRITE; - uio.uio_procp = p; + uio.uio_td = td; ptr = malloc(len, M_TEMP, M_WAITOK); if (uio.uio_rw == UIO_WRITE) { error = uiomove(ptr, len, &uio); @@ -545,10 +545,10 @@ usbioctl(devt, cmd, data, flag, p) } int -usbpoll(dev, events, p) +usbpoll(dev, events, td) dev_t dev; int events; - struct proc *p; + struct thread *td; { int revents, mask, s; int unit = USBUNIT(dev); @@ -562,7 +562,7 @@ usbpoll(dev, events, p) revents |= events & mask; if (revents == 0 && (events & mask)) { DPRINTFN(2,("usb: sleeping on %p\n", &usb_selevent)); - selrecord(p, &usb_selevent); + selrecord(curthread, &usb_selevent); } splx(s); diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 9acffce..20d6a03 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -931,7 +931,7 @@ usbd_do_request_flags(dev, req, data, flags, actlen) #ifdef DIAGNOSTIC #if defined(__i386__) && defined(__FreeBSD__) - KASSERT(curproc->p_intr_nesting_level == 0, + KASSERT(curthread->td_intr_nesting_level == 0, ("usbd_do_request: in interrupt context")); #endif if (dev->bus->intr_context) { diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 46728bc..bd33a20 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -325,11 +325,11 @@ USB_ATTACH(uscanner) } int -uscanneropen(dev, flag, mode, p) +uscanneropen(dev, flag, mode, td) dev_t dev; int flag; int mode; - struct proc *p; + struct thread *td; { struct uscanner_softc *sc; int unit = USCANNERUNIT(dev); @@ -388,11 +388,11 @@ uscanneropen(dev, flag, mode, p) } int -uscannerclose(dev, flag, mode, p) +uscannerclose(dev, flag, mode, td) dev_t dev; int flag; int mode; - struct proc *p; + struct thread *td; { struct uscanner_softc *sc; @@ -639,10 +639,10 @@ USB_DETACH(uscanner) } int -uscannerpoll(dev, events, p) +uscannerpoll(dev, events, td) dev_t dev; int events; - struct proc *p; + struct thread *td; { struct uscanner_softc *sc; int revents = 0; |