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-next>] [day] [month] [year] [list]
Message-ID: <4B9B022F.6060402@shikadi.net>
Date:	Sat, 13 Mar 2010 13:10:39 +1000
From:	Adam Nielsen <a.nielsen@...kadi.net>
To:	LKML Mailinglist <linux-kernel@...r.kernel.org>
Subject: usbhid: How to wait for response after submitting report

Hi all,

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

Many thanks,
Adam.

(Please CC)
--
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