lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 18 May 2022 14:02:07 +0200
From:   Johan Hovold <johan@...nel.org>
To:     Carl Yin(殷张成) <carl.yin@...ctel.com>
Cc:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "rspmn@...or.de" <rspmn@...or.de>
Subject: Re: [PATCH v2] USB: serial: option: add Quectel BG95 modem

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@...ctel.com>
> ---
> 
> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ