All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: linux-usb@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Grant Grundler" <grundler@chromium.org>,
	"Hayes Wang" <hayeswang@realtek.com>,
	"Simon Horman" <horms@kernel.org>, "Bjørn Mork" <bjorn@mork.no>,
	netdev@vger.kernel.org, "Brian Geffon" <bgeffon@google.com>,
	"Alan Stern" <stern@rowland.harvard.edu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 3/3] r8152: Choose our USB config with choose_configuration() rather than probe()
Date: Mon, 4 Dec 2023 18:27:40 -0800	[thread overview]
Message-ID: <20231204182740.62a49a14@kernel.org> (raw)
In-Reply-To: <20231201102946.v2.3.Ie00e07f07f87149c9ce0b27ae4e26991d307e14b@changeid>

On Fri,  1 Dec 2023 10:29:52 -0800 Douglas Anderson wrote:
> If you deauthorize the r8152 device (by writing 0 to the "authorized"
> field in sysfs) and then reauthorize it (by writing a 1) then it no
> longer works. This is because when you do the above we lose the
> special configuration that we set in rtl8152_cfgselector_probe().
> Deauthorizing causes the config to be set to -1 and then reauthorizing
> runs the default logic for choosing the best config.
> 
> I made an attempt to fix it so that the config is kept across
> deauthorizing / reauthorizing [1] but it was a bit ugly.
> 
> Let's instead use the new USB core feature to override
> choose_configuration().
> 
> This patch relies upon the patches ("usb: core: Don't force USB
> generic_subclass drivers to define probe()") and ("usb: core: Allow
> subclassed USB drivers to override usb_choose_configuration()")

Acked-by: Jakub Kicinski <kuba@kernel.org>

  parent reply	other threads:[~2023-12-05  2:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01 18:29 [PATCH v2 0/3] net: usb: r8152: Fix lost config across deauthorize+authorize Douglas Anderson
2023-12-01 18:29 ` [PATCH v2 1/3] usb: core: Don't force USB generic_subclass drivers to define probe() Douglas Anderson
2023-12-01 19:28   ` Alan Stern
2023-12-02  2:14   ` Grant Grundler
2023-12-01 18:29 ` [PATCH v2 2/3] usb: core: Allow subclassed USB drivers to override usb_choose_configuration() Douglas Anderson
2023-12-01 19:30   ` Alan Stern
2023-12-02 19:11   ` Bjørn Mork
2023-12-01 18:29 ` [PATCH net v2 3/3] r8152: Choose our USB config with choose_configuration() rather than probe() Douglas Anderson
2023-12-02  6:28   ` Grant Grundler
2023-12-05  2:27   ` Jakub Kicinski [this message]
2023-12-05  2:27 ` [PATCH v2 0/3] net: usb: r8152: Fix lost config across deauthorize+authorize Jakub Kicinski
2023-12-05  2:34   ` Greg Kroah-Hartman

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=20231204182740.62a49a14@kernel.org \
    --to=kuba@kernel.org \
    --cc=bgeffon@google.com \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=dianders@chromium.org \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=grundler@chromium.org \
    --cc=hayeswang@realtek.com \
    --cc=horms@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stern@rowland.harvard.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.