Xiaofan Chen <xiaofanc@xxxxxxxxx> writes: > On Sun, Sep 9, 2012 at 6:04 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: >> On Sat, 8 Sep 2012, Florian Wöhrl wrote: >>> I first thought it might be the change in the driver - because in the >>> past 04d8:000a was handled by cdc_acm, now the modalias shows ftdi_sio. >> >> No, that can't be the reason. The problem occurs before the driver is >> loaded. > > And I do not think ftdi_sio should be loaded for this device > since it is really not an FTDI device after all. 04d8:000a is > a CDC-ACM demo device from Microchip's USB Firmware > Framework. Yes, that is cleary an error which should be fixed. Microchip owns the vid and has AFAIK reserved that pid for single function CDC ACM devices. I have not been able to find any web page where they document this though. But, although not open source, their freely downloadable firmware code examples should document it well enough: bjorn@nemi:/opt/microchip$ grep 'Product ID' USB/Device\ -\ */Firmware/usb_descriptors.c USB/Device - Audio - Microphone/Firmware/usb_descriptors.c: 0x0065, // Product ID: Audio Microphone example USB/Device - Audio - MIDI/Firmware/usb_descriptors.c: 0x0059, // Product ID: Audio MIDI example USB/Device - Audio - Speaker/Firmware/usb_descriptors.c: 0x0064, // Product ID USB/Device - CCID - Smart Card Reader/Firmware/usb_descriptors.c: 0x0067, // Product ID: 0x0067 USB/Device - CDC - Basic Demo/Firmware/usb_descriptors.c: 0x000A, // Product ID: CDC RS-232 Emulation Demo USB/Device - CDC - Serial Emulator/Firmware/usb_descriptors.c: 0x000A, // Product ID: CDC RS-232 Emulation Demo USB/Device - Composite - HID + MSD/Firmware/usb_descriptors.c: 0x0054, // Product ID: mass storage device demo USB/Device - Composite - MSD + CDC/Firmware/usb_descriptors.c: 0x0057, // Product ID USB/Device - Composite - WinUSB + MSD/Firmware/usb_descriptors.c: 0x005F, // Product ID: mass storage device demo USB/Device - HID - Custom Demos/Firmware/usb_descriptors.c: 0x003F, // Product ID: Custom HID device demo USB/Device - HID - Joystick/Firmware/usb_descriptors.c: MY_PID, // Product ID, see usb_config.h USB/Device - HID - Keyboard/Firmware/usb_descriptors.c: MY_PID, // Product ID: Keyboard fw demo USB/Device - HID - Mouse/Firmware/usb_descriptors.c: MY_PID, // Product ID: Mouse in a circle fw demo USB/Device - HID - Uninterruptible Power Supply/Firmware/usb_descriptors.c: MY_PID, // Product ID USB/Device - LibUSB - Generic Driver Demo/Firmware/usb_descriptors.c: 0x0204, // Product ID: 0x0204 USB/Device - Mass Storage - Internal Flash/Firmware/usb_descriptors.c: 0x0009, // Product ID: mass storage device demo USB/Device - Mass Storage - SD Card data logger/Firmware/usb_descriptors.c: 0x0009, // Product ID: mass storage device demo USB/Device - Mass Storage - SD Card reader/Firmware/usb_descriptors.c: 0x0009, // Product ID: mass storage device demo USB/Device - MCHPUSB - Generic Driver Demo/Firmware/usb_descriptors.c: 0x000C, // Product ID: PICDEM FS USB (DEMO Mode) USB/Device - PHDC - Blood Pressure Monitor/Firmware/usb_descriptors.c: 0x0E43, // Product ID: PHDC - Blood Pressure Monitor demo. USB/Device - PHDC - Glucose Meter/Firmware/usb_descriptors.c: 0x0E42, // Product ID: PHDC - Glucose meter demo. USB/Device - PHDC - Thermometer/Firmware/usb_descriptors.c: 0x0E41, // Product ID: PHDC - Thermometer demo. USB/Device - PHDC - Weighing Scale/Firmware/usb_descriptors.c: 0x0E40, // Product ID: PHDC - Weigh Scale demo. USB/Device - WinUSB - Generic Driver Demo/Firmware/usb_descriptors.c: 0x0053, // Product ID: 0x0053 USB/Device - WinUSB - High Bandwidth Demo/Firmware/usb_descriptors.c: 0x0052, // Product ID: 0x0052 The two CDC device descriptors are basically identical, having exactly one CDC ACM function: 2, // Number of interfaces in this cfg 1, // Index value of this configuration 0, // Configuration string index _DEFAULT | _SELF, // Attributes, see usb_device.h 50, // Max power consumption (2X mA) /* Interface Descriptor */ 9,//sizeof(USB_INTF_DSC), // Size of this descriptor in bytes USB_DESCRIPTOR_INTERFACE, // INTERFACE descriptor type 0, // Interface Number 0, // Alternate Setting Number 1, // Number of endpoints in this intf COMM_INTF, // Class code ABSTRACT_CONTROL_MODEL, // Subclass code V25TER, // Protocol code 0, // Interface string index This is all taken from the "Microchip Application Libraries v2012-08-22 Linux" which can be downloaded from: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784 Looking at the history of the addition, it seems that Alan Cox has observed a device using this vid:pid with some ftdi emulating firmware: commit 2353f806c97020d4c7709f15eebb49b591f7306d Author: Alan Cox <alan@xxxxxxxxxxxxxxx> Date: Thu Jan 26 17:41:34 2012 +0000 USB: ftdi_sio: Add more identifiers 0x04d8, 0x000a: Hornby Elite Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx> Cc: stable <stable@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> and then the names were later corrected: commit c1cee1d84001815a1b4321c49b995254c0df3100 Author: Bruno Thomsen <bruno.thomsen@xxxxxxxxx> Date: Sun Mar 4 15:19:14 2012 +0100 USB: Microchip VID mislabeled as Hornby VID in ftdi_sio. Microchip VID (0x04d8) was mislabeled as Hornby VID according to USB-IDs. A Full Speed USB Demo Board PID (0x000a) was mislabeled as Hornby Elite (an Digital Command Controller Console for model railways). Most likely the Hornby based their design on PIC18F87J50 Full Speed USB Demo Board. Signed-off-by: Bruno Thomsen <bruno.thomsen@xxxxxxxxx> Cc: stable <stable@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> It seems someone just reused the Microchip vid:pid without engaging any brain whatsoever. That is IMHO a big no-no. It is not even a cost issue. Microchip has a free pid sublicense offer for any customer: http://ww1.microchip.com/downloads/en/DeviceDoc/APPLICATION%20FOR%20SUBLICENSE%20TO%20USB%20VID%20revised%2012110.pdf I see no reason why Linux should encourage vendors doing something like this. I am going to submit a patch to remove the bogus entry from the ftdi_sio driver so that the Microchip CDC demos start using the expected driver again. Bjørn -- 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