linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Matt Corallo <oc2udbzfd@mattcorallo.com>,
	linux-usb@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux.amoon@gmail.com
Subject: Re: ODROID-C1/-C2 USB Detection only triggered by some devices
Date: Tue, 29 Jun 2021 11:05:41 -0400	[thread overview]
Message-ID: <20210629150541.GB699290@rowland.harvard.edu> (raw)
In-Reply-To: <CAFBinCA9Y16Ej3PEBN1Rsqo=6V1AZXKOpTfc_siHP0rvVo7wWQ@mail.gmail.com>

On Mon, Jun 28, 2021 at 08:37:38PM +0200, Martin Blumenstingl wrote:
> Hi Alan,
> 
> I am also interested in finding a fix for this issue just like Matt.
> Also I think Anand is interested in this, so +Cc Anand.
> 
> On Mon, Jun 28, 2021 at 4:24 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> [...]
> > Okay.  You can try collecting some usbmon traces to see what's going on.
> >
> > First test: Boot with nothing plugged in, start a usbmon trace for bus 0
> > (cat /sys/kernel/debug/usb/usbmon/0u >mon1.txt), plug in a first-group
> > device, run lsusb -v to trigger enumeration, and then kill the "cat"
> > process.
> My first-group device is a Corsair Voyager USB 3.0 flash drive
> To be precise, "lsusb -v" doesn't make new devices show up for me, so
> I am using "lsusb -vv". I am just pointing this out so we're both on
> the same page here
> 
> The attached mon1.txt is the output I get

Did you remove something from the beginning of this trace?  It starts
with what appears to be the tail end of a resume sequence for the
on-board Genesys Logic hub.  If you didn't remove anything then
something is pretty wrong because the hub was apparently only
partially suspended.

Anyway, the trace says that when the lsusb command ran, the hub woke up 
and didn't see any connections on any of its ports.  This could be 
caused by a bug in the hub itself, a bug in the way the system handles 
the hub, or maybe a bug in the way it handles a PHY or other component 
external to the hub.

> > Second test: Same as the first except that you boot with a second-group
> > device already plugged in.
> mon2.txt is the result of:
> - power off my board (Odroid-C1+)
> - plug in a second-group device (cheap 1GB USB 2.0 flash drive)
> - boot Linux (which detects the USB 2.0 flash drive during boot)
> - cat usbmon ...
> - plug in my first-group Corsair Voyager
> - (this was now automatically detected, even without running lsusb)

This trace shows that the hub was not suspended and it did see the new 
connection.

> > The differences between the two traces may indicate where the problem
> > is.
> My interpretation of mon1.txt is that there's nothing seen on the bus.
> I don't see many similarities with the other outputs so I am hoping
> that you have some hint for me
> 
> In case it's relevant for your further analysis:
> - Odroid-C1+ and Odroid-C2 both use the USB PHY driver from
> drivers/phy/amlogic/phy-meson8b-usb2.c
> - Odroid-C1+ and Odroid-C2 both use use the dwc2 driver (running in
> host-only mode in this scenario. there's a second OTG capable dwc2
> controller which is currently disabled in mainline Linux on both
> devices)
> - Odroid-C1+ and Odroid-C2 have a soldered down 4-port Genesys Logic USB hub
> - Odroid-C1+ does not use any GPIO to control VBUS on usb1

Since the problem may be related to runtime power management, you
should try booting with the command line parameter

	usbcore.autosuspend=-1

to disable default USB runtime suspends.  Also, check the contents of
/sys/bus/usb/devices/1-2/power/autosuspend to make sure that runtime
suspend really is disabled.  Does that make the problem go away?

Alan Stern

> Maybe Matt can also share the usbmon output from his Odroid-C2 (a
> device I don't have) to confirm that it's the same issue (and we're
> not hunting two different problems).
> 
> 
> Best regards,
> Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2021-06-29 15:05 UTC|newest]

Thread overview: 36+ 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 [this message]
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
2021-07-11 17:56                           ` Martin Blumenstingl
2021-07-12  6:42                             ` Minas Harutyunyan
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=20210629150541.GB699290@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --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 \
    /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;
as well as URLs for NNTP newsgroup(s).