Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-20 Thread Rodrigo Rivas Costa
On Tue, Feb 20, 2018 at 05:49:02PM +0100, Benjamin Tissoires wrote: > On Fri, Feb 16, 2018 at 9:59 PM, Rodrigo Rivas Costa > > But about that +7 in hid_alloc_report_buf(), isn't it to make room for > > the implement()/extract() functions? And IIUIC those are not used for > > raw_requests... they ar

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-20 Thread Benjamin Tissoires
On Fri, Feb 16, 2018 at 9:59 PM, Rodrigo Rivas Costa wrote: > On Fri, Feb 16, 2018 at 11:38:11AM +0100, Benjamin Tissoires wrote: >> On Fri, Feb 16, 2018 at 10:57 AM, Rodrigo Rivas Costa >> wrote: >> > On Fri, Feb 16, 2018 at 10:31:35AM +0100, Benjamin Tissoires wrote: >> >> > Ok, I'll do that. T

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-16 Thread Rodrigo Rivas Costa
On Fri, Feb 16, 2018 at 11:38:11AM +0100, Benjamin Tissoires wrote: > On Fri, Feb 16, 2018 at 10:57 AM, Rodrigo Rivas Costa > wrote: > > On Fri, Feb 16, 2018 at 10:31:35AM +0100, Benjamin Tissoires wrote: > >> > Ok, I'll do that. The weird thing, however, is that: > >> > > >> > hid_hw_raw_

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-16 Thread Benjamin Tissoires
On Fri, Feb 16, 2018 at 10:57 AM, Rodrigo Rivas Costa wrote: > On Fri, Feb 16, 2018 at 10:31:35AM +0100, Benjamin Tissoires wrote: >> > Ok, I'll do that. The weird thing, however, is that: >> > >> > hid_hw_raw_request(steam->hid_dev, 0x00, >> > buf, hid_report_len(r), /* 64

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-16 Thread Rodrigo Rivas Costa
On Fri, Feb 16, 2018 at 10:31:35AM +0100, Benjamin Tissoires wrote: > > Ok, I'll do that. The weird thing, however, is that: > > > > hid_hw_raw_request(steam->hid_dev, 0x00, > > buf, hid_report_len(r), /* 64 */ > > HID_FEATURE_REPORT, HID_REQ_GET_REPORT); > >

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-16 Thread Benjamin Tissoires
On Fri, Feb 16, 2018 at 10:02 AM, Rodrigo Rivas Costa wrote: > On Fri, Feb 16, 2018 at 09:44:34AM +0100, Benjamin Tissoires wrote: >> > I have an issue with this one. The problem is that using >> > hid_report_len() on the feature report returns 64. But I must call >> > hid_hw_raw_request() with 65

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-16 Thread Rodrigo Rivas Costa
On Fri, Feb 16, 2018 at 09:44:34AM +0100, Benjamin Tissoires wrote: > > I have an issue with this one. The problem is that using > > hid_report_len() on the feature report returns 64. But I must call > > hid_hw_raw_request() with 65 or it will fail with EOVERFLOW. > > > > Currently I'm allocating a

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-16 Thread Benjamin Tissoires
On Thu, Feb 15, 2018 at 11:16 PM, Rodrigo Rivas Costa wrote: > On Wed, Feb 14, 2018 at 03:51:31PM +0100, Benjamin Tissoires wrote: >> On Tue, Feb 13, 2018 at 1:03 PM, Rodrigo Rivas Costa >> > +#define STEAM_FEATURE_REPORT_SIZE 65 >> > + >> > +static int steam_send_report(struct steam_device *steam

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-15 Thread Rodrigo Rivas Costa
On Wed, Feb 14, 2018 at 03:51:31PM +0100, Benjamin Tissoires wrote: > On Tue, Feb 13, 2018 at 1:03 PM, Rodrigo Rivas Costa > > +#define STEAM_FEATURE_REPORT_SIZE 65 > > + > > +static int steam_send_report(struct steam_device *steam, > > + u8 *cmd, int size) > > +{ > > + int retr

Re: [PATCH 2/3] HID: steam: add serial number information.

2018-02-14 Thread Benjamin Tissoires
On Tue, Feb 13, 2018 at 1:03 PM, Rodrigo Rivas Costa wrote: > This device has a feature report to send and receive commands. > Use it to get the serial number and set the device's uniq value. > > Signed-off-by: Rodrigo Rivas Costa > --- > drivers/hid/hid-steam.c | 89 > +

[PATCH 2/3] HID: steam: add serial number information.

2018-02-13 Thread Rodrigo Rivas Costa
This device has a feature report to send and receive commands. Use it to get the serial number and set the device's uniq value. Signed-off-by: Rodrigo Rivas Costa --- drivers/hid/hid-steam.c | 89 +++-- 1 file changed, 86 insertions(+), 3 deletions(-)