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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201028125812.GA59692@nuc8i5>
Date:   Wed, 28 Oct 2020 21:46:29 +0800
From:   Dejin Zheng <zhengdejin5@...il.com>
To:     Felipe Balbi <balbi@...nel.org>
Cc:     gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>
Subject: Re: [PATCH v3] usb: dwc3: core: fix a issue about clear connect state

On Tue, Oct 27, 2020 at 10:33:09AM +0200, Felipe Balbi wrote:
Hi Balbi:

Thank you so much for your comment.

> 
> Hi,
> 
> Dejin Zheng <zhengdejin5@...il.com> writes:
> > According to Synopsys Programming Guide chapter 2.2 Register Resets,
> > it cannot reset the DCTL register by setting DCTL.CSFTRST for core soft
> > reset, if DWC3 controller as a slave device and stay connected with a usb
> > host, then, while rebooting linux, it will fail to reinitialize dwc3 as a
> > slave device when the DWC3 controller did not power off. because the
> > connection status is incorrect, so we also need to clear DCTL.RUN_STOP
> > bit for disabling connect when doing core soft reset. There will still
> > be other stale configuration in DCTL, so reset the other fields of DCTL
> > to the default value 0.
> 
> This commit log is a bit hard to understand. When does this problem
> actually happen? It seems like it's in the case of, perhaps, kexecing
> into a new kernel, is that right?
> 
It happens when entering the kernel for the second time after the reboot
command.

> At the time dwc3_core_soft_reset() is called, the assumption is that
> we're starting with a clean core, from power up. If we have stale
> configuration from a previous run, we should fix this on the exit
> path. Note that if we're reaching probe with pull up connected, we
> already have issues elsewhere.
> 
> I think this is not the right fix for the problem.
>
I think you are right, Thinh also suggested me fix it on the exit path
in the previous patch v2. Do you think I can do these cleanups in the
shutdown hook of this driver? Balbi, is there a more suitable place to
do this by your rich experience? Thanks!

BR,
Dejin
> -- 
> balbi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ