lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 27 Mar 2010 21:52:23 +1000
From:	Adam Nielsen <a.nielsen@...kadi.net>
To:	Jiri Kosina <jkosina@...e.cz>
CC:	LKML Mailinglist <linux-kernel@...r.kernel.org>
Subject: Re: usbhid: How to wait for response after submitting report

>> 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?
> 
> 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.

Thanks Jiri, it's probably because I still don't know what I'm doing :-)  Can
you point me at any HID examples that show how to use a completion handler?
I'm afraid after hours of staring at HID code I'm still none the wiser as to
how this part of the system works.

Basically I have a USB HID device, and it works by submitting a HID report,
then waiting until it replies with (I assume) another HID report.  The
messages are all proprietary.  I can send the reports fine, but half the time
I get garbage coming back, which I assume is because I'm not getting the
message quickly enough and processing whatever was in the buffer instead.

If you're able to point me in the direction of an example showing how to set
up and use a completion handler, hopefully I can change my code to work like
that instead.

Many thanks,
Adam.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ