DM6467内核linux2.6.18,多张电信3G无线网卡不能同时使用
同时插多张联通3G无线网卡,设备可以正常的拨号,但是如果插多张电信3G无线网卡,就会出现拨一张电信卡后,就不能再往下拨下去了,会卡住。以下是拨通了第一张卡,再连着拨第二张卡出现的卡住的情况,还请各位专家帮我看看,麻烦您们了!
下图是正常能拨号的情况:
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode or class (1)
Accessing device 003 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x08 (out) and 0x87 (in)
Using endpoints 0x08 (out) and 0x87 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
SCSI inquiry data (for identification)
-------------------------
Vendor String: HUAWEI
Model String: Mass Storage
Revision String: 2.31
-------------------------
USB description data (for identiusb 1-1.1: usbfs: process 907 (usb_modeswitch) did not claim interface 0 before use
fication)
-------------------------
Manufacturer: HUAECHNOLOGIES
Product: HUAWEI Mobile
Serial No.: ----------------------
Setting up communication with interface 0 ...
Using endpoint 0x08 for message sending ...
Trying to send message 1 to endpoint 0x08 ...
OK, message successfully sent
Resetting response endpoint 0x87
Resetting message endpoint 0x08
Error resetting endpoint: -32
usb 1-1.1: USB disconnect, address 3
-> Run lsusb to note any changes. Bye.
下图为是不能拨号的情况,卡在那里:
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode or class (1)
Accessing device 004 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
------解决方案--------------------
用的是通用驱动usbserial吗?如果是的话,就在$KERNEL_SOURCE_DIR/drivers/usb/serial/generic.c这个文件中修改就可以了,即:
我们平时使用modprobe加载usbserial驱动时输入的vendor和product参数是传给usbserial_generic这个模块的。这里的调用过程是usb_serial_init()->usb_serial_general_register()。在这个函数中,在这里传入的参数:
generic_device_ids[0].idVendor = vendor;
generic_device_ids[0].idProduct = product;
generic_device_ids[0].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
我们这里需要加入我们自己设备的vendor和product,因此在这行下面,我们需要加入:
// added by xzpeter, try to support both sim4100 and lc6311
// for sim4100
generic_device_ids[1].idVendor = 0x0456;
generic_device_ids[1].idProduct = 0x6532;
generic_device_ids[1].match_flags =
USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
// for lc6311
generic_device_ids[2].idVendor = 0x1AB7;
generic_device_ids[2].idProduct = 0x6000;
generic_device_ids[2].match_flags =
USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
// end here