diff options
author | Ming Lei <tom.leiming@gmail.com> | 2010-08-02 10:09:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:45 -0400 |
commit | 951fd8ee6a9493f80bc5bccf2c8cfa1535c6ce15 (patch) | |
tree | 784239076445b925e323e7cee5b134a8c9eca64e /drivers/usb/misc | |
parent | e10e1bec8e6654de4591ef45ddd6a6d1e5b2591c (diff) |
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/misc')
-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: | |||
136 | iso_out = e; | 136 | iso_out = e; |
137 | } | 137 | } |
138 | } | 138 | } |
139 | if ((in && out) || (iso_in && iso_out)) | 139 | if ((in && out) || iso_in || iso_out) |
140 | goto found; | 140 | goto found; |
141 | } | 141 | } |
142 | return -EINVAL; | 142 | return -EINVAL; |
@@ -162,6 +162,9 @@ found: | |||
162 | dev->in_iso_pipe = usb_rcvisocpipe (udev, | 162 | dev->in_iso_pipe = usb_rcvisocpipe (udev, |
163 | iso_in->desc.bEndpointAddress | 163 | iso_in->desc.bEndpointAddress |
164 | & USB_ENDPOINT_NUMBER_MASK); | 164 | & USB_ENDPOINT_NUMBER_MASK); |
165 | } | ||
166 | |||
167 | if (iso_out) { | ||
165 | dev->iso_out = &iso_out->desc; | 168 | dev->iso_out = &iso_out->desc; |
166 | dev->out_iso_pipe = usb_sndisocpipe (udev, | 169 | dev->out_iso_pipe = usb_sndisocpipe (udev, |
167 | iso_out->desc.bEndpointAddress | 170 | iso_out->desc.bEndpointAddress |