diff mbox series

[v3] USB: serial: option: Add Telit LE910Cx 0x1250 composition

Message ID 20220531102301.13435-1-c.lobrano@gmail.com
State New
Headers show
Series [v3] USB: serial: option: Add Telit LE910Cx 0x1250 composition | expand

Commit Message

Carlo Lobrano May 31, 2022, 10:23 a.m. UTC
Add support for the following Telit LE910Cx composition:

0x1250: rmnet, tty, tty, tty, tty

Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
---
v3: - fix subject prefix and modem name (s/LN910Cx/LE910Cx)
    - more descriptive e-mail content
v2: use RSVD in place of NCTRL for interface 0 (rmnet)

 drivers/usb/serial/option.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Johan Hovold June 9, 2022, 12:27 p.m. UTC | #1
On Tue, May 31, 2022 at 12:23:01PM +0200, Carlo Lobrano wrote:
> Add support for the following Telit LE910Cx composition:
> 
> 0x1250: rmnet, tty, tty, tty, tty
> 
> Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
> ---
> v3: - fix subject prefix and modem name (s/LN910Cx/LE910Cx)
>     - more descriptive e-mail content
> v2: use RSVD in place of NCTRL for interface 0 (rmnet)

Thanks for the update (and thanks for reviewing, Daniele).

You forgot to include the lsusb output in v2 and v3 but I found it here:

	https://lore.kernel.org/r/20220528073445.50066-1-c.lobrano@gmail.com

>  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 152ad882657d..cd9aa61ec801 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -1275,6 +1275,8 @@ static const struct usb_device_id option_ids[] = {
>  	  .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
>  	{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1231, 0xff),	/* Telit LE910Cx (RNDIS) */
>  	  .driver_info = NCTRL(2) | RSVD(3) },
> +	{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1250, 0xff),	/* Telit LE910Cx (rmnet) */
> +	  .driver_info = RSVD(0) },

Looks you can match on the interface SubClass and Protocol using
USB_DEVICE_INFO() and avoid using RSVD() here which is preferred when
possible.

>  	{ USB_DEVICE(TELIT_VENDOR_ID, 0x1260),
>  	  .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
>  	{ USB_DEVICE(TELIT_VENDOR_ID, 0x1261),

Care to respin a v4? You can keep Daniele's reviewed-by tag when
resending (i.e. include it before your SoB).

Johan
Carlo Lobrano June 10, 2022, 8:14 a.m. UTC | #2
Hi Johan,

On Thu, 9 Jun 2022 at 14:27, Johan Hovold <johan@kernel.org> wrote:
>
> On Tue, May 31, 2022 at 12:23:01PM +0200, Carlo Lobrano wrote:
> > Add support for the following Telit LE910Cx composition:
> >
> > 0x1250: rmnet, tty, tty, tty, tty
> >
> > Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
> > ---
> > v3: - fix subject prefix and modem name (s/LN910Cx/LE910Cx)
> >     - more descriptive e-mail content
> > v2: use RSVD in place of NCTRL for interface 0 (rmnet)
>
> Thanks for the update (and thanks for reviewing, Daniele).
>
> You forgot to include the lsusb output in v2 and v3 but I found it here:
>
>         https://lore.kernel.org/r/20220528073445.50066-1-c.lobrano@gmail.com
>
> >  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 152ad882657d..cd9aa61ec801 100644
> > --- a/drivers/usb/serial/option.c
> > +++ b/drivers/usb/serial/option.c
> > @@ -1275,6 +1275,8 @@ static const struct usb_device_id option_ids[] = {
> >         .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
> >       { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1231, 0xff),    /* Telit LE910Cx (RNDIS) */
> >         .driver_info = NCTRL(2) | RSVD(3) },
> > +     { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1250, 0xff),    /* Telit LE910Cx (rmnet) */
> > +       .driver_info = RSVD(0) },
>
> Looks you can match on the interface SubClass and Protocol using
> USB_DEVICE_INFO() and avoid using RSVD() here which is preferred when
> possible.

This is a good point, I just need to double check if this was true
also with older firmwares I think

>
> >       { USB_DEVICE(TELIT_VENDOR_ID, 0x1260),
> >         .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
> >       { USB_DEVICE(TELIT_VENDOR_ID, 0x1261),
>
> Care to respin a v4? You can keep Daniele's reviewed-by tag when
> resending (i.e. include it before your SoB).
>
> Johan

Carlo
diff mbox series

Patch

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 152ad882657d..cd9aa61ec801 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1275,6 +1275,8 @@  static const struct usb_device_id option_ids[] = {
 	  .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
 	{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1231, 0xff),	/* Telit LE910Cx (RNDIS) */
 	  .driver_info = NCTRL(2) | RSVD(3) },
+	{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1250, 0xff),	/* Telit LE910Cx (rmnet) */
+	  .driver_info = RSVD(0) },
 	{ USB_DEVICE(TELIT_VENDOR_ID, 0x1260),
 	  .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
 	{ USB_DEVICE(TELIT_VENDOR_ID, 0x1261),