diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2014-02-20 15:49:30 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-25 01:07:53 (GMT) |
commit | f080a51bef2caa9b0f647dc430bc608d5723ac29 (patch) | |
tree | d10cd4984eb5988cde6b19c4eb5f082204e3d9e0 /drivers/usb/wusbcore | |
parent | 42d182124801573e06284200d81c3963962e753d (diff) | |
download | linux-f080a51bef2caa9b0f647dc430bc608d5723ac29.tar.xz |
USB: complain if userspace resets an active endpoint
It is an error for a driver to call usb_clear_halt() or
usb_reset_endpoint() while there are URBs queued for the endpoint,
because the end result is not well defined. At the time the endpoint
gets reset, it may or may not be actively running.
As far as I know, no kernel drivers do this. But some userspace
drivers do, and it seems like a good idea to bring this error to their
attention.
This patch adds a warning to the kernel log whenever a program invokes
the USBDEVFS_CLEAR_HALT or USBDEVFS_RESETEP ioctls at an inappropriate
time, and includes the name of the program. This will make it clear
that any subsequent errors are not due to the misbehavior of a kernel
driver.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Suggested-by: Bjørn Mork <bjorn@mork.no>
CC: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/wusbcore')
0 files changed, 0 insertions, 0 deletions