hid_submit_ctrl and hid_submit_out should return error
codes when HID_REPORTED_IDLE is set by hid_suspend.
This will allow the output and control completion
handlers to clear HID_OUT_RUNNING and HID_CTRL_RUNNING
so hid_suspend succeeds.
Previously, if there were outstanding out messages
or control messages while hid_suspend was called,
hid_suspend would fail because usbhid_wait_io would time
out.
This condition happens with USB keyboards with both capslock and
numlock leds enabled at suspend time. Control requests
will come down to the hid-core to disable both leds, with
hid_suspend being called between the two being submitted.
Signed-off-by: Benson Leung <bleung@chromium.org>
---
drivers/hid/usbhid/hid-core.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
Ping. Would someone in linux-usb take a look at this fix?
Thanks,
Benson
On Fri, Sep 2, 2011 at 5:07 PM, Benson Leung [off-list ref] wrote:
quoted hunk
hid_submit_ctrl and hid_submit_out should return error
codes when HID_REPORTED_IDLE is set by hid_suspend.
This will allow the output and control completion
handlers to clear HID_OUT_RUNNING and HID_CTRL_RUNNING
so hid_suspend succeeds.
Previously, if there were outstanding out messages
or control messages while hid_suspend was called,
hid_suspend would fail because usbhid_wait_io would time
out.
This condition happens with USB keyboards with both capslock and
numlock leds enabled at suspend time. Control requests
will come down to the hid-core to disable both leds, with
hid_suspend being called between the two being submitted.
Signed-off-by: Benson Leung <bleung@chromium.org>
---
drivers/hid/usbhid/hid-core.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
--
Benson Leung
Software Engineer, Chrom* OS
bleung@chromium.org
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html