Index: usb-devel/drivers/bluetooth/btusb.c =================================================================== --- usb-devel.orig/drivers/bluetooth/btusb.c +++ usb-devel/drivers/bluetooth/btusb.c @@ -1398,6 +1398,7 @@ static int btusb_submit_intr_urb(struct } pipe = usb_rcvintpipe(data->udev, data->intr_ep->bEndpointAddress); + dev_info(&data->intf->dev, "Pipe %x ep %p\n", pipe, data->intr_ep); usb_fill_int_urb(urb, data->udev, pipe, buf, size, btusb_intr_complete, hdev, data->intr_ep->bInterval); @@ -4283,6 +4284,9 @@ static int btusb_probe(struct usb_interf if (!data->intr_ep && usb_endpoint_is_int_in(ep_desc)) { data->intr_ep = ep_desc; + dev_info(&intf->dev, "Ep %p epaddr %x epattr %x\n", + ep_desc, ep_desc->bEndpointAddress, + ep_desc->bmAttributes); continue; } Index: usb-devel/drivers/usb/core/urb.c =================================================================== --- usb-devel.orig/drivers/usb/core/urb.c +++ usb-devel/drivers/usb/core/urb.c @@ -208,8 +208,11 @@ int usb_pipe_type_check(struct usb_devic ep = usb_pipe_endpoint(dev, pipe); if (!ep) return -EINVAL; - if (usb_pipetype(pipe) != pipetypes[usb_endpoint_type(&ep->desc)]) + if (usb_pipetype(pipe) != pipetypes[usb_endpoint_type(&ep->desc)]) { + dev_info(&dev->dev, "Error pipe %x ep %p epaddr %x\n", + pipe, &ep->desc, ep->desc.bEndpointAddress); return -EINVAL; + } return 0; } EXPORT_SYMBOL_GPL(usb_pipe_type_check); Index: usb-devel/drivers/usb/core/config.c =================================================================== --- usb-devel.orig/drivers/usb/core/config.c +++ usb-devel/drivers/usb/core/config.c @@ -287,6 +287,13 @@ static int usb_parse_endpoint(struct dev goto skip_to_next_endpoint_or_interface_descriptor; } + if (d->bEndpointAddress & + ~(USB_ENDPOINT_DIR_MASK | USB_ENDPOINT_NUMBER_MASK)) { + dev_notice(ddev, "config %d interface %d altsetting %d has an invalid endpoint descriptor with address 0x%02x, skipping\n", + cfgno, inum, asnum, d->bEndpointAddress); + goto skip_to_next_endpoint_or_interface_descriptor; + } + /* Only store as many endpoints as we have room for */ if (ifp->desc.bNumEndpoints >= num_ep) goto skip_to_next_endpoint_or_interface_descriptor;