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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
e10e1bec8e
commit
951fd8ee6a
@@ -136,7 +136,7 @@ try_iso:
|
|||||||
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 @@ found:
|
|||||||
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
|
||||||
|
Reference in New Issue
Block a user