Commit 951fd8ee6a9493f80bc5bccf2c8cfa1535c6ce15
Committed by
Greg Kroah-Hartman
1 parent
e10e1bec8e
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
drivers/usb/misc/usbtest.c
... | ... | @@ -136,7 +136,7 @@ |
136 | 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 | 140 | goto found; |
141 | 141 | } |
142 | 142 | return -EINVAL; |
... | ... | @@ -162,6 +162,9 @@ |
162 | 162 | dev->in_iso_pipe = usb_rcvisocpipe (udev, |
163 | 163 | iso_in->desc.bEndpointAddress |
164 | 164 | & USB_ENDPOINT_NUMBER_MASK); |
165 | + } | |
166 | + | |
167 | + if (iso_out) { | |
165 | 168 | dev->iso_out = &iso_out->desc; |
166 | 169 | dev->out_iso_pipe = usb_sndisocpipe (udev, |
167 | 170 | iso_out->desc.bEndpointAddress |