public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Matt Corallo <oc2udbzfd@mattcorallo.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-amlogic@lists.infradead.org" 
	<linux-amlogic@lists.infradead.org>,
	"linux.amoon@gmail.com" <linux.amoon@gmail.com>,
	Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Subject: Re: ODROID-C1/-C2 USB Detection only triggered by some devices dwc2
Date: Mon, 12 Jul 2021 06:42:19 +0000	[thread overview]
Message-ID: <822c3852-1d15-2976-8672-e49ae34c328f@synopsys.com> (raw)
In-Reply-To: <CAFBinCCj5zUiv9LS2jKRxzX5pfcFTr4tVZwR7TA2CRQg68qwTw@mail.gmail.com>

Hi Martin,

On 7/11/2021 9:56 PM, Martin Blumenstingl wrote:
> Hi Minas,
> 
> thanks for taking the time to get back to us!
> 
> On Sun, Jul 11, 2021 at 10:15 AM Minas Harutyunyan
> <Minas.Harutyunyan@synopsys.com> wrote:
>>
>> Hi Martin,
>>
>> On 7/10/2021 9:07 PM, Martin Blumenstingl wrote:
>>> Hi Minas,
>>>
>>> On Thu, Jul 1, 2021 at 1:09 AM Martin Blumenstingl
>>> <martin.blumenstingl@googlemail.com> wrote:
>>>>
>>>> Hi Minas,
>>>>
>>> It's been a week since I sent my last mail
>>> In case you are taking some days off: enjoy that time!
>>> Please let us know if you have any questions about this as we're
>>> looking forward to some hints on how to debug (and of course fix!)
>>> this.
>>>
>> First of all sorry for late feedback. I missed this email thread because
>> in the subject there are no "dwc2" and my Outlook not move it to "dwc2"
>> folder of my mailbox based on rules. Today, because of rear count of
>> emails in linux-usb I was able to catch it.
>> I have added "dwc2" word in subject to avoid this situation later.
> Understood - I'll try to keep that in mind for the future.
> 
>> Couple of questions to understand the case.
>>
>> 1. Is it work normally earlier? If it was works fine earlier then which
>> Kernel version and after which version broke?
> I am not sure in which kernel version it broke.
> Commit cc10ce0c51b13d ("usb: dwc2: disable power_down on Amlogic
> devices") submitted by myself made USB hotplug work (at least that's
> what the commit message says and that's what I remember).
> I haven't done any git bisect though yet
> 
>> 2. Do you saw in dmesg:
>> dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST
>> If yes, then PHY not initialized correctly. Core can't reset if some
>> clocks from PHY are not available.
> I think you saw this in Anand's kernel log output.
> We came to the conclusion that some of his out-of-tree patches broke
> USB for him.
> 
>> 3. During our recent testings we met the issue with PHY driver. Artur
>> found a bug in phy_generic driver and submitted patch on July 10:
>> [PATCH v2] usb: phy: Fix page fault from usb_phy_uevent
>> In your case, as I understand correctly, used
>> drivers/phy/amlogic/phy-meson8b-usb2.c. Could you please check if same
>> issue exist there.
> phy-meson8b-usb2.c uses the generic PHY framework (from drivers/phy)
> instead of the USB PHY framework (from drivers/usb/phy).
> The generic PHY framework does not have any event support.
> I am also not seeing any kernel BUG or WARN in dmesg. So my conclusion
> is that the phy-meson8b-usb2.c driver is not affected by the same
> issue.
> 
>> 4. Can you provide full debug log for failed case?
> sure, in my kernel config I now have:
> CONFIG_USB_DWC2_DUAL_ROLE=y
> CONFIG_USB_DWC2_DEBUG=y
> # CONFIG_USB_DWC2_VERBOSE is not set
> # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
> CONFIG_USB_DWC2_DEBUG_PERIODIC=y
> 
> With that, here's the output I get (including lsusb -t):
> 1. booting my Odroid-C1 with no external USB device plugged in (the
> USB hub you see in the lsusb output is soldered down on the PCB, so
> it's "always there")
> 2. plugging in a Corsair Voyager USB 3.0 flash drive (nothing
> automatically happened), then running lsusb -vv and lsusb -t
> 3. unplugging the Corsair Voyager and plugging in a USB 3.0 card
> reader (nothing automatically happened), then running lsusb -vv and
> lsusb -t
Could you please set verbose debugging:
CONFIG_USB_DWC2_VERBOSE=y

and repeat test 3. There are couple of transaction errors and some EP 
stalled. I want to understand on which device/ep this happen.

Thank,
Minas

> 4. reboot, keeping the USB 3.0 card reader plugged in during boot
> 
> lsusb -vv is needed to make newly plugged in devices show up after boot.
> This works fine with a few cheap USB 2.0 flash drives and an USB 3.0
> card reader that I have.
> However, with a Corsair Voyager USB 3.0 flash drive this doesn't work,
> I cannot see that on the bus at all.
> 
> There's also a fifth case for which I have not attached any logs (but
> I can do so if required):
> If I have for example the USB 3.0 card reader or a cheap USB 2.0 flash
> drive plugged in during boot then USB hotplug is working.
> Even the Corsair Voyager USB 3.0 flash drive is detected.
> 
> Please note that logfile 2 and 3 contain some "overlap" with the
> previous log in the dmesg output.
> For example: the first two lines in the "dmesg | tail  -n13" output in
> logfile 2 are from the first logfile.
> I did this to show that I didn't omit anything by accident.
> 
>> 5. I would preferred to see output of 'lsusb -t' for pass and fail cases.
> I included that output in all attached logs
> 
> If you need any additional info, logs, etc. then please don't hesitate to ask!
> 
> 
> Best regards,
> Martin
> 


  parent reply	other threads:[~2021-07-12  6:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28  0:32 ODROID-C1/-C2 USB Detection only triggered by some devices Matt Corallo
2021-06-28  0:58 ` Alan Stern
2021-06-28  1:05   ` Matt Corallo
2021-06-28  1:16     ` Alan Stern
2021-06-28  1:24       ` Matt Corallo
2021-06-28 14:24         ` Alan Stern
2021-06-28 18:37           ` Martin Blumenstingl
2021-06-29 15:05             ` Alan Stern
2021-06-29 15:51               ` Martin Blumenstingl
2021-06-29 16:18                 ` Alan Stern
2021-06-29 16:30                   ` Martin Blumenstingl
2021-06-30  0:35                     ` Alan Stern
2021-07-01 10:03                       ` Anand Moon
2021-07-01 21:18                         ` Martin Blumenstingl
2021-07-02 19:11                           ` Anand Moon
2021-07-02 19:33                             ` Martin Blumenstingl
     [not found]                               ` <CANAwSgQH6HgFQ+xz15AoKhGUF9G18P-cHOVL2FvS_34FrW=bzQ@mail.gmail.com>
2021-07-13 15:41                                 ` Martin Blumenstingl
2021-06-30 23:09                     ` Martin Blumenstingl
2021-07-10 17:07                       ` Martin Blumenstingl
2021-07-11  8:15                         ` ODROID-C1/-C2 USB Detection only triggered by some devices dwc2 Minas Harutyunyan
     [not found]                           ` <CAFBinCCj5zUiv9LS2jKRxzX5pfcFTr4tVZwR7TA2CRQg68qwTw@mail.gmail.com>
2021-07-12  6:42                             ` Minas Harutyunyan [this message]
2021-07-12 11:35                               ` Martin Blumenstingl
2021-07-14 15:27                                 ` Minas Harutyunyan
2021-07-14 23:16                                   ` Martin Blumenstingl
2021-07-15  1:44                                     ` Alan Stern
2021-07-15  2:04                                       ` Alan Stern
2021-07-18 21:24                                       ` Martin Blumenstingl
2021-07-19 14:53                                         ` Alan Stern
2021-07-19 15:03                                           ` Alan Stern
2021-07-20 21:55                                           ` Martin Blumenstingl
2021-07-21 15:58                                             ` Alan Stern
2021-08-03 20:20                                               ` Martin Blumenstingl
2021-08-03 21:32                                                 ` Alan Stern
2021-12-12 16:08                                                   ` Martin Blumenstingl
2022-01-10 22:05                                                     ` Martin Blumenstingl

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=822c3852-1d15-2976-8672-e49ae34c328f@synopsys.com \
    --to=minas.harutyunyan@synopsys.com \
    --cc=Arthur.Petrosyan@synopsys.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=oc2udbzfd@mattcorallo.com \
    --cc=stern@rowland.harvard.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox