From: Paolo Abeni <pabeni@redhat.com>
To: Douglas Anderson <dianders@chromium.org>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Hayes Wang <hayeswang@realtek.com>
Cc: danielgeorgem@google.com, Andrew Lunn <andrew@lunn.ch>,
Grant Grundler <grundler@chromium.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] r8152: If inaccessible at resume time, issue a reset
Date: Tue, 21 May 2024 11:13:50 +0200 [thread overview]
Message-ID: <75651199a933427a7fc3980ef8a2139f5f1f1695.camel@redhat.com> (raw)
In-Reply-To: <20240520134108.net-next.1.Ibeda5c0772812ce18953150da5a0888d2d875150@changeid>
On Mon, 2024-05-20 at 13:41 -0700, Douglas Anderson wrote:
> If we happened to get a USB transfer error during the transition to
> suspend then the usb_queue_reset_device() that r8152_control_msg()
> calls will get dropped on the floor. This is because
> usb_lock_device_for_reset() (which usb_queue_reset_device() uses)
> silently fails if it's called when a device is suspended or if too
> much time passes.
>
> Let's resolve this by resetting the device ourselves in r8152's
> resume() function.
>
> NOTE: due to timing, it's _possible_ that we could end up with two USB
> resets: the one queued previously and the one called from the resume()
> patch. This didn't happen in test cases I ran, though it's conceivably
> possible. We can't easily know if this happened since
> usb_queue_reset_device() can just silently drop the reset request. In
> any case, it's not expected that this is a problem since the two
> resets can't run at the same time (because of the device lock) and it
> should be OK to reset the device twice. If somehow the double-reset
> causes problems we could prevent resets from being queued up while
> suspend is running.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
## Form letter - net-next-closed
The merge window for v6.10 has begun and we have already posted our
pull
request. Therefore net-next is closed for new drivers, features, code
refactoring and optimizations. We are currently accepting bug fixes
only.
Please repost when net-next reopens after May 26th.
RFC patches sent for review only are obviously welcome at any time.
See:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
prev parent reply other threads:[~2024-05-21 9:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 20:41 Douglas Anderson
2024-05-20 20:41 ` [PATCH net-next 2/2] r8152: Wake up the system if the we need " Douglas Anderson
2024-05-21 9:13 ` Paolo Abeni [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=75651199a933427a7fc3980ef8a2139f5f1f1695.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew@lunn.ch \
--cc=danielgeorgem@google.com \
--cc=davem@davemloft.net \
--cc=dianders@chromium.org \
--cc=edumazet@google.com \
--cc=grundler@chromium.org \
--cc=hayeswang@realtek.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@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
all inboxes | Powered by JetHome®