From owner-svn-src-all@FreeBSD.ORG Thu May 17 22:04:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3767A106564A; Thu, 17 May 2012 22:04:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22EB78FC1B; Thu, 17 May 2012 22:04:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HM4HZc019023; Thu, 17 May 2012 22:04:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HM4H2U019021; Thu, 17 May 2012 22:04:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205172204.q4HM4H2U019021@svn.freebsd.org> From: Alexander Motin Date: Thu, 17 May 2012 22:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235569 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 22:04:18 -0000 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]);