From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Graute Subject: Re: [PATCH net] net: qmi_wwan: add support for Cinterion PLS8 Date: Fri, 24 Nov 2017 13:02:24 +0100 Message-ID: <20171124120224.GB18428@graute-opti> References: <1511444235-21710-1-git-send-email-oliver.graute@neuhaus.de> <878texks7h.fsf@miraculix.mork.no> <20171123151039.GF25252@graute-opti> <87zi7ckgja.fsf@miraculix.mork.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: netdev@vger.kernel.org Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:44132 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752637AbdKXMGG (ORCPT ); Fri, 24 Nov 2017 07:06:06 -0500 Received: by mail-wm0-f67.google.com with SMTP id r68so22172462wmr.3 for ; Fri, 24 Nov 2017 04:06:06 -0800 (PST) Received: from localhost (x55b0fae4.dyn.telefonica.de. [85.176.250.228]) by smtp.gmail.com with ESMTPSA id j10sm9245217wrh.32.2017.11.24.04.06.03 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 24 Nov 2017 04:06:03 -0800 (PST) Content-Disposition: inline In-Reply-To: <87zi7ckgja.fsf@miraculix.mork.no> Sender: netdev-owner@vger.kernel.org List-ID: On 23/11/17, Bjørn Mork wrote: > > This is also consistent with the Windows drivers. And being a proper > CDC ECM class function, it should Just Work with the cdc_ether driver. > Except for the "RmNet" part, which I guess is the reason you want to > add this device to qmi_wwan. Which is fine, *if* we can be reasonably > certain that it does support QMI. The description string is a strong > indication, but it would be even better to know this was tested. > > But adding this to qmi_wwan is not enough. You also need to add a > blacklist entry to cdc_ether. Both should use a device+class match, > similar to the Novatel entries. This will make the interface numbering > irrelevant, and will allow a single entry to match both QMI/rmnet > functions. ok I tried it this way: +++ b/drivers/net/usb/cdc_ether.c @@ -562,6 +562,7 @@ static void usbnet_cdc_zte_status(struct usbnet *dev, struct urb *urb) #define MICROSOFT_VENDOR_ID 0x045e #define UBLOX_VENDOR_ID 0x1546 #define TPLINK_VENDOR_ID 0x2357 +#define CINTERION_VENDOR_ID 0x1e2d static const struct usb_device_id products[] = { /* BLACKLIST !! @@ -821,6 +822,13 @@ static void usbnet_cdc_zte_status(struct usbnet *dev, struct urb *urb) .driver_info = 0, }, +/* Cinterion PLS8 - handled by qmi_wwan */ +{ + USB_DEVICE_AND_INTERFACE_INFO(CINTERION_VENDOR_ID, 0x0061, USB_CLASS_COMM, + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), + .driver_info = 0, +}, + /* WHITELIST!!! * * CDC Ether uses two interfaces, not necessarily consecutive. diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 720a3a2..93e102e 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1221,6 +1221,7 @@ static int qmi_wwan_resume(struct usb_interface *intf) {QMI_FIXED_INTF(0x0b3c, 0xc00a, 6)}, /* Olivetti Olicard 160 */ {QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */ {QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */ + {QMI_FIXED_INTF(0x1e2d, 0x0061, 3)}, /* Cinterion PLS8 LTE */ {QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */ {QMI_FIXED_INTF(0x1e2d, 0x0082, 4)}, /* Cinterion PHxx,PXxx (2 RmNet) */ {QMI_FIXED_INTF(0x1e2d, 0x0082, 5)}, /* Cinterion PHxx,PXxx (2 RmNet) */ but now I'am missing an ttyACM4 interface and the edc_ether registering is not working anymore. [ 124.310611] usb 2-1: new high-speed USB device number 2 using ci_hdrc [ 124.457029] usb 2-1: New USB device found, idVendor=1e2d, idProduct=0061 [ 124.463938] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 124.471307] usb 2-1: Product: LTE Modem [ 124.475278] usb 2-1: Manufacturer: Cinterion [ 124.536219] cdc_acm 2-1:1.0: ttyACM0: USB ACM device [ 124.563155] cdc_acm 2-1:1.2: ttyACM1: USB ACM device [ 124.589625] cdc_acm 2-1:1.4: ttyACM2: USB ACM device [ 124.613517] cdc_acm 2-1:1.6: ttyACM3: USB ACM device in my working old setup with kernel 3.9.11 it looks like this: [ 129.710622] usb 2-1: new high-speed USB device number 2 using ci_hdrc [ 129.873985] usb 2-1: New USB device found, idVendor=1e2d, idProduct=0061 [ 129.888573] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 129.902973] usb 2-1: Product: LTE Modem [ 129.906927] usb 2-1: Manufacturer: Cinterion [ 129.928389] cdc_acm 2-1:1.0: ttyACM0: USB ACM device [ 129.959324] cdc_acm 2-1:1.2: ttyACM1: USB ACM device [ 129.992714] cdc_acm 2-1:1.4: ttyACM2: USB ACM device [ 130.019416] cdc_acm 2-1:1.6: ttyACM3: USB ACM device [ 130.045248] cdc_acm 2-1:1.8: This device cannot do calls on its own. It is not a modem. [ 130.073929] cdc_acm 2-1:1.8: ttyACM4: USB ACM device [ 130.100982] cdc_ether 2-1:1.10 usb0: register 'cdc_ether' at usb-ci_hdrc.1-1, CDC Ethernet Device, de:ad:be:ef:00:00 [ 130.136438] cdc_ether 2-1:1.12 usb1: register 'cdc_ether' at usb-ci_hdrc.1-1, CDC Ethernet Device, de:ad:be:ef:00:01 Any clue what I'am doing wrong here? Best regards, Oliver