diff options
author | Ming Lei <tom.leiming@gmail.com> | 2010-08-02 16:09:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 23:35:45 +0200 |
commit | 951fd8ee6a9493f80bc5bccf2c8cfa1535c6ce15 (patch) | |
tree | 784239076445b925e323e7cee5b134a8c9eca64e /drivers/usb | |
parent | USB: usbtest: avoid to free coherent buffer in atomic context (diff) | |
download | linux-951fd8ee6a9493f80bc5bccf2c8cfa1535c6ce15.tar.xz linux-951fd8ee6a9493f80bc5bccf2c8cfa1535c6ce15.zip |
USB: usbtest: support test device with only one iso-in or iso-out endpoint
It is very common that one altsetting may include only one iso-in or iso-out
single endpoint, especially for high bandwidth endpoint, so support it.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/usbtest.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index d92b7ec9a230..eef370eb7a54 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -136,7 +136,7 @@ try_iso: iso_out = e; } } - if ((in && out) || (iso_in && iso_out)) + if ((in && out) || iso_in || iso_out) goto found; } return -EINVAL; @@ -162,6 +162,9 @@ found: dev->in_iso_pipe = usb_rcvisocpipe (udev, iso_in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); + } + + if (iso_out) { dev->iso_out = &iso_out->desc; dev->out_iso_pipe = usb_sndisocpipe (udev, iso_out->desc.bEndpointAddress |