qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

Subsystems: networking drivers, the rest, usb cdc ethernet driver, usb networking drivers, usb qmi wwan network driver

8 messages, 4 authors, 2013-05-08 · open the first message on its own page

qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

From: Dan Williams <hidden>
Date: 2013-05-06 21:14:38

A rebranded Novatel E371 for AT&T's LTE bands.  qmi_wwan should drive this
device, while cdc_ether should ignore it.  Even though the USB descriptors
are plain CDC-ETHER that USB interface is a QMI interface.

Cc: <redacted>
Signed-off-by: Dan Williams <redacted>
---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 24fbec2..078795f 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -613,6 +613,13 @@ static const struct usb_device_id	products [] = {
 	.driver_info = 0,
 },
 
+/* Dell Wireless 5804 (Novatel E371) - handled by qmi_wwan */
+{
+	USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, 0x819b, USB_CLASS_COMM,
+			USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
+	.driver_info = 0,
+},
+
 /* AnyDATA ADU960S - handled by qmi_wwan */
 {
 	USB_DEVICE_AND_INTERFACE_INFO(0x16d5, 0x650a, USB_CLASS_COMM,
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 834e405..cf887c2 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -501,6 +501,13 @@ static const struct usb_device_id products[] = {
 					      USB_CDC_PROTO_NONE),
 		.driver_info        = (unsigned long)&qmi_wwan_info,
 	},
+	{	/* Dell Wireless 5804 (Novatel E371) */
+		USB_DEVICE_AND_INTERFACE_INFO(0x413C, 0x819b,
+					      USB_CLASS_COMM,
+					      USB_CDC_SUBCLASS_ETHERNET,
+					      USB_CDC_PROTO_NONE),
+		.driver_info        = (unsigned long)&qmi_wwan_info,
+	},
 	{	/* ADU960S */
 		USB_DEVICE_AND_INTERFACE_INFO(0x16d5, 0x650a,
 					      USB_CLASS_COMM,
-- 
1.8.1.4

[PATCH] qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

From: Dan Williams <hidden>
Date: 2013-05-06 21:17:37

A rebranded Novatel E371 for AT&T's LTE bands.  qmi_wwan should drive this
device, while cdc_ether should ignore it.  Even though the USB descriptors
are plain CDC-ETHER that USB interface is a QMI interface.

Cc: <redacted>
Signed-off-by: Dan Williams <redacted>
---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 24fbec2..078795f 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -613,6 +613,13 @@ static const struct usb_device_id	products [] = {
 	.driver_info = 0,
 },
 
+/* Dell Wireless 5804 (Novatel E371) - handled by qmi_wwan */
+{
+	USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, 0x819b, USB_CLASS_COMM,
+			USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
+	.driver_info = 0,
+},
+
 /* AnyDATA ADU960S - handled by qmi_wwan */
 {
 	USB_DEVICE_AND_INTERFACE_INFO(0x16d5, 0x650a, USB_CLASS_COMM,
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 834e405..cf887c2 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -501,6 +501,13 @@ static const struct usb_device_id products[] = {
 					      USB_CDC_PROTO_NONE),
 		.driver_info        = (unsigned long)&qmi_wwan_info,
 	},
+	{	/* Dell Wireless 5804 (Novatel E371) */
+		USB_DEVICE_AND_INTERFACE_INFO(0x413C, 0x819b,
+					      USB_CLASS_COMM,
+					      USB_CDC_SUBCLASS_ETHERNET,
+					      USB_CDC_PROTO_NONE),
+		.driver_info        = (unsigned long)&qmi_wwan_info,
+	},
 	{	/* ADU960S */
 		USB_DEVICE_AND_INTERFACE_INFO(0x16d5, 0x650a,
 					      USB_CLASS_COMM,
-- 
1.8.1.4

Re: [PATCH] qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

From: Bjørn Mork <bjorn@mork.no>
Date: 2013-05-06 21:22:50

Dan Williams [off-list ref] writes:
A rebranded Novatel E371 for AT&T's LTE bands.  qmi_wwan should drive this
device, while cdc_ether should ignore it.  Even though the USB descriptors
are plain CDC-ETHER that USB interface is a QMI interface.

Cc: <redacted>
Signed-off-by: Dan Williams <redacted>
---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)
Acked-by: Bjørn Mork <bjorn@mork.no>

Re: [PATCH] qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

From: David Miller <davem@davemloft.net>
Date: 2013-05-08 19:08:50

From: Bjørn Mork <bjorn@mork.no>
Date: Mon, 06 May 2013 23:22:50 +0200
Dan Williams [off-list ref] writes:
quoted
A rebranded Novatel E371 for AT&T's LTE bands.  qmi_wwan should drive this
device, while cdc_ether should ignore it.  Even though the USB descriptors
are plain CDC-ETHER that USB interface is a QMI interface.

Cc: <redacted>
Signed-off-by: Dan Williams <redacted>
---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)
Acked-by: Bjørn Mork <bjorn@mork.no>
Applied.

Re: [PATCH] qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

From: dag dg <hidden>
Date: 2013-05-08 19:11:48

Just a side note on this. By default for this device, modprobe won't
load and assign the option driver. However, if cdc_ether is
blacklisted and you try to load option onto the device, it will try to
load the option driver onto where cdc_ether was being used, which will
cause the system to lock up. I'm not sure what needs to be done to
force qmi_wwan to take over cdc_ether without option grabbing these
IDs...

On Wed, May 8, 2013 at 2:08 PM, David Miller [off-list ref] wrote:
From: Bjørn Mork <bjorn@mork.no>
Date: Mon, 06 May 2013 23:22:50 +0200
quoted
Dan Williams [off-list ref] writes:
quoted
A rebranded Novatel E371 for AT&T's LTE bands.  qmi_wwan should drive this
device, while cdc_ether should ignore it.  Even though the USB descriptors
are plain CDC-ETHER that USB interface is a QMI interface.

Cc: <redacted>
Signed-off-by: Dan Williams <redacted>
---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)
Acked-by: Bjørn Mork <bjorn@mork.no>
Applied.

Re: [PATCH] qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

From: David Miller <davem@davemloft.net>
Date: 2013-05-08 19:19:22

From: dag dg <redacted>
Date: Wed, 8 May 2013 14:11:48 -0500
Just a side note on this. By default for this device, modprobe won't
load and assign the option driver. However, if cdc_ether is
blacklisted and you try to load option onto the device, it will try to
load the option driver onto where cdc_ether was being used, which will
cause the system to lock up. I'm not sure what needs to be done to
force qmi_wwan to take over cdc_ether without option grabbing these
IDs...
I'm sure that Bjørn can answer this question.

Re: [PATCH] qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

From: Dan Williams <hidden>
Date: 2013-05-08 19:25:50

On Wed, 2013-05-08 at 12:19 -0700, David Miller wrote:
From: dag dg <redacted>
Date: Wed, 8 May 2013 14:11:48 -0500
quoted
Just a side note on this. By default for this device, modprobe won't
load and assign the option driver. However, if cdc_ether is
blacklisted and you try to load option onto the device, it will try to
load the option driver onto where cdc_ether was being used, which will
cause the system to lock up. I'm not sure what needs to be done to
force qmi_wwan to take over cdc_ether without option grabbing these
IDs...
This is a consequence of "new_id" not being flexible enough to handle
class/subclass/protocol in addition to USB IDs.  Thus when you use it,
the driver binds to *all* USB interfaces, even ones that the driver
shouldn't ever control

So the issue you refer to is actually user error, helped by a
too-coarse-grained kernel API.  It's not an issue when things are all
done correctly, which is to say when the USB IDs and interface
class/subclass/protocol are properly added to the kernel drivers.

The option patch I posted earlier will fix this issue correctly.

Dan

Re: [PATCH] qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card

From: dag dg <hidden>
Date: 2013-05-08 19:27:59

cool, just wanted to make sure. When I set up a startup script to load
up the option driver I freaked when my machine locked up. Good to know
you have this covered, looking forward to seeing it implemented down
the road. Thanks.

On Wed, May 8, 2013 at 2:25 PM, Dan Williams [off-list ref] wrote:
On Wed, 2013-05-08 at 12:19 -0700, David Miller wrote:
quoted
From: dag dg <redacted>
Date: Wed, 8 May 2013 14:11:48 -0500
quoted
Just a side note on this. By default for this device, modprobe won't
load and assign the option driver. However, if cdc_ether is
blacklisted and you try to load option onto the device, it will try to
load the option driver onto where cdc_ether was being used, which will
cause the system to lock up. I'm not sure what needs to be done to
force qmi_wwan to take over cdc_ether without option grabbing these
IDs...
This is a consequence of "new_id" not being flexible enough to handle
class/subclass/protocol in addition to USB IDs.  Thus when you use it,
the driver binds to *all* USB interfaces, even ones that the driver
shouldn't ever control

So the issue you refer to is actually user error, helped by a
too-coarse-grained kernel API.  It's not an issue when things are all
done correctly, which is to say when the USB IDs and interface
class/subclass/protocol are properly added to the kernel drivers.

The option patch I posted earlier will fix this issue correctly.

Dan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help