Skip to contentSkip to conversation

Drivers: hid: hid-hyperv: Implement a stub raw_request() entry point

PATCH In review K. Y. Srinivasan 3 participants 4 messages Mar 28, 2014 – Mar 29, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Drivers: hid: hid-hyperv: Implement a stub raw_request() entry point

commit 3c86726cfe38952f0366f86acfbbb025813ec1c2

Author: Benjamin Tissoires <[email protected]>
Date:   Thu Feb 20 15:24:49 2014 -0500

HID: make .raw_request mandatory

SET_REPORT and GET_REPORT are mandatory in the HID specification. Make the corresponding API in hid-core mandatory too, which removes the need to test against it in some various places.

Made .raw_request mandatory and broke the Hyper-V mouse driver. This patch fixes the problem.

---
 drivers/hid/hid-hyperv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/hid/hid-hyperv.c +10 -0
index c24908f..89a9234 100644
@@ -460,12 +460,22 @@ static void mousevsc_hid_stop(struct hid_device *hid)
 {
 }
 
+static int mousevsc_hid_raw_request(struct hid_device *hid,
+				    unsigned char report_num,
+				    __u8 buf, size_t len,
+				    unsigned char rtype,
+				    int reqtype)
+{
+	return 0;
+}
+
 static struct hid_ll_driver mousevsc_ll_driver = {
 	.parse = mousevsc_hid_parse,
 	.open = mousevsc_hid_open,
 	.close = mousevsc_hid_close,
 	.start = mousevsc_hid_start,
 	.stop = mousevsc_hid_stop,
+	.raw_request = mousevsc_hid_raw_request,
 };
 
 static struct hid_driver mousevsc_hid_driver;
Signature · 1 line
1.7.4.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · K. Y. Srinivasan

commit 3c86726cfe38952f0366f86acfbbb025813ec1c2

Author: Benjamin Tissoires <[email protected]>
Date:   Thu Feb 20 15:24:49 2014 -0500

HID: make .raw_request mandatory

SET_REPORT and GET_REPORT are mandatory in the HID specification. Make the corresponding API in hid-core mandatory too, which removes the need to test against it in some various places.

Quoted 6 lines

Made .raw_request mandatory and broke the Hyper-V mouse driver. This patch fixes the problem.

---

Thanks for spotting and fixing this K. Y.

Cheers,
Benjamin

#2 lore raw
In reply to K. Y. Srinivasan
Quoted 27 lines · K. Y. Srinivasan

commit 3c86726cfe38952f0366f86acfbbb025813ec1c2

Author: Benjamin Tissoires <[email protected]>
Date:   Thu Feb 20 15:24:49 2014 -0500

HID: make .raw_request mandatory

SET_REPORT and GET_REPORT are mandatory in the HID specification. Make the corresponding API in hid-core mandatory too, which removes the need to test against it in some various places.

Made .raw_request mandatory and broke the Hyper-V mouse driver. This patch fixes the problem.

---
 drivers/hid/hid-hyperv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/hid/hid-hyperv.c +0 -0
index c24908f..89a9234 100644

drivers/hid/hid-hyperv.c static void mousevsc_hid_stop(struct hid_device *hid) · line 465

Quoted 6 lines
drivers/hid/hid-hyperv.c +3 -0
@@ -460,12 +460,22 @@ static void mousevsc_hid_stop(struct hid_device *hid)
 {
 }
 
+static int mousevsc_hid_raw_request(struct hid_device *hid,
+				    unsigned char report_num,
+				    __u8 buf, size_t len,

This should be __u8 *buf. I have fixed that and applied.

Signature · 2 lines
Jiri Kosina
SUSE Labs
#3 lore raw
Quoted 43 lines

-----Original Message-----
From: Jiri Kosina [mailto:[email protected]]
Sent: Friday, March 28, 2014 6:43 PM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] Drivers: hid: hid-hyperv: Implement a stub raw_request() entry point

Quoted 8 lines · K. Y. Srinivasan

commit 3c86726cfe38952f0366f86acfbbb025813ec1c2

Author: Benjamin Tissoires <[email protected]>
Date:   Thu Feb 20 15:24:49 2014 -0500

HID: make .raw_request mandatory

SET_REPORT and GET_REPORT are mandatory in the HID specification. Make the corresponding API in hid-core mandatory too, which removes

the

Quoted 21 lines

need to test against it in some various places.

Made .raw_request mandatory and broke the Hyper-V mouse driver. This patch fixes the problem.

---
 drivers/hid/hid-hyperv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/hid/hid-hyperv.c index renamed from drivers/hid/hid-hyperv.c +0 -0

c24908f..89a9234 100644

drivers/hid/hid-hyperv.c +0 -0
@@ -460,12 +460,22 @@ static void mousevsc_hid_stop(struct hid_device
 *hid)  {  }
 
Quoted 5 lines

drivers/hid/hid-hyperv.c static void mousevsc_hid_stop(struct hid_device *hid) · line 465

Quoted 3 lines
drivers/hid/hid-hyperv.c +3 -0
+static int mousevsc_hid_raw_request(struct hid_device *hid,
+				    unsigned char report_num,
+				    __u8 buf, size_t len,

This should be __u8 *buf. I have fixed that and applied.

Thanks Jiri,

K. Y

Quoted 4 lines

--
Jiri Kosina
SUSE Labs