From: Alan Stern <stern@rowland.harvard.edu>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
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: Wed, 14 Jul 2021 21:44:51 -0400 [thread overview]
Message-ID: <20210715014451.GA397753@rowland.harvard.edu> (raw)
In-Reply-To: <CAFBinCCXioWL+ZGwvC8Ltrmx4y2XpGK03JAm8X=wDB4_dQ+pFA@mail.gmail.com>
On Thu, Jul 15, 2021 at 01:16:44AM +0200, Martin Blumenstingl wrote:
> Hi Minas,
>
> On Wed, Jul 14, 2021 at 5:27 PM Minas Harutyunyan
> <Minas.Harutyunyan@synopsys.com> wrote:
> >
> > Hi Martin,
> > Per our understanding this issue is because of power budget and
> > autosuspend functionality.
> Many thanks for doing this investigation!
>
> > Autosuspend. Please review this patch: "usb: core: hub: Disable
> > autosuspend for Cypress CY7C65632"
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=a7d8d1c7a7f73e780aa9ae74926ae5985b2f895f
> >
> > It's very similar to your case. Actually you already tested
> > usbcore.autosuspend=-1 and it's helped you.
> > Could you please develop same patch for your soldered hub and test it.
> I found that drivers/usb/core/hub.c already has an entry for Genesys
> Logic USB hubs.
> It uses HUB_QUIRK_CHECK_PORT_AUTOSUSPEND instead of
> HUB_QUIRK_DISABLE_AUTOSUSPEND though.
> So I wrote a patch to change that (I attached it to this mail for
> reference, I will submit it as a proper patch one I understand enough
> about this).
>
> With this patch applied all USB devices I have are auto-detected when
> hot-plugged.
Yeah, I suspect this patch will not be accepted. There are a _lot_ of
Genesys Logic hubs out there, and apparently none of them besides the
ones in your Odroid systems have trouble with runtime suspend.
> My doubt with this is that my desktop PC (using an ASUS B550-F
> motherboard) comes with a few of these USB hubs soldered down as well
> - and there the behavior is different.
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
> ID 1d6b:0002 Linux Foundation 2.0 root hub
> /sys/bus/usb/devices/usb1 /dev/bus/usb/001/001
> |__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
> ID 05e3:0610 Genesys Logic, Inc. Hub
> /sys/bus/usb/devices/1-3 /dev/bus/usb/001/002
> [...]
> |__ Port 7: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
> ID 05e3:0610 Genesys Logic, Inc. Hub
> /sys/bus/usb/devices/1-7 /dev/bus/usb/001/005
>
> I plugged in the Corsair Voyager USB 3.0 drive which is not being
> detected on my Odroid-C1+ and instantly this shows up in my kernel
> log:
> usb 1-7.3: new high-speed USB device number 46 using xhci_hcd
> usb 1-7.3: New USB device found, idVendor=1b1c, idProduct=1a03,
> bcdDevice= a.00
> usb 1-7.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-7.3: Product: Voyager 3.0
> usb 1-7.3: Manufacturer: Corsair
>
> So I am wondering why it works there but not on my Odroid-C1, with the
> (only known) difference being the host controller (xhci_hcd vs dwc2)
> which is being used.
Indeed.
Martin, here's another test you can try, on both the Odroid and PC
systems. Boot with usb.autosuspend=-1 on the command line to disable
default runtime suspend. But then before plugging in the drive, start a
usbmon trace and do:
echo 2 >/sys/bus/usb/devices/1-2/power/autosuspend
to enable runtime suspend for the Genesys Logic hub. (On the PC,
replace the 1-2 with 1-5 or whatever the appropriate device path is for
the GL hub.)
Wait at least two seconds for the hub to go into runtime suspend before
plugging in the Corsair drive and stopping the trace. It might turn out
that allowing the GL hub to suspend while keeping the DWC2 root hub
active will make a difference.
(The reason for doing this on the PC as well as on the Odroid is to make
sure that the sequence of USB requests sent to the hub and responses
received from it is exactly the same in both cases.)
Alan Stern
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2021-07-15 1:45 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
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 [this message]
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=20210715014451.GA397753@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=Arthur.Petrosyan@synopsys.com \
--cc=Minas.Harutyunyan@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 \
/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).