Hi Bjorn, >> we introduced DEVTYPE in uevent a long time ago. That is what >> userspace should be using and not second guessing on interface names. > > Yes, sorry for confusing this by mentioning the device name. This is > really about DEVTYPE. > > usbnet minidrivers use FLAG_WWAN to set both the 'wwanX' device name and > DEVTYPE=wwan. The question here is whether or not to set that flag for > Huawei NCM devices. We can discuss that in the DEVTYPE context if you > prefer. > >> Why is userspace trying to hack around the kernel anyway. > > Because you can never expect DEVTYPE to be 100% correct. There isn't a > one-to-one relationship between USB classes and DEVTYPE. So we use a > default DEVTYPE and exception lists in class drivers like cdc_ether and > cdc_ncm. These exception lists will always be incomplete, like any such > whitelist/blacklist. > > I believe we have discussed this before, and my opinion on DEVTYPE is > still that it is a best effort thing which we would have been better off > without. But it's too late to do anything about that. Userspace has to > deal with it. The kernel provides a hint. The hint cannot be trusted. if this is a 2G/3G/LTE or whatever card providing broadband networking then this is DEVTYPE=wwan. It makes no difference if this is NCM or not. It is important to know what this network interface connects to. >> This never >> really goes well unless the kernel exposes clear information to >> identify devices. If there are some weird devices, then work this out >> in the kernel and have DEVTYPE identity them correctly. > > How? These devices share device IDs. We do not touch their management > interfaces from the kernel. We depend on being able to classify device > types based on USB descriptors. How can we identify which device is wwan > and which is not if the descriptors are identical down to the device ID? What is Huawei building besides broadband cards? Are they in the business of WiFi or Ethernet now? > It is tempting to say that Huawei knows best for their own devices, if > you all find the change acceptable. I most certainly don't know better > than they do. I would have loved to travel back in time and never submit > that patch... I mean if this is about distinguishing their phones from their data cards, then surely the other USB descriptors are different so that the driver can quirk this correctly. Regards Marcel -- 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