2024-03-06 09:36:10

by Bolan Wang(Bolan)

[permalink] [raw]
Subject: [PATCH] USB: serial: option: add Fibocom FM135-GL variants

Update the USB serial option driver support for the Fibocom
FM135-GL LTE modules.
- VID:PID 2cb7:0115, FM135-GL for laptop debug M.2 cards(with MBIM
interface for /Linux/Chrome OS)

0x0115: mbim, diag, at, pipe

Signed-off-by: bolan wang <[email protected]>
---
drivers/usb/serial/option.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 2ae124c49d44..c7ea7e5ec875 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2267,6 +2267,8 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0111, 0xff) }, /* Fibocom FM160 (MBIM mode) */
+ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0115, 0xff), /* Fibocom FM135 (laptop MBIM) */
+ .driver_info = RSVD(5) },
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a2, 0xff) }, /* Fibocom FM101-GL (laptop MBIM) */
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a3, 0xff) }, /* Fibocom FM101-GL (laptop MBIM) */
--
2.34.1



2024-03-06 08:54:05

by Bolan Wang(Bolan)

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: add Fibocom FM135-GL variants


> The option driver will bind because you have matched only on Class ff "{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a1, 0xff) }"
> There are other macros that you could possibly use but I can't tell you which since you have not shown an usb-device listing for the device.
> You can also blacklist an interface (RSV). The option driver source is full of examples of macro use and combinations.


Hi Lars:

The InterfaceNumber of the adb interface is 05, so the following code can blacklist an interface (RSV)? Is this appropriate for adb interface?

+ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0115, 0xff),
.driver_info = RSVD(5) }, /* Fibocom FM135 (laptop MBIM) */


thanks
bolan

2024-03-06 07:41:56

by Bolan Wang(Bolan)

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: option: add Fibocom FM135-GL variants

> Hi Bolan,
> so you already know that other versions of the card will have the pid
> 0x01a1 and the serial interfaces will be of class ff but you don't know what those interfaces will be used for?
> You shall only add driver support for what you know today and not for something that might or might not be implemented in the future.

> For the device with pid 0x0115 you have listed an adb interface and adb interfaces should not be in the option driver.

Hi Lars:

Ok, I will remove 0x01a1 from option serial driver. And the adb listed in pid 0x0115 will also be removed.
Actually adb interface info with pid 0x0115 is: Class_ff&SubClass_42&Prot_01, the option driver will not bind it?
I will resubmit a new patch, please help review and abandon this.

thanks
bolan