]> nv-tegra.nvidia Code Review - linux-3.10.git/commit
[PATCH] USB: usb_bulk_message() handles interrupts endpoints
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 26 Sep 2005 20:22:45 +0000 (16:22 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 23:47:41 +0000 (16:47 -0700)
commitd09d36a91c70cb3cc609d693bf6a7e7a266ff9e6
tree4a41ade8dc775ea6dc9154bc4fe006f75557f579
parentb13296c6617f22e8c0174a7af32780617db0e680
[PATCH] USB: usb_bulk_message() handles interrupts endpoints

Because there is no bulk_interrupt_message() routine and no
USBDEVFS_INTERRUPT ioctl, people have been forced to abuse the
usb_bulk_message() routine and USBDEVFS_BULK by using them for interrupt
transfers as well as bulk transfers.

This patch (as567) formalizes this practice and adds code to
usb_bulk_message() for detecting when the target is really an interrupt
endpoint.  If it is, the routine submits an interrupt URB (using the
default interval) instead of a bulk URB.  In theory this should help HCDs
that don't like it when people try to mix transfer types, queuing both
periodic and non-periodic types for the same endpoint.

Not fully tested -- I don't have any programs that use USBDEVFS_BULK for
interrupt transfers -- but it compiles okay and normal bulk messages work
as well as before.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 drivers/usb/core/message.c |   24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
drivers/usb/core/message.c