When transfer type is isochronous, the other bits (bits 5..2) of bmAttributes in endpoint descriptor might not be set zero. So it's better to mask bmAttributes with USB_ENDPOINT_XFERTYPE_MASK to judge the transfter type later. Signed-off-by: Huang Rui <ray.huang@xxxxxxx> --- drivers/usb/misc/usbtest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index aa28ac8..c69f199 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -120,7 +120,8 @@ get_endpoints(struct usbtest_dev *dev, struct usb_interface *intf) struct usb_host_endpoint *e; e = alt->endpoint + ep; - switch (e->desc.bmAttributes) { + switch (e->desc.bmAttributes & + USB_ENDPOINT_XFERTYPE_MASK) { case USB_ENDPOINT_XFER_BULK: break; case USB_ENDPOINT_XFER_ISOC: -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html