Author: mav
Date: Thu May 17 22:04:17 2012
New Revision: 235569
URL: http://svn.freebsd.org/changeset/base/235569

Log:
  Fix for the r235558: interrupt output pipe is optional, so fix the driver
  attach and operation when it is absent.
  
  Sponsored by: iXsystems, Inc.
  MFC after:    1 week

Modified:
  head/sys/dev/usb/input/uhid.c

Modified: head/sys/dev/usb/input/uhid.c
==============================================================================
--- head/sys/dev/usb/input/uhid.c       Thu May 17 21:52:17 2012        
(r235568)
+++ head/sys/dev/usb/input/uhid.c       Thu May 17 22:04:17 2012        
(r235569)
@@ -362,7 +362,7 @@ static const struct usb_config uhid_conf
                .type = UE_INTERRUPT,
                .endpoint = UE_ADDR_ANY,
                .direction = UE_DIR_OUT,
-               .flags = {.pipe_bof = 1, },
+               .flags = {.pipe_bof = 1,.no_pipe_ok = 1, },
                .bufsize = UHID_BSIZE,
                .callback = &uhid_intr_write_callback,
        },
@@ -421,7 +421,8 @@ uhid_start_write(struct usb_fifo *fifo)
 {
        struct uhid_softc *sc = usb_fifo_softc(fifo);
 
-       if (sc->sc_flags & UHID_FLAG_IMMED) {
+       if ((sc->sc_flags & UHID_FLAG_IMMED) ||
+           sc->sc_xfer[UHID_INTR_DT_WR] == NULL) {
                usbd_transfer_start(sc->sc_xfer[UHID_CTRL_DT_WR]);
        } else {
                usbd_transfer_start(sc->sc_xfer[UHID_INTR_DT_WR]);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to