On Monday 30 of September 2013 13:12:34 Bjørn Mork wrote: > Michal Malý <madcatxster@xxxxxxxxx> writes: > > On Monday 30 of September 2013 12:19:41 you wrote: > >> Michal Malý <madcatxster@xxxxxxxxx> writes: > >> > my Huawei 3G modem has an embedded Smart Card reader which causes > >> > trouble when the modem is being detected (a bunch of "<warn> > >> > (ttyUSBx): open blocked by driver for more than 7 seconds!" in > >> > messages.log). This trivial patch corrects the problem for me. The > >> > modem identifies itself as "12d1:1406 Huawei Technologies Co., > >> > Ltd. E1750" in lsusb although the description on the body says "Model > >> > E173u-1" > >> > >> This is surprising because the first thing option_probe() does is: > >> /* Never bind to the CD-Rom emulation interface */ > >> if (iface_desc->bInterfaceClass == 0x08) > >> > >> return -ENODEV; > >> > >> so it shouldn't ever bind to any storage functions. Unless it is a > >> vendor specific storage function, of course... > >> > >> > + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, > > > > HUAWEI_PRODUCT_E1750, > > > >> > 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t) > >> > &net_intf2_blacklist }, > >> > >> Does this mean that intf #2 is actually a storage function using > >> ff/ff/ff class codes? > >> > >> > >> Bjørn > > > > The device has 4 interfaces. IF 0 and IF 1 are used to talk to the modem, > > IF 3 is a micro SD card reader and IF 2 is a mysterious interface. > > According to Windows .INF the "USB\VID_12d1&PID_1406&MI_02" device is a > > "HUAWEI Mobile Connect - USB Smart Card Reader"; whatever that means. The > > SD card reader has 0x08 interface class and it seems to be picked up > > correctly. > > Yes, that's what I thought. So intf #2 probably doesn't have anything > to do with the SD reader? > > > IF 2 info from lsusb: > > > > Interface Descriptor: > > bLength 9 > > bDescriptorType 4 > > bInterfaceNumber 2 > > bAlternateSetting 0 > > bNumEndpoints 2 > > bInterfaceClass 255 Vendor Specific Class > > bInterfaceSubClass 255 Vendor Specific Subclass > > bInterfaceProtocol 255 Vendor Specific Protocol > > iInterface 0 > > ** UNRECOGNIZED: 36 21 00 01 00 07 00 00 03 00 00 00 a0 0f 00 00 a0 > > 0f > > > > 00 00 00 00 00 00 00 2a 00 00 16 40 05 00 00 00 00 00 fe 00 00 00 00 00 00 > > 00 00 00 00 00 30 02 01 00 0f 01 > > Right. Based on the length and ID of this class descriptor, I am pretty > sure this is a CCID interface descriptor, except that the class codes > are wrong. You could hack up a copy of lsusb to decode the vendor > specific class as if it was USB_CLASS_CCID and have this additional > descriptor nicely decoded into CCID properties. > > I believe some modems provide a CCID interface to the SIM. Could this > be such a device? > > In any case, I guess the patch is necessary. This interface should be > blacklisted as it's not a serial interface. CCID support is done in > userspace. Thanks a lot for providing the additional info. > > > > Bjørn The interface is indeed for a CCID reader. The information contained in the descriptor are probably not useful for the purposes of the "option" driver, but here's what I got form a libusb-based CCID parser. idVendor: 0x12D1 iManufacturer: HUAWEI Technology idProduct: 0x1406 iProduct: HUAWEI Mobile bcdDevice: 0.00 (firmware release?) bLength: 9 bDescriptorType: 4 bInterfaceNumber: 2 bAlternateSetting: 0 bNumEndpoints: 2 bulk-IN and bulk-OUT bInterfaceClass: 0xFF NOT A CCID DEVICE Class is 0xFF (proprietary) bInterfaceSubClass: 255 UNSUPPORTED SubClass bInterfaceProtocol: 255 UNSUPPORTED InterfaceProtocol Can't get iInterface string CCID Class Descriptor bLength: 0x36 bDescriptorType: 0x21 bcdCCID: 1.00 bMaxSlotIndex: 0x00 bVoltageSupport: 0x07 5.0V 3.0V 1.8V dwProtocols: 0x0003 0x0000 dwDefaultClock: 262144.000 MHz dwMaximumClock: 262144.000 MHz bNumClockSupported: 0 (will use whatever is returned) IFD does not support GET CLOCK FREQUENCIES request: Resource temporarily unavailable dwDataRate: 0 bps dwMaxDataRate: 2752512 bps bNumDataRatesSupported: 0 (will use whatever is returned) IFD does not support GET_DATA_RATES request: Resource temporarily unavailable dwMaxIFSD: 344086 dwSynchProtocols: 0x00000000 dwMechanical: 0x000000FE Card ejection mechanism Card capture mechanism Card lock/unlock mechanism dwFeatures: 0x00000000 No special characteristics 00.... Character level exchange dwMaxCCIDMessageLength: 0 bytes bClassGetResponse: 0x30 bClassEnvelope: 0x02 wLcdLayout: 0x0001 1 characters per line bPINSupport: 0x0F PIN Verification supported PIN Modification supported bMaxCCIDBusySlots: 1 Michal -- 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