[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b39d468e-beb9-4a44-8fe6-83754ffbd367@rowland.harvard.edu>
Date: Thu, 13 Feb 2025 10:30:07 -0500
From: "stern@...land.harvard.edu" <stern@...land.harvard.edu>
To: Pawel Laszczak <pawell@...ence.com>
Cc: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"krzysztof.kozlowski@...aro.org" <krzysztof.kozlowski@...aro.org>,
"christophe.jaillet@...adoo.fr" <christophe.jaillet@...adoo.fr>,
"javier.carrasco@...fvision.net" <javier.carrasco@...fvision.net>,
"make_ruc2021@....com" <make_ruc2021@....com>,
"peter.chen@....com" <peter.chen@....com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Pawel Eichler <peichler@...ence.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] usb: xhci: lack of clearing xHC resources
On Thu, Feb 13, 2025 at 10:27:00AM +0000, Pawel Laszczak wrote:
> The xHC resources allocated for USB devices are not released in correct order after resuming in case when while suspend device was reconnected.
>
> This issue has been detected during the fallowing scenario:
> - connect hub HS to root port
> - connect LS/FS device to hub port
> - wait for enumeration to finish
> - force DUT to suspend
> - reconnect hub attached to root port
> - wake DUT
DUT refers to the host, not the LS/FS device plugged into the hub, is
that right?
> For this scenario during enumeration of USB LS/FS device the Cadence xHC reports completion error code for xHCi commands because the devices was not property disconnected and in result the xHC resources has not been correct freed.
> XHCI specification doesn't mention that device can be reset in any order so, we should not treat this issue as Cadence xHC controller bug.
> Similar as during disconnecting in this case the device should be cleared starting form the last usb device in tree toward the root hub.
> To fix this issue usbcore driver should disconnect all USB devices connected to hub which was reconnected while suspending.
No, that's not right at all. We do not want to disconnect these devices
if there's any way to avoid it.
There must be another way to tell the host controller to release the
devices' resources. Doesn't the usb_reset_and_verify_device() call do
something like that anyway? After all, the situation should be very
similar to what happens when a device is simply reset.
Alan Stern
Powered by blists - more mailing lists