Re: [PATCH] USB: serial: option: add Quectel EM05-G modem

From: Johan Hovold
Date: Fri Nov 25 2022 - 04:27:13 EST


On Sat, Nov 19, 2022 at 05:44:47PM +0800, Duke Xin wrote:
> The EM05-G modem has 2 USB configurations that are configurable via the AT
> command AT+QCFG="usbnet",[ 0 | 2 ] which make the modem enumerate with
> the following interfaces, respectively:
>
> "RMNET" : AT + DIAG + NMEA + Modem + QMI
> "MBIM" : MBIM + AT + DIAG + NMEA + Modem
>
> The detailed description of the USB configuration for each mode as follows:

...

> Signed-off-by: Duke Xin <duke_xinanwen@xxxxxxx>
> ---

This looks much better, thanks!

In the future, when updating a patch you should include a changelog here
below the '---' line and the patch revision should be indicated in the
Subject prefix (e.g. this should have been "[PATCH v3]: USB: serial:
...").

> drivers/usb/serial/option.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index c3b7f1d98e78..fc14df5033d8 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -254,6 +254,7 @@ static void option_instat_callback(struct urb *urb);
> #define QUECTEL_PRODUCT_BG96 0x0296
> #define QUECTEL_PRODUCT_EP06 0x0306
> #define QUECTEL_PRODUCT_EM05G 0x030a
> +#define QUECTEL_PRODUCT_EM05G_SG 0x0311

These defines should be sorted by PID.

> #define QUECTEL_PRODUCT_EM060K 0x030b
> #define QUECTEL_PRODUCT_EM12 0x0512
> #define QUECTEL_PRODUCT_RM500Q 0x0800
> @@ -1160,6 +1161,8 @@ static const struct usb_device_id option_ids[] = {
> { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
> { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff),
> .driver_info = RSVD(6) | ZLP },
> + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_SG, 0xff),
> + .driver_info = RSVD(6) | ZLP },

And you have some stray whitespace after the comma here, which would
have been picked up by scripts/checkpatch.pl which you should run on
your patches before submitting them.

> { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) },
> { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) },
> { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x40) },

I've fixed up the above nits (sort order and white space) and applied
this one for 6.2 now so you don't need to send a v4 this time.

Johan