public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Nielsen <a.nielsen@shikadi.net>
To: LKML Mailinglist <linux-kernel@vger.kernel.org>
Subject: usbhid: How to wait for response after submitting report
Date: Sat, 13 Mar 2010 13:10:39 +1000	[thread overview]
Message-ID: <4B9B022F.6060402@shikadi.net> (raw)

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)

             reply	other threads:[~2010-03-13  3:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-13  3:10 Adam Nielsen [this message]
2010-03-15 16:07 ` usbhid: How to wait for response after submitting report Jiri Kosina
2010-03-27 11:52   ` Adam Nielsen
2010-03-30 12:10     ` Jiri Kosina
2010-03-30 12:21       ` Adam Nielsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B9B022F.6060402@shikadi.net \
    --to=a.nielsen@shikadi.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox