todbot / blink1

Official software for blink(1) USB RGB LED by ThingM
https://blink1.thingm.com/
Other
953 stars 237 forks source link

Linux warning: config 1 interface 0 altsetting 0 has 2 endpoint descriptors, different from the interface descriptor's value: 1 #269

Open hkallweit opened 8 years ago

hkallweit commented 8 years ago

I get this warning with the latest 4.5 next kernel. However the device seems to work normally so far.

dmesg messages when plugged in: usb 1-5: new full-speed USB device number 4 using xhci_hcd usb 1-5: config 1 interface 0 altsetting 0 has 2 endpoint descriptors, different from the interface descriptor's value: 1 usb 1-5: New USB device found, idVendor=27b8, idProduct=01ed usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5: Product: blink(1) mk2 usb 1-5: Manufacturer: ThingM usb 1-5: SerialNumber: 20004844

lsusb -v: Bus 001 Device 005: ID 27b8:01ed ThingM blink(1) Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x27b8 ThingM idProduct 0x01ed blink(1) bcdDevice 0.02 iManufacturer 1 ThingM iProduct 2 blink(1) mk2 iSerial 3 20004844 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 41 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 120mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.01 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 24 Report Descriptors: \ UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 1 can't get device qualifier: Resource temporarily unavailable can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered

hkallweit commented 8 years ago

In hardware/firmware_mk2/usb_descriptors.c I found:

/* Endpoint Descriptor _/ 0x07,/_sizeof(USB_EP_DSC)*/ USB_DESCRIPTOR_ENDPOINT, //Endpoint Descriptor HID_EP | _EP_IN, //EndpointAddress _INTERRUPT, //Attributes 0x08,0x00, //size 0x01, //Interval

// FIXME: this is unneeded for blink(1), but just commenting it out seems to cause problems /* Endpoint Descriptor */ 0x07,//sizeof(USB_EP_DSC) USB_DESCRIPTOR_ENDPOINT, //Endpoint Descriptor HID_EP | _EP_OUT, //EndpointAddress _INTERRUPT, //Attributes 0x08,0x00, //size 0x01 //Interval

So the Linux warning is right, the descriptor is doubled. Therefore the actual question is: To fix which issue on which OS this workaround was added?