[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fae9966-5e3a-488b-8ab5-51d46488e097@suse.com>
Date: Mon, 20 Oct 2025 11:59:06 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Michal Pecio <michal.pecio@...il.com>,
Alan Stern <stern@...land.harvard.edu>
Cc: yicongsrfy@....com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, linux-usb@...r.kernel.org,
netdev@...r.kernel.org, oliver@...kum.org, pabeni@...hat.com
Subject: Re: [PATCH net v5 2/3] net: usb: ax88179_178a: add USB device driver
for config selection
On 18.10.25 17:21, Michal Pecio wrote:
> index e85105939af8..1d2c5ebc81ab 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -1202,6 +1202,8 @@ extern ssize_t usb_show_dynids(struct usb_dynids *dynids, char *buf);
> * @post_reset: Called by usb_reset_device() after the device
> * has been reset
> * @shutdown: Called at shut-down time to quiesce the device.
> + * @preferred: Check if this driver is preferred over generic class drivers
> + * applicable to the device. May probe device with control transfers.
> * @id_table: USB drivers use ID table to support hotplugging.
> * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set
> * or your driver's probe function will never get called.
> @@ -1255,6 +1257,8 @@ struct usb_driver {
>
> void (*shutdown)(struct usb_interface *intf);
>
> + bool (*preferred)(struct usb_device *udev);
I am sorry, but this is a bit clunky. If you really want to
introduce such a method, why not just return the preferred configuration?
Regards
Oliver
Powered by blists - more mailing lists