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: <CALAqxLU3sWrgPjFqZ2vK0m8wVThtE1hDsbNq9zRC7ritzyNHmQ@mail.gmail.com>
Date:   Tue, 22 May 2018 14:57:25 -0700
From:   John Stultz <john.stultz@...aro.org>
To:     Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        John Youn <John.Youn@...opsys.com>,
        Artur Petrosyan <Arthur.Petrosyan@...opsys.com>,
        Grigor Tovmasyan <Grigor.Tovmasyan@...opsys.com>,
        Felipe Balbi <felipe.balbi@...ux.intel.com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: Re: [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature

On Tue, May 22, 2018 at 7:24 AM, Minas Harutyunyan
<Minas.Harutyunyan@...opsys.com> wrote:
> Hi John,
>
> Please provide log with debug enabled configuration.

Ok. Attached.
For dmesg-broken.log:  OTG removed at 77, and OTG plugged in at 82
For dmesg-with-patch.log: OTG removed at 31, OTG plugged in at 38.

Note with the dmesg-with-patch (using my patch), things seem to be
working ok. Though in the example above it may look odd, as usually it
switches to to host mode, then when it detects a low speed device (a
mouse which I had plugged in), it will reset to switch to low-speed,
but I didn't wait long enough for the reset to complete and the mouse
to be detected before re-plugging in the OTG port.

> On 5/21/2018 11:41 PM, John Stultz wrote:
>> On Mon, May 21, 2018 at 1:45 AM, Minas Harutyunyan
>> <Minas.Harutyunyan@...opsys.com> wrote:
>>> Hi John,
>>>
>>> On 5/19/2018 4:49 AM, John Stultz wrote:
>>>> In 4.17-rc, commit 03ea6d6e9e1f ("usb: dwc2: Enable power down")
>>>> caused the HiKey board to not correctly handle switching between
>>>> usb-gadget and usb-host mode.
>>>>
>>>> Unplugging the OTG port would result in:
> OTG port you mean MicroAB, Correct?

Correct.

> dwc2 driver loaded when some device connected to OTG port?

Yes, I normally boot with the board plugged in to OTG as a
peripheral/gadget for adb.

> And below message printed after disconnect the device from OTG port?
>
>>>> [   42.240973] dwc2 f72c0000.usb: dwc2_restore_host_registers: no host registers to restore
>>>> [   42.249066] dwc2 f72c0000.usb: dwc2_host_exit_hibernation: failed to restore host registers

Correct.

>>>> And the USB-host ports would not function.
> USB-host ports - you mean 2 USB A-ports, connected to TS3USB221 HUB?

Correct.

> Switching ports between OTG and Host ports via TS3USB221 Switch
> performing automatically or by some SW tool?

Its done automatically, when the OTG cable is detected it the host
ports are disabled and when the OTG port is empty the host ports are
enabled.

Let me know if you need anything else!

thanks
-john

Download attachment "dmesg-broken.log.xz" of type "application/octet-stream" (24484 bytes)

Download attachment "dmesg-with-patch.log.xz" of type "application/octet-stream" (49796 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ