1.调整usb驱动
This commit is contained in:
parent
15045b439a
commit
f73c4090e1
|
@ -2070,6 +2070,35 @@ static int option_probe(struct usb_serial *serial,
|
|||
&serial->interface->cur_altsetting->desc;
|
||||
unsigned long device_flags = id->driver_info;
|
||||
|
||||
#if 1 //Added by Quectel
|
||||
//Quectel UC20's interface 4 can be used as USB Network device
|
||||
if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9003)
|
||||
&& serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
|
||||
return -ENODEV;
|
||||
|
||||
//Quectel EC20(MDM9215)'s interface 4 can be used as USB Network device
|
||||
if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9215)
|
||||
&& serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
|
||||
return -ENODEV;
|
||||
|
||||
if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
|
||||
__u16 idProduct = le16_to_cpu(serial->dev->descriptor.idProduct);
|
||||
struct usb_interface_descriptor *intf = &serial->interface->cur_altsetting->desc;
|
||||
|
||||
if (intf->bInterfaceClass != 0xFF || intf->bInterfaceSubClass == 0x42) {
|
||||
//ECM, RNDIS, NCM, MBIM, ACM, UAC, ADB
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if ((idProduct&0xF000) == 0x0000) {
|
||||
//MDM interface 4 is QMI
|
||||
if (intf->bInterfaceNumber == 4 && intf->bNumEndpoints == 3
|
||||
&& intf->bInterfaceSubClass == 0xFF && intf->bInterfaceProtocol == 0xFF)
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Never bind to the CD-Rom emulation interface */
|
||||
if (iface_desc->bInterfaceClass == USB_CLASS_MASS_STORAGE)
|
||||
return -ENODEV;
|
||||
|
|
Loading…
Reference in New Issue
Block a user