Date: Thu, 17 May 2012 22:04:17 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r235569 - head/sys/dev/usb/input Message-ID: <201205172204.q4HM4H2U019021@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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]);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205172204.q4HM4H2U019021>