lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241203004955.bc5haxkakzwmhjgc@synopsys.com>
Date: Tue, 3 Dec 2024 00:50:02 +0000
From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To: Roger Quadros <rogerq@...nel.org>
CC: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Siddharth Vadapalli <s-vadapalli@...com>, "srk@...com" <srk@...com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: dwc3: dwc3-am62: Re-initialize controller if lost
 power in PM suspend

Hi Roger,

On Wed, Nov 27, 2024, Roger Quadros wrote:
> Hi Thinh,
> 
> On 27/11/2024 00:15, Thinh Nguyen wrote:
> > On Mon, Nov 25, 2024, Roger Quadros wrote:
> >>
> >>
> >> On 25/11/2024 20:23, Thinh Nguyen wrote:
> >>> On Fri, Nov 22, 2024, Roger Quadros wrote:
> >>>> If controller looses power during PM suspend then re-initialize
> >>>> it. We use the DEBUG_CFG register to track if controller lost power
> >>>> or was reset in PM suspend.
> >>>>
> >>>> Move all initialization code into dwc3_ti_init() so it can be re-used.
> >>>>
> >>>> Signed-off-by: Roger Quadros <rogerq@...nel.org>
> >>>> ---
> >>>>  drivers/usb/dwc3/dwc3-am62.c | 82 +++++++++++++++++++++++++++++---------------
> >>>>  1 file changed, 55 insertions(+), 27 deletions(-)
> >>>>
> >>>> diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
> >>>> index fad151e78fd6..2192222faf4f 100644
> >>>> --- a/drivers/usb/dwc3/dwc3-am62.c
> >>>> +++ b/drivers/usb/dwc3/dwc3-am62.c
> >>>> @@ -108,6 +108,9 @@
> >>>>  
> >>>>  #define DWC3_AM62_AUTOSUSPEND_DELAY	100
> >>>>  
> >>>> +#define USBSS_DEBUG_CFG_OFF		0x7
> >>>> +#define USBSS_DEBUG_CFG_DISABLED	0x7
> >>>
> >>> Do we need 2 different macros with the same value of the same register
> >>> for this?
> >>
> >> Oops. This is a mistake. The second one should be 0.
> >>
> > 
> > Ok. Please send a fix.
> 
> Yes I will send a v2.
> 
> I have a query regarding this. Even though we restore the USB wrapper context
> the XHCI driver still complains with below message.
> 
> [   68.235111] xhci-hcd xhci-hcd.0.auto: xHC error in resume, USBSTS 0x401, Reinit
> 
> Clearly the Save/restore failed and so SRE bit is set.
> Is this something to be concerned about or needs addressing?
> 
> the host controller functions fine as it is re-initialized by the
> XHCI driver.
> 

Any device/function that demands no interruption between suspend/resume,
then it may be an issue. For example, That means that you can't suspend
and properly resume in the middle of file transfer for MSC.

BR,
Thinh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ