Date: Wed, 30 Aug 2006 18:33:16 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 105345 for review Message-ID: <200608301833.k7UIXGmu006900@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=105345 Change 105345 by hselasky@hselasky_mini_itx on 2006/08/30 18:32:57 Allow the USB-cdev sleep routine to take a timeout as an argument. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/uhid.c#8 edit .. //depot/projects/usb/src/sys/dev/usb/ulpt.c#12 edit .. //depot/projects/usb/src/sys/dev/usb/usb_cdev.c#6 edit .. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#19 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/uhid.c#8 (text+ko) ==== @@ -399,7 +399,7 @@ usbd_transfer_start(sc->sc_xfer[4]); - error = usb_cdev_sleep(&(sc->sc_cdev), fflags); + error = usb_cdev_sleep(&(sc->sc_cdev), fflags, 0); usbd_transfer_stop(sc->sc_xfer[4]); ==== //depot/projects/usb/src/sys/dev/usb/ulpt.c#12 (text+ko) ==== @@ -469,7 +469,7 @@ usbd_transfer_start(sc->sc_xfer[3]); - error = usb_cdev_sleep(&(sc->sc_cdev), fflags); + error = usb_cdev_sleep(&(sc->sc_cdev), fflags, 0); usbd_transfer_stop(sc->sc_xfer[3]); ==== //depot/projects/usb/src/sys/dev/usb/usb_cdev.c#6 (text+ko) ==== @@ -183,7 +183,8 @@ } static int32_t -usb_cdev_msleep(struct usb_cdev *sc, void *ident, u_int32_t context_bit) +usb_cdev_msleep(struct usb_cdev *sc, void *ident, u_int32_t context_bit, + u_int32_t timeout) { int32_t error; @@ -196,7 +197,7 @@ } int32_t -usb_cdev_sleep(struct usb_cdev *sc, int32_t fflags) +usb_cdev_sleep(struct usb_cdev *sc, int32_t fflags, u_int32_t timeout) { u_int32_t context_bit = usb_cdev_get_context(fflags); @@ -204,7 +205,8 @@ USB_CDEV_FLAG_SLEEP_IOCTL_WR| USB_CDEV_FLAG_WAKEUP_IOCTL_RD| USB_CDEV_FLAG_WAKEUP_IOCTL_WR); - return usb_cdev_msleep(sc, &(sc->sc_wakeup_ioctl), context_bit); + return usb_cdev_msleep(sc, &(sc->sc_wakeup_ioctl), context_bit, + timeout); } void @@ -271,7 +273,7 @@ USB_CDEV_FLAG_SLEEP_IOCTL_WR)) { error = usb_cdev_msleep(sc, &(sc->sc_wakeup_ioctl_rdwr), - temp); + temp, 0); if (error) { goto done; } @@ -629,7 +631,7 @@ error = usb_cdev_msleep(sc, &(sc->sc_wakeup_write), (USB_CDEV_FLAG_SLEEP_WRITE| - USB_CDEV_FLAG_WAKEUP_WRITE)); + USB_CDEV_FLAG_WAKEUP_WRITE), 0); if (error) { break; } @@ -711,7 +713,7 @@ error = usb_cdev_msleep(sc, &(sc->sc_wakeup_read), (USB_CDEV_FLAG_SLEEP_READ| - USB_CDEV_FLAG_WAKEUP_READ)); + USB_CDEV_FLAG_WAKEUP_READ), 0); if (error) { break; } ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.h#19 (text+ko) ==== @@ -1155,7 +1155,7 @@ struct mtx; extern int32_t -usb_cdev_sleep(struct usb_cdev *sc, int32_t fflags); +usb_cdev_sleep(struct usb_cdev *sc, int32_t fflags, u_int32_t timeout); extern void usb_cdev_wakeup(struct usb_cdev *sc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608301833.k7UIXGmu006900>