public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, Daniele Palmas <dnlplm@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] USB: serial: option: add Telit Cinterion FE910C04 (ECM) composition
Date: Thu, 10 Jul 2025 16:26:56 +0200	[thread overview]
Message-ID: <aG_NsFLI5UsVvYkt@hovoldconsulting.com> (raw)
In-Reply-To: <CAHkwnC9tb=SZXsP7t8oeNPJ24pij4Y1ayFVRk6tqLhzc5zbsqQ@mail.gmail.com>

On Wed, Jul 09, 2025 at 12:50:27PM +0200, Fabio Porcedda wrote:
> Il giorno mer 9 lug 2025 alle ore 12:08 Johan Hovold
> <johan@kernel.org> ha scritto:
> >
> > On Tue, Jul 08, 2025 at 02:00:04PM +0200, Fabio Porcedda wrote:
> > > Add Telit Cinterion FE910C04 (ECM) composition:
> > > 0x10c7: ECM + tty (AT) + tty (AT) + tty (diag)

> > >  /* Interface does not support modem-control requests */
> > >  #define NCTRL(ifnum) ((BIT(ifnum) & 0xff) << 8)
> > > +#define NCTRL_ALL    (0xff << 8)

> > > +     { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x30),     /* Telit FE910C04 (ECM) */
> > > +       .driver_info = NCTRL_ALL },
> >
> > Please just use NCTRL(4) here. (And remember to mention additions like
> > this in the commit message in the future.)
> 
> Ok, I will send a v2.
> 
> > Or do you have reasons to believe the interface numbering may change? Or
> > is it just to avoid matching on both number and protocol?
> 
> The interface number should not change, it's just to have a more
> generic definition that matches also other pids for the same soc. I
> think it's easier to write and less error prone because the interface
> number changes based on the PID.

Yeah, I can see it having some merit. Maybe I reacted to the naming as
I at first incorrectly read it as no interface supporting the control
request (perhaps naming it "NCTRL_ANY" would have avoided this).

But for consistency I think we can continue using the interface numbers
until we have some better abstraction for these that can be used to
avoid also the explicit per protocol entries.

Johan

      reply	other threads:[~2025-07-10 14:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08 12:00 [PATCH] USB: serial: option: add Telit Cinterion FE910C04 (ECM) composition Fabio Porcedda
2025-07-09 10:08 ` Johan Hovold
2025-07-09 10:50   ` Fabio Porcedda
2025-07-10 14:26     ` Johan Hovold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aG_NsFLI5UsVvYkt@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=dnlplm@gmail.com \
    --cc=fabio.porcedda@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox