On Wed, 2015-11-04 at 16:57 +0100, Bjørn Mork wrote: > Petr Štetiar <ynezz@xxxxxxx> writes: > > > Bjørn Mork <bjorn@xxxxxxx> [2015-11-04 13:15:10]: > > > >> Based on that, I wonder if it wouldn't be more appropriate to simply do > >> this as a device specific quirk in the qmi_wwan probe? > > > > So rather something like this? > > > > diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c > > index 2a7c1be..2dafc69 100644 > > --- a/drivers/net/usb/qmi_wwan.c > > +++ b/drivers/net/usb/qmi_wwan.c > > @@ -822,6 +822,7 @@ static const struct usb_device_id products[] = { > > {QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */ > > {QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */ > > {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */ > > + {QMI_FIXED_INTF(0x05c6, 0x9215, 4)}, /* Quectel EC20 Mini PCIe Module */ > > {QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */ > > {QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */ > > {QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */ > > @@ -853,6 +854,23 @@ static const struct usb_device_id products[] = { > > }; > > MODULE_DEVICE_TABLE(usb, products); > > > > or rather something like this? > > > > +#define QUECTEL_EC20_VENDORID 0x05c6 > > +#define QUECTEL_EC20_PRODUCTID 0x9215 > > +#define QUECTEL_EC20_NINTERFACES 5 > > +#define QUECTEL_EC20_QMI_IFACE_FIX 4 > > Not directly related to the issue at hand, but I sort of hate macros > like that. They provide little or no value, and make it much more > difficult to see what is going on. In particular, if you went this > route then you would probably want to define > > #define ACER_GOBI2K_VENDORID 0x05c6 > #define ACER_GOBI2K_PRODUCTID 0x9215 > #define ACER_GOBI2K_NINTERFACES 4 > #define ACER_GOBI2K_QMI_IFACE_FIX 0 > > to make this complete. And noone would notice that > ACER_GOBI2K_PRODUCTID and QUECTEL_EC20_PRODUCTID are the same value. > > In fact, the QUECTEL_EC20_VENDORID is really a Qualcomm device ID. > That's confusing already. Please use literals instead. Yeah, please just use "QUALCOMM" here, since that's the vendor assigned to that ID, not QUECTEL. They just stupidly forgot to change that value in the firmware source they got from Qualcomm, apparently. Dan -- 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