Commit 951fd8ee authored by Ming Lei's avatar Ming Lei Committed by Greg Kroah-Hartman

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: default avatarMing Lei <tom.leiming@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e10e1bec
...@@ -136,7 +136,7 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf) ...@@ -136,7 +136,7 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf)
iso_out = e; iso_out = e;
} }
} }
if ((in && out) || (iso_in && iso_out)) if ((in && out) || iso_in || iso_out)
goto found; goto found;
} }
return -EINVAL; return -EINVAL;
...@@ -162,6 +162,9 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf) ...@@ -162,6 +162,9 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf)
dev->in_iso_pipe = usb_rcvisocpipe (udev, dev->in_iso_pipe = usb_rcvisocpipe (udev,
iso_in->desc.bEndpointAddress iso_in->desc.bEndpointAddress
& USB_ENDPOINT_NUMBER_MASK); & USB_ENDPOINT_NUMBER_MASK);
}
if (iso_out) {
dev->iso_out = &iso_out->desc; dev->iso_out = &iso_out->desc;
dev->out_iso_pipe = usb_sndisocpipe (udev, dev->out_iso_pipe = usb_sndisocpipe (udev,
iso_out->desc.bEndpointAddress iso_out->desc.bEndpointAddress
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment