USB: cxacru: Use a bulk/int URB to access the command endpoint
authorSimon Arlott <simon@fire.lp0.eu>
Wed, 1 Sep 2010 17:37:12 +0000 (18:37 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 4 Sep 2010 00:33:41 +0000 (17:33 -0700)
commit902ffc3c707c1d459ea57428a619a807cbe412f9
treed4566411d58755e4872b9426063b10749b2c470e
parent870408c8291015872a7a0b583673a9e56b3e73f4
USB: cxacru: Use a bulk/int URB to access the command endpoint

The command endpoint is either a bulk or interrupt endpoint, but using
the wrong type of transfer causes an error if CONFIG_USB_DEBUG is
enabled after commit f661c6f8c67bd55e93348f160d590ff9edf08904, which
checks for this mismatch.

Detect which type of endpoint it is and use a bulk/int URB as
appropriate. There are other function calls specifying a bulk pipe,
but usb_clear_halt doesn't use the pipe type (only the endpoint) and
usb_bulk_msg auto-detects interrupt transfers.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: stable <stable@kernel.org> [.34 and newer]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/atm/cxacru.c