[PATCH v2 2/5] configs: ds414: Enable XHCI_PCI by default

Stefan Roese sr at denx.de
Mon Mar 8 07:34:10 CET 2021


On 07.03.21 21:58, Phil Sutter wrote:
> 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 at 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").

This is actually good news. Thanks for testing and reporting.

> I'll send a v3 without the fuss but with the Kconfig fix.
> 
> Sorry for the noise,

NP. ;)

Thanks,
Stefan


More information about the U-Boot mailing list