提交 951fd8ee 编写于 作者: M Ming Lei 提交者: 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: NMing Lei <tom.leiming@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 e10e1bec
......@@ -136,7 +136,7 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf)
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 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册