From patchwork Wed Oct 13 20:57:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 251391 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9DKwYl3029399 for ; Wed, 13 Oct 2010 20:58:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751083Ab0JMU6e (ORCPT ); Wed, 13 Oct 2010 16:58:34 -0400 Received: from smtp204.alice.it ([82.57.200.100]:48535 "EHLO smtp204.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751486Ab0JMU6d (ORCPT ); Wed, 13 Oct 2010 16:58:33 -0400 Received: from jcn (79.3.140.53) by smtp204.alice.it (8.5.124.08) id 4C88E33B02A3F2B8; Wed, 13 Oct 2010 22:58:31 +0200 Received: from ao2 by jcn with local (Exim 4.72) (envelope-from ) id 1P68P6-0000zm-VH; Wed, 13 Oct 2010 22:58:28 +0200 From: Antonio Ospite To: linux-input@vger.kernel.org Cc: Antonio Ospite , Alan Ott , Jiri Kosina , Jim Paris , "Ranulf Doswell" , =?UTF-8?q?Mikko=20Virkkil=C3=A4?= , falktx@gmail.com Subject: [RFC, PATCH 1/2] HID: usbhid, new quirk to force out reports on the control ep Date: Wed, 13 Oct 2010 22:57:37 +0200 Message-Id: <1287003458-3791-2-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.7.1 In-Reply-To: <4CA9DD89.2010106@signal11.us> References: <4CA9DD89.2010106@signal11.us> X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 13 Oct 2010 20:58:39 +0000 (UTC) diff --git a/include/linux/hid.h b/include/linux/hid.h index 1b95b0b..936b7a3 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -313,6 +313,7 @@ struct hid_item { #define HID_QUIRK_MULTI_INPUT 0x00000040 #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 +#define HID_QUIRK_FORCE_OUT_CONTROL_EP 0x00020000 #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 #define HID_QUIRK_NO_IGNORE 0x40000000 diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index df80532..81dadf8 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -841,7 +841,8 @@ static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t co struct usb_host_interface *interface = intf->cur_altsetting; int ret; - if (usbhid->urbout && report_type != HID_FEATURE_REPORT) { + if (usbhid->urbout && report_type != HID_FEATURE_REPORT && + !(hid->quirks & HID_QUIRK_FORCE_OUT_CONTROL_EP)) { int actual_length; int skipped_report_id = 0; if (buf[0] == 0x0) {