All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	John Youn <John.Youn@synopsys.com>,
	Artur Petrosyan <Arthur.Petrosyan@synopsys.com>,
	Grigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: Re: [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature
Date: Tue, 22 May 2018 14:57:25 -0700	[thread overview]
Message-ID: <CALAqxLU3sWrgPjFqZ2vK0m8wVThtE1hDsbNq9zRC7ritzyNHmQ@mail.gmail.com> (raw)
In-Reply-To: <410670D7E743164D87FA6160E7907A560131356C4E@am04wembxa.internal.synopsys.com>

[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]

On Tue, May 22, 2018 at 7:24 AM, Minas Harutyunyan
<Minas.Harutyunyan@synopsys.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@synopsys.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

[-- Attachment #2: dmesg-broken.log.xz --]
[-- Type: application/octet-stream, Size: 24484 bytes --]

[-- Attachment #3: dmesg-with-patch.log.xz --]
[-- Type: application/octet-stream, Size: 49796 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: John Stultz <john.stultz@linaro.org>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	John Youn <John.Youn@synopsys.com>,
	Artur Petrosyan <Arthur.Petrosyan@synopsys.com>,
	Grigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: usb: dwc2: Fix HiKey regression caused by power_down feature
Date: Tue, 22 May 2018 14:57:25 -0700	[thread overview]
Message-ID: <CALAqxLU3sWrgPjFqZ2vK0m8wVThtE1hDsbNq9zRC7ritzyNHmQ@mail.gmail.com> (raw)

On Tue, May 22, 2018 at 7:24 AM, Minas Harutyunyan
<Minas.Harutyunyan@synopsys.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@synopsys.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

  reply	other threads:[~2018-05-22 21:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-19  0:49 [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature John Stultz
2018-05-19  0:49 ` John Stultz
2018-05-21  8:45 ` [PATCH] " Minas Harutyunyan
2018-05-21  8:45   ` Minas Harutyunyan
2018-05-21 19:40   ` [PATCH] " John Stultz
2018-05-21 19:40     ` John Stultz
2018-05-22 14:24     ` [PATCH] " Minas Harutyunyan
2018-05-22 14:24       ` Minas Harutyunyan
2018-05-22 21:57       ` John Stultz [this message]
2018-05-22 21:57         ` John Stultz
2018-09-20 14:17         ` [PATCH] " Artur Petrosyan
2018-09-20 14:17           ` Artur Petrosyan
2018-09-21  1:05           ` [PATCH] " John Stultz
2018-09-21  1:05             ` John Stultz
2018-09-24  5:57             ` [PATCH] " Artur Petrosyan
2018-09-24  5:57               ` Artur Petrosyan
2018-09-24 18:51               ` [PATCH] " John Stultz
2018-09-24 18:51                 ` John Stultz
2018-09-25 10:04                 ` [PATCH] " Artur Petrosyan
2018-09-25 10:04                   ` Artur Petrosyan
2018-09-25 17:59                   ` [PATCH] " John Stultz
2018-09-25 17:59                     ` John Stultz
2018-09-26  6:02                     ` [PATCH] " Artur Petrosyan
2018-09-26  6:02                       ` Artur Petrosyan
     [not found]                       ` <CALAqxLWOBFO_CjfBFNwbC+qNjtK=TgYrPusb4r5-dThBD5bVnw@mail.gmail.com>
2018-10-01  6:56                         ` [PATCH] " Artur Petrosyan
2018-10-01  6:56                           ` Artur Petrosyan
2018-09-27 12:33                     ` [PATCH] " Artur Petrosyan
2018-09-27 12:33                       ` Artur Petrosyan
2018-09-28 18:32                       ` [PATCH] " John Stultz
2018-09-28 18:32                         ` John Stultz
2018-10-01  7:06                         ` [PATCH] " Artur Petrosyan
2018-10-01  7:06                           ` Artur Petrosyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALAqxLU3sWrgPjFqZ2vK0m8wVThtE1hDsbNq9zRC7ritzyNHmQ@mail.gmail.com \
    --to=john.stultz@linaro.org \
    --cc=Arthur.Petrosyan@synopsys.com \
    --cc=Grigor.Tovmasyan@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.