Skip to contentSkip to conversation

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

PATCH Applied Dan Williams 4 participants 8 messages May 6, 2013 – May 8, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)
drivers/net/usb/cdc_ether.c +7 -0
index 24fbec2..078795f 100644
@@ -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,
drivers/net/usb/qmi_wwan.c +7 -0
index 834e405..cf887c2 100644
@@ -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,
Signature · 1 line
1.8.1.4
#1 lore raw

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

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.

---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)
drivers/net/usb/cdc_ether.c +7 -0
index 24fbec2..078795f 100644
@@ -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,
drivers/net/usb/qmi_wwan.c +7 -0
index 834e405..cf887c2 100644
@@ -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,
Signature · 1 line
1.8.1.4
maintainer Acked-by on v1 1/1
#2 lore raw
Quoted 10 lines · Dan Williams

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.

---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)
maintainer Applied
#3 lore raw

From: Bjørn Mork <[email protected]>
Date: Mon, 06 May 2013 23:22:50 +0200

Quoted 6 lines
Quoted 4 lines · Dan Williams

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.

Quoted 8 lines
Quoted 6 lines
---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)

Applied.

#4 lore raw

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...

Quoted 19 lines · David Miller

From: Bjørn Mork <[email protected]>
Date: Mon, 06 May 2013 23:22:50 +0200

Quoted 6 lines
Quoted 4 lines · Dan Williams

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.

Quoted 8 lines
Quoted 6 lines
---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 drivers/net/usb/qmi_wwan.c  | 7 +++++++
 2 files changed, 14 insertions(+)

Applied.

maintainer
#5 lore raw

From: dag dg <[email protected]>
Date: Wed, 8 May 2013 14:11:48 -0500

Quoted 7 lines

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.

#6 lore raw
Quoted 10 lines · David Miller

From: dag dg <[email protected]>
Date: Wed, 8 May 2013 14:11:48 -0500

Quoted 7 lines

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

#7 lore raw

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.

Quoted 27 lines · Dan Williams
Quoted 10 lines · David Miller

From: dag dg <[email protected]>
Date: Wed, 8 May 2013 14:11:48 -0500

Quoted 7 lines

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