From owner-svn-src-all@FreeBSD.ORG Wed Jul 16 06:23:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC85C594; Wed, 16 Jul 2014 06:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B981F2210; Wed, 16 Jul 2014 06:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G6NsGZ081235; Wed, 16 Jul 2014 06:23:54 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G6NsOn081234; Wed, 16 Jul 2014 06:23:54 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201407160623.s6G6NsOn081234@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 16 Jul 2014 06:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268739 - stable/9/sys/dev/usb/input X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Wed, 16 Jul 2014 06:23:54 -0000 Author: hselasky Date: Wed Jul 16 06:23:54 2014 New Revision: 268739 URL: http://svnweb.freebsd.org/changeset/base/268739 Log: MFC r268583: Turn off blinking device leds at attach. PR: 183735 Modified: stable/9/sys/dev/usb/input/uhid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/uhid.c ============================================================================== --- stable/9/sys/dev/usb/input/uhid.c Wed Jul 16 06:22:35 2014 (r268738) +++ stable/9/sys/dev/usb/input/uhid.c Wed Jul 16 06:23:54 2014 (r268739) @@ -759,9 +759,20 @@ uhid_attach(device_t dev) sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && - (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && + (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && (uaa->info.bInterfaceProtocol == UIPROTO_XBOX360_GAMEPAD)) { - + static const uint8_t reportbuf[3] = {1, 3, 0}; + /* + * Turn off the four LEDs on the gamepad which + * are blinking by default: + */ + error = usbd_req_set_report(uaa->device, NULL, + __DECONST(void *, reportbuf), sizeof(reportbuf), + uaa->info.bIfaceIndex, UHID_OUTPUT_REPORT, 0); + if (error) { + DPRINTF("set output report failed, error=%s (ignored)\n", + usbd_errstr(error)); + } /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr;