Skip to contentSkip to conversation

USB: serial: option: add HP lt4132

PATCH In review Tore Anderson 3 participants 6 messages Dec 8, 2018 – Dec 11, 2018

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

PATCH 1/1 USB: serial: option: add HP lt4132

The HP lt4132 is a rebranded Huawei ME906s-158 LTE modem.

The interface with protocol 0x16 is "CDC ECM & NCM" according to the *.inf files included with the Windows driver. Attaching the option driver to it doesn't result in a /dev/ttyUSB* device being created, so I've excluded it. Note that it is also excluded for corresponding Huawei-branded devices, cf. commit d544db293a44a.

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs=  3
P:  Vendor=03f0 ProdID=a31d Rev=01.02
S:  Manufacturer=HP Inc.
S:  Product=HP lt4132 LTE/HSPA+ 4G Module
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=2mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=option
I:  If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=option
I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=06 Prot=16 Driver=(none)
I:  If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option
I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=option
T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs=  3
P:  Vendor=03f0 ProdID=a31d Rev=01.02
S:  Manufacturer=HP Inc.
S:  Product=HP lt4132 LTE/HSPA+ 4G Module
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=2mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
I:  If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=06 Prot=00 Driver=cdc_ether
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=option
I:  If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=option
I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option
I:  If#=0x6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=option
T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs=  3
P:  Vendor=03f0 ProdID=a31d Rev=01.02
S:  Manufacturer=HP Inc.
S:  Product=HP lt4132 LTE/HSPA+ 4G Module
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 3 Cfg#= 3 Atr=a0 MxPwr=2mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option
---
 drivers/usb/serial/option.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/usb/serial/option.c +9 -0
index e24ff16d4147..1a6fa4726def 100644
@@ -552,6 +552,10 @@ static void option_instat_callback(struct urb *urb);
 #define WETELECOM_PRODUCT_6802			0x6802
 #define WETELECOM_PRODUCT_WMD300		0x6803
 
+/* HP products */
+#define HP_VENDOR_ID				0x03f0
+#define HP_PRODUCT_LT4132			0xa31d /* Huawei ME906s-158 */
+
 
 /* Device flags */
 
@@ -1941,6 +1945,11 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x10) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x12) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x13) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x14) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x1b) },
 	{ } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
maintainer
#1 lore raw

Hi,

[This is an automated email]

This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v4.19.8, v4.14.87, v4.9.144, v4.4.166, v3.18.128,

v4.19.8: Build OK!
v4.14.87: Build OK!
v4.9.144: Build OK!
v4.4.166: Build OK!
v3.18.128: Failed to apply! Possible dependencies:

    5d03a2fd2292 ("USB: serial: option: add device ID for HP lt2523 (Novatel E371)")

How should we proceed with this patch?

--
Thanks,
Sasha

maintainer
#2 lore raw
Quoted 7 lines · Sasha Levin

Hi,

[This is an automated email]

This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all

Quoted 8 lines

The bot has tested the following trees: v4.19.8, v4.14.87, v4.9.144, v4.4.166, v3.18.128,

v4.19.8: Build OK!
v4.14.87: Build OK!
v4.9.144: Build OK!
v4.4.166: Build OK!
v3.18.128: Failed to apply! Possible dependencies:

    5d03a2fd2292 ("USB: serial: option: add device ID for HP lt2523 (Novatel E371)")

I thought 3.18 was finally EOLed?

Quoted 1 line

How should we proceed with this patch?

It applies just fine to mainline, but looks like your scripts found a missing stable patch which would also make it apply to 3.18 without the need to adjust any context.

Thanks,
Johan

maintainer
#3 lore raw
Quoted 10 lines · Johan Hovold
Quoted 9 lines · Sasha Levin

Hi,

[This is an automated email]

This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v4.19.8, v4.14.87, v4.9.144, v4.4.166, v3.18.128,

Quoted 8 lines
Quoted 6 lines

v4.19.8: Build OK!
v4.14.87: Build OK!
v4.9.144: Build OK!
v4.4.166: Build OK!
v3.18.128: Failed to apply! Possible dependencies:

    5d03a2fd2292 ("USB: serial: option: add device ID for HP lt2523 (Novatel E371)")

I thought 3.18 was finally EOLed?

Sadly it's still alive.

Quoted 5 lines
Quoted 1 line

How should we proceed with this patch?

It applies just fine to mainline, but looks like your scripts found a missing stable patch which would also make it apply to 3.18 without the need to adjust any context.

I'll grab 5d03a2fd2292 too, as it's also adding IDs.

--
Thanks,
Sasha

maintainer
#4 lore raw
Quoted 18 lines · Sasha Levin
Quoted 17 lines · Johan Hovold
Quoted 15 lines · Sasha Levin

Hi,

[This is an automated email]

This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v4.19.8, v4.14.87, v4.9.144, v4.4.166, v3.18.128,

v4.19.8: Build OK!
v4.14.87: Build OK!
v4.9.144: Build OK!
v4.4.166: Build OK!
v3.18.128: Failed to apply! Possible dependencies:

    5d03a2fd2292 ("USB: serial: option: add device ID for HP lt2523 (Novatel E371)")
Quoted 3 lines
Quoted 1 line

I thought 3.18 was finally EOLed?

Sadly it's still alive.

Ah, the note from Greg in the 3.18.125 announcement said he might stop "soon", but I guess the EOL mark on kernel.org has been there since the first time it was declared EOL?

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

How should we proceed with this patch?

It applies just fine to mainline, but looks like your scripts found a missing stable patch which would also make it apply to 3.18 without the need to adjust any context.

I'll grab 5d03a2fd2292 too, as it's also adding IDs.

Makes sense. Perhaps something that was missed after 3.18-stable's first resurrection.

Thanks,
Johan

maintainer
#5 lore raw
In reply to Tore Anderson
Quoted 30 lines · Tore Anderson

The HP lt4132 is a rebranded Huawei ME906s-158 LTE modem.

The interface with protocol 0x16 is "CDC ECM & NCM" according to the *.inf files included with the Windows driver. Attaching the option driver to it doesn't result in a /dev/ttyUSB* device being created, so I've excluded it. Note that it is also excluded for corresponding Huawei-branded devices, cf. commit d544db293a44a.

---
 drivers/usb/serial/option.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/usb/serial/option.c +4 -0
index e24ff16d4147..1a6fa4726def 100644
@@ -552,6 +552,10 @@ static void option_instat_callback(struct urb *urb);
 #define WETELECOM_PRODUCT_6802			0x6802
 #define WETELECOM_PRODUCT_WMD300		0x6803
 
+/* HP products */
+#define HP_VENDOR_ID				0x03f0
+#define HP_PRODUCT_LT4132			0xa31d /* Huawei ME906s-158 */
+
 
 /* Device flags */
 

drivers/usb/serial/option.c static const struct usb_device_id option_ids[] = { · line 1952

Quoted 8 lines
drivers/usb/serial/option.c +5 -0
@@ -1941,6 +1945,11 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x10) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x12) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x13) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x14) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, HP_PRODUCT_LT4132, 0xff, 0x06, 0x1b) },

I replaced the defines with numerical constants as we're trying to move away from using the former (and also for consistency with the current HP entry just above):

-       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) },    /* HP lt2523 (Novatel E371) */
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x10) },    /* HP lt4132 (Huawei ME906s-158) */
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x12) },
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x13) },
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x14) },
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x1b) },

Now applied.

Thanks,
Johan