Skip to content

Commit 951fd8e

Browse files
ming1gregkh
authored andcommitted
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>
1 parent e10e1be commit 951fd8e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎drivers/usb/misc/usbtest.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf)
136136
iso_out = e;
137137
}
138138
}
139-
if ((in && out) || (iso_in && iso_out))
139+
if ((in && out) || iso_in || iso_out)
140140
goto found;
141141
}
142142
return -EINVAL;
@@ -162,6 +162,9 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf)
162162
dev->in_iso_pipe = usb_rcvisocpipe (udev,
163163
iso_in->desc.bEndpointAddress
164164
& USB_ENDPOINT_NUMBER_MASK);
165+
}
166+
167+
if (iso_out) {
165168
dev->iso_out = &iso_out->desc;
166169
dev->out_iso_pipe = usb_sndisocpipe (udev,
167170
iso_out->desc.bEndpointAddress

0 commit comments

Comments
 (0)