svn commit: r235569 - head/sys/dev/usb/input
Alexander Motin
mav at FreeBSD.org
Thu May 17 22:04:18 UTC 2012
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]);
More information about the svn-src-all
mailing list