lkml.org 
[lkml]   [2005]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [linux-usb-devel] [PATCH] hiddev: output reports are dropped when HIDIOCSREPORT is called in short succession
Date
Stefan Nickl wrote:
> Hi,
>
> when trying to make the hiddev driver issue several Set_Report control
> transfers to a custom device with 2.6.13-rc6, only the first transfer
> in a row is carried out, while others immediately following it are
> silently dropped.
>
> This happens where hid_submit_report() (in hid-core.c) tests for
> HID_CTRL_RUNNING, which seems to be still set because the first
> transfer is not finished yet.
>
> As a workaround, inserting a delay between the two calls to
> ioctl(HIDIOCSREPORT) in userspace "solves" the problem.
> The straightforward fix is to add a call to hid_wait_io() to the
> implementation of HIDIOCSREPORT (in hiddev.c), just like for
> HIDIOCGREPORT. Works fine for me.

Yup, I've seen the same issue on the apcupsd project. I added the
hid_wait_io() call to HIDIOCGREPORT a while back since it used to suffer
from the same problem. I'd have no objection to making HIDIOCSREPORT
synchronous as well.

--Adam

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

\
 
 \ /
  Last update: 2005-08-22 23:59    [W:0.226 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site