diff mbox

[RFC,1/2] HID: usbhid, new quirk to force out reports on the control ep

Message ID 1287003458-3791-2-git-send-email-ospite@studenti.unina.it (mailing list archive)
State Rejected
Headers show

Commit Message

Antonio Ospite Oct. 13, 2010, 8:57 p.m. UTC
None
diff mbox

Patch

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) {