[lkml]   [2010]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: usbhid: How to wait for response after submitting report
On Sat, 13 Mar 2010, Adam Nielsen wrote:

> I'm working on a USB HID driver, but my driver seems to be receiving bad data.
> I think it's because usbhid_submit_report is non-blocking and I'm not
> correctly waiting for a response. I'm not sure though, because none of the
> existing usbhid drivers seem to work in this way.
> Could someone please let me know if I'm going about this the right way?
> odin_psu->report->field[0]->value[0] = msg;
> odin_psu->report->field[0]->value[1] = 0x01;
> usbhid_submit_report(odin_psu->hdev, odin_psu->report, USB_DIR_OUT);
> usbhid_wait_io(odin_psu->hdev);
> usbhid_submit_report(odin_psu->hdev, odin_psu->report_in, USB_DIR_IN);
> usbhid_wait_io(odin_psu->hdev);

Hi Adam,

I am afraid you'll have to explain in more detail what exactly you are
tying to achieve, and why the way the current HID code does it (i.e. URB
gets submitted, completion handler is called when completed) doesn't work
for you.


Jiri Kosina
SUSE Labs, Novell Inc.

 \ /
  Last update: 2010-03-15 17:09    [W:0.054 / U:24.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site