From: Michal Pecio <michal.pecio@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: yicongsrfy@163.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, linux-usb@vger.kernel.org,
netdev@vger.kernel.org, oliver@neukum.org, pabeni@redhat.com
Subject: Re: [PATCH net v5 2/3] net: usb: ax88179_178a: add USB device driver for config selection
Date: Mon, 20 Oct 2025 18:23:27 +0200 [thread overview]
Message-ID: <20251020182327.0dd8958a.michal.pecio@gmail.com> (raw)
In-Reply-To: <e4ce396c-0047-4bd1-a5d2-aee3b86315b1@rowland.harvard.edu>
On Mon, 20 Oct 2025 11:56:50 -0400, Alan Stern wrote:
> On Sat, Oct 18, 2025 at 05:56:18PM +0200, Michal Pecio wrote:
> > On Sat, 18 Oct 2025 11:36:11 -0400, Alan Stern wrote:
> > > How are prefer_vendor() and usb_driver_preferred() supposed to know
> > > which configuration is being considered?
> >
> > Currently they don't need to know, but this could be added by passing
> > a temporary struct with more stuff in place of udev.
> >
> > Really, this whole usb_drv->preferred business could be a simple
> > boolean flag, if not for r8152 needing to issue control transfers to
> > the chip to find whether it supports at all.
> >
> > It seems that ax88179_preferred() could simply always return true.
>
> Instead of all this preferred() stuff, why not have the ax88179 driver's
> probe routine check for a different configuration with a vendor-specific
> interface? If that other config is present and the chip is the right
> type then you can call usb_driver_set_configuration() -- this is exactly
> what it's meant for.
That could be doable and some code could be shared I guess, but how to
get the probe() routine to run in the first place?
The chip may be in other configuration, without this vendor interface.
If we remove _AND_INTERFACE_INFO, it's still a problem that cdc_ether
may already be bound to the CDC interface in CDC config.
Registering a *device* driver plows through such obstacles, because
core allows device drivers to immediately displace existing drivers.
It seems that this could work, if cdc_ether blacklisting and revert
of _AND_INTERFACE_INFO are applied as suggested in this series.
(But as part of the main commit, to avoid transient regressions).
I wonder if blacklisting is considered necessary evil? Without it, it's
possible that cdc_ether binds for a moment before it's kicked out by
the vendor driver. Looks weird in dmesg, at the very least.
FWIW, my RTL8153 is blacklisted in cdc_ether too. So much for the
promise that cfgselectors will allow users to choose drivers ;)
Regards,
Michal
next prev parent reply other threads:[~2025-10-20 16:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-11 7:53 [PATCH net v5 0/3] ax88179 driver optimization yicongsrfy
2025-10-11 7:53 ` [PATCH net v5 1/3] net: usb: support quirks in cdc_ncm yicongsrfy
2025-10-11 7:53 ` [PATCH net v5 2/3] net: usb: ax88179_178a: add USB device driver for config selection yicongsrfy
2025-10-13 9:07 ` Michal Pecio
2025-10-17 2:42 ` yicongsrfy
2025-10-17 13:10 ` Alan Stern
2025-10-17 17:15 ` Michal Pecio
2025-10-18 2:27 ` Alan Stern
2025-10-18 15:21 ` Michal Pecio
2025-10-18 15:36 ` Alan Stern
2025-10-18 15:56 ` Michal Pecio
2025-10-20 15:56 ` Alan Stern
2025-10-20 16:23 ` Michal Pecio [this message]
2025-10-20 16:59 ` Alan Stern
2025-10-21 9:13 ` Oliver Neukum
2025-10-21 16:33 ` Alan Stern
2025-10-22 7:58 ` Oliver Neukum
2025-10-22 14:28 ` Alan Stern
2025-10-21 2:29 ` Yi Cong
2025-10-21 2:59 ` Alan Stern
2025-10-21 6:26 ` Yi Cong
2025-10-21 16:26 ` Alan Stern
2025-10-20 9:59 ` Oliver Neukum
2025-10-20 10:48 ` Greg KH
2025-10-20 15:59 ` Michal Pecio
2025-10-21 9:02 ` Oliver Neukum
2025-10-20 10:27 ` Oliver Neukum
2025-10-11 7:53 ` [PATCH net v5 3/3] Revert "net: usb: ax88179_178a: Bind only to vendor-specific interface" yicongsrfy
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=20251020182327.0dd8958a.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=pabeni@redhat.com \
--cc=stern@rowland.harvard.edu \
--cc=yicongsrfy@163.com \
/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;
as well as URLs for NNTP newsgroup(s).