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: <20221005021212.qwnbmq6p7t26c3a4@synopsys.com>
Date:   Wed, 5 Oct 2022 02:12:29 +0000
From:   Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To:     Ferry Toth <fntoth@...il.com>
CC:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrey Smirnov <andrew.smirnov@...il.com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Felipe Balbi <balbi@...nel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] Revert "usb: dwc3: Don't switch OTG -> peripheral
 if extcon is present"

On Tue, Oct 04, 2022, Ferry Toth wrote:
> Hi
> 
> Op 04-10-2022 om 10:28 schreef Andy Shevchenko:
> > On Mon, Oct 03, 2022 at 09:57:35PM +0000, Thinh Nguyen wrote:
> > > On Tue, Sep 27, 2022, Andy Shevchenko wrote:
> > > > This reverts commit 0f01017191384e3962fa31520a9fd9846c3d352f.
> > > > 
> > > > As pointed out by Ferry this breaks Dual Role support on
> > > > Intel Merrifield platforms.
> > > Can you provide more info than this (any debug info/description)? It
> > > will be difficult to come back to fix with just this to go on. The
> > > reverted patch was needed to fix a different issue.
> 
> On Merrifield we have a switch with extcon driver to switch between host and
> device mode. Now with commit 0f01017, device mode works. In host mode the
> root hub appears, but no devices appear. In the logs there are no messages
> from tusb1210, but there should be because lately there normally are
> (harmless) error messages. Nothing in the logs point in the direction of
> tusb1210 not being probed.
> 
> The discussion is here: https://urldefense.com/v3/__https://lkml.org/lkml/2022/9/24/237__;!!A4F2R9G_pg!avfDjiGwi8xu0grHYrQQTZEEUnmaKu82xxdty0ZltxyU8BkoFD6AMq4a-7STYiKxNQpdYXgP1QG_IZbroEM$
> 
> I tried moving some code as suggested without result: https://urldefense.com/v3/__https://lkml.org/lkml/2022/9/24/434__;!!A4F2R9G_pg!avfDjiGwi8xu0grHYrQQTZEEUnmaKu82xxdty0ZltxyU8BkoFD6AMq4a-7STYiKxNQpdYXgP1QG_boaK8Qw$
> 
> And with success: https://urldefense.com/v3/__https://lkml.org/lkml/2022/9/25/285__;!!A4F2R9G_pg!avfDjiGwi8xu0grHYrQQTZEEUnmaKu82xxdty0ZltxyU8BkoFD6AMq4a-7STYiKxNQpdYXgP1QG_MbbbZII$
> 
> So, as Andrey Smirnov writes "I think we'd want to figure out why the
> ordering is important if we want to justify the above fix."
> 
> > It's already applied, but Ferry probably can provide more info if you describe
> > step-by-step instructions. (I'm still unable to test this particular type of
> > features since remove access is always in host mode.)
> > 
> I'd be happy to test.

Thanks!

Does the failure only happen the first time host is initialized? Or can
it recover after switching to device then back to host mode?

Probably the failure happens if some step(s) in dwc3_core_init() hasn't
completed.

tusb1210 is a phy driver right? The issue is probably because we didn't
initialize the phy yet. So, I suspect placing dwc3_get_extcon() after
initializing the phy will probably solve the dependency problem.

You can try something for yourself or I can provide something to test
later if you don't mind (maybe next week if it's ok).

Thanks,
Thinh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ