Re: [PATCH v2] USB: serial: option: add Quectel BG95 modem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 18, 2022 at 01:04:10AM +0000, Carl Yin(殷张成) wrote:
> The BG95 modem has 3 USB configurations that are configurable via the AT
> command AT+QCFGEXT="usbnet",["ecm"|"modem"|"rmnet"] which make the modem
> enumerate with the following interfaces, respectively:
> 
> "modem": Diag + GNSS + Modem + Modem
> "ecm"  : Diag + GNSS + Modem + ECM
> "rmnet": Diag + GNSS + Modem + QMI
> 
> A detailed description of the USB configuration for each mode follows:

Thanks for updating the commit message and including rmnet.

> Signed-off-by: Carl Yin <carl.yin@xxxxxxxxxxx>
> ---
> 
> v2:
> add at+qcfgext="usbnet","rmnet" and RSVD(3)
> ---
>  drivers/usb/serial/option.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index 152ad8826..21fb8da43 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -256,6 +256,7 @@ static void option_instat_callback(struct urb *urb);
>  #define QUECTEL_PRODUCT_RM500Q			0x0800
>  #define QUECTEL_PRODUCT_EC200S_CN		0x6002
>  #define QUECTEL_PRODUCT_EC200T			0x6026
> +#define QUECTEL_PRODUCT_BG95			0x0700

But you seemed to have miss my other comments. These defines should
remain sorted numerically by PID.

>  #define CMOTECH_VENDOR_ID			0x16d8
>  #define CMOTECH_PRODUCT_6001			0x6001
> @@ -1143,6 +1144,10 @@ static const struct usb_device_id option_ids[] = {
>  	  .driver_info = ZLP },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
> +	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG95, 0xff, 0xff, 0xff),
> +	  .driver_info = RSVD(3) | ZLP },
> +	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG95, 0xff, 0xfe, 0xff),
> +	  .driver_info = ZLP },

And here it looks like you should be able to just have a single entry
using USB_DEVICE_INTERFACE_CLASS().

>  	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
>  	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },

Johan



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux