From: Oliver Graute <oliver.graute@gmail.com>
To: netdev@vger.kernel.org
Subject: Re: [PATCH net] net: qmi_wwan: add support for Cinterion PLS8
Date: Fri, 24 Nov 2017 13:02:24 +0100 [thread overview]
Message-ID: <20171124120224.GB18428@graute-opti> (raw)
In-Reply-To: <87zi7ckgja.fsf@miraculix.mork.no>
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
next prev parent reply other threads:[~2017-11-24 12:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 13:37 [PATCH net] net: qmi_wwan: add support for Cinterion PLS8 Oliver Graute
2017-11-23 14:03 ` Bjørn Mork
2017-11-23 15:10 ` Oliver Graute
2017-11-23 18:15 ` Bjørn Mork
2017-11-23 23:06 ` Reinhard Speyerer
2017-11-24 12:04 ` Oliver Graute
2017-11-24 18:25 ` Bjørn Mork
2017-11-26 15:16 ` Reinhard Speyerer
2017-11-24 12:02 ` Oliver Graute [this message]
2017-12-01 12:20 ` Oliver Graute
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171124120224.GB18428@graute-opti \
--to=oliver.graute@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.