public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: u-boot@lists.denx.de
Subject: [PATCH v2 2/5] configs: ds414: Enable XHCI_PCI by default
Date: Sun, 7 Mar 2021 21:58:12 +0100	[thread overview]
Message-ID: <20210307205812.GB2453@orbyte.nwl.cc> (raw)
In-Reply-To: <6e703ad9-a8b0-d26a-0a61-98e315589645@denx.de>

On Sat, Mar 06, 2021 at 09:15:27AM +0100, Stefan Roese wrote:
> On 05.03.21 21:03, Phil Sutter wrote:
> > With the recent fixes in pci_mvebu and xhci-pci drivers, the two rear
> > USB3 ports are finally usable and accessing them no longer hangs the
> > system. Moreover, if Linux is booted without a prior call to 'pci enum'
> > and 'usb start', the HCD is detected but attached devices are not
> > usable:
> > 
> > | xhci_hcd 0000:02:00.0: xHCI Host Controller
> > | xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
> > | xhci_hcd 0000:02:00.0: hcc params 0x040040a5 hci version 0x100 quirks 0x0000000000080490
> > | usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
> > | usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> > | usb usb2: Product: xHCI Host Controller
> > | usb usb2: Manufacturer: Linux 5.4.92-1 xhci-hcd
> > | usb usb2: SerialNumber: 0000:02:00.0
> > | hub 2-0:1.0: USB hub found
> > | ata1: SATA link down (SStatus 0 SControl 300)
> > | hub 2-0:1.0: 2 ports detected
> > | xhci_hcd 0000:02:00.0: xHCI Host Controller
> > | xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
> > | xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
> > | usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
> > | usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04
> > | usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> > | usb usb3: Product: xHCI Host Controller
> > | usb usb3: Manufacturer: Linux 5.4.92-1 xhci-hcd
> > | usb usb3: SerialNumber: 0000:02:00.0
> > | hub 3-0:1.0: USB hub found
> > | hub 3-0:1.0: 2 ports detected
> > [...]
> > | xhci_hcd 0000:02:00.0: Error while assigning device slot ID
> > | xhci_hcd 0000:02:00.0: Max number of devices this xHCI host supports is 64.
> > | usb usb2-port2: couldn't allocate usb_device
> > 
> > To avoid this problem, enumerate PCI (and USB) from PREBOOT.
> > 
> > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > ---
> > Changes since v1:
> > - Have to enable XHCI_HCD as well to fulfill Kconfig dependency.
> > - Explicitly disable XHCI_MARVELL which defaults to enabled.
> > - Prefix PREBOOT with 'pci enum'.
> > - Update commit message accordingly.
> 
> Hmmm, in general is should not be necessary to configure / setup any of
> the devices in the bootloader so that it works correctly in Linux. It's
> best practice, that Linux does not rely on any bootloader setup. If a
> device, like PCI and/or USB does not work in Linux without this U-Boot
> setup, then it should be fixed in Linux instead.
> 
> Especially calling "usb start" adds a quite big delay to the bootup
> time. I would really like to not add such changes. Perhaps you could
> check with the maintainer(s) of the Linux PCI driver and/or the USB
> PCI controller driver about this issue instead?

Turns out I should have tried a more recent kernel first, the bug I
was working around is quite certainly fixed by Linux commit
216f8e95aacc8 ("PCI: mvebu: Setup BAR0 in order to fix MSI").

I'll send a v3 without the fuss but with the Kconfig fix.

Sorry for the noise,

Phil

  reply	other threads:[~2021-03-07 20:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03  0:55 [PATCH 0/5] Synology DS414 integration mini-review Phil Sutter
2021-03-03  0:55 ` [PATCH 1/5] ds414: Add a Kconfig defining some strings Phil Sutter
2021-03-04 13:00   ` Stefan Roese
2021-03-03  0:55 ` [PATCH 2/5] configs: ds414: Enable XHCI_PCI by default Phil Sutter
2021-03-04 13:00   ` Stefan Roese
2021-03-04 13:11     ` Phil Sutter
2021-03-05 20:03   ` [PATCH v2 " Phil Sutter
2021-03-06  8:15     ` Stefan Roese
2021-03-07 20:58       ` Phil Sutter [this message]
2021-03-08  6:34         ` Stefan Roese
2021-03-07 21:21     ` [PATCH v3 " Phil Sutter
2021-03-08  6:34       ` Stefan Roese
2021-03-03  0:55 ` [PATCH 3/5] board/Synology: Unify legacy kernel support Phil Sutter
2021-03-04 13:03   ` Stefan Roese
2021-03-04 13:11     ` Phil Sutter
2021-03-05 20:04   ` [PATCH v2 " Phil Sutter
2021-03-07 21:22     ` [PATCH v3 " Phil Sutter
2021-03-08  6:36       ` Stefan Roese
2021-03-03  0:55 ` [PATCH 4/5] ds414: Auto-populate env if appropriate Phil Sutter
2021-03-04 13:06   ` Stefan Roese
2021-03-04 13:20     ` Phil Sutter
2021-03-04 13:22       ` Stefan Roese
2021-03-05 20:05   ` [PATCH v2 " Phil Sutter
2021-03-03  0:55 ` [PATCH 5/5] ds414: Add sample u-boot update command Phil Sutter
2021-03-04 13:09   ` Stefan Roese
2021-03-04 13:28     ` Phil Sutter
2021-03-04 13:34       ` Stefan Roese
2021-03-04 13:56         ` Phil Sutter
2021-03-05 20:05   ` [PATCH v2 " Phil Sutter
2021-04-08  8:52 ` [PATCH 0/5] Synology DS414 integration mini-review Stefan Roese

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=20210307205812.GB2453@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=u-boot@lists.denx.de \
    /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