From owner-freebsd-bugs@FreeBSD.ORG Thu Nov 7 01:50:03 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C4F3920A for ; Thu, 7 Nov 2013 01:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A3602FD4 for ; Thu, 7 Nov 2013 01:50:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rA71o3qH048648 for ; Thu, 7 Nov 2013 01:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rA71o36i048647; Thu, 7 Nov 2013 01:50:03 GMT (envelope-from gnats) Resent-Date: Thu, 7 Nov 2013 01:50:03 GMT Resent-Message-Id: <201311070150.rA71o36i048647@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Cam Karnes Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4BA1AF1E for ; Thu, 7 Nov 2013 01:39:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 38D292F59 for ; Thu, 7 Nov 2013 01:39:59 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rA71dwib046482 for ; Thu, 7 Nov 2013 01:39:58 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rA71dwu1046481; Thu, 7 Nov 2013 01:39:58 GMT (envelope-from nobody) Message-Id: <201311070139.rA71dwu1046481@oldred.freebsd.org> Date: Thu, 7 Nov 2013 01:39:58 GMT From: Cam Karnes To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/183735: Xbox 360 LEDs won't stop blinking X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 01:50:03 -0000 >Number: 183735 >Category: misc >Synopsis: Xbox 360 LEDs won't stop blinking >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 07 01:50:03 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Cam Karnes >Release: 9.1 >Organization: >Environment: FreeBSD 9.1-RELEASE FreeBSD 9.1-RELEASE #0: Wed Nov 6 17:30:15 EST 2013 /usr/obj/usr/src/sys/XBOXTOP amd64 >Description: The ring of LEDs will not stop blinking after the controller is plugged into a USB port. It's very distracting, and detracts from usage. >How-To-Repeat: Plug in an Xbox 360 controller. >Fix: A reworked patch was applied to uhid.c Credit where credit is due. The original patch was submitted some seven years ago, and this contribution is simply a rework, as the original seems to have been pruned during revisions and rewrites to uhid.c over the years. >From the mailing lists: http://lists.freebsd.org/pipermail/freebsd-usb/2006-May/002212.html Patch attached with submission follows: --- uhid.c 2013-11-06 20:25:25.000000000 -0500 +++ uhid.c.patched 2013-11-06 20:25:04.000000000 -0500 @@ -760,6 +760,12 @@ } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) && (uaa->info.bInterfaceProtocol == UIPROTO_XBOX360_GAMEPAD)) { + static uint8_t reportbuf[] = {1, 3, 0}; + + /* The four LEDs on the gamepad are blinking by default. */ + usbd_req_set_report(uaa->device, NULL, + reportbuf, sizeof(reportbuf), + uaa->info.bIfaceIndex, UHID_OUTPUT_REPORT, 0); /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); >Release-Note: >Audit-Trail: >Unformatted: