[PATCH] pci: pci_mvebu: Disable config access to PCI host bridge ports

Marek Behun marek.behun at nic.cz
Mon Feb 8 15:00:37 CET 2021


On Mon, 25 Jan 2021 15:25:31 +0100
Stefan Roese <sr at denx.de> wrote:

> This patch changes the PCI config routines in the Armada XP / 38x driver
> to not allow access to the PCIe root ports.
> 
> While updating the Armada XP based theadorable to the latest mainline
> and testing it with the DM PCI driver I noticed, that the PCI root
> bridge was being configured incorrectly. Resulting in the PCIe Intel
> WiFi was not working correctly in Linux. With this patch applied, all
> PCIe devices work without any issues in Linux again.
> 

Hi Stefan,

I overlooked this patch and coincidentally also discovered this bug
last week. Your patches solves this issue, but

- previously, when pci-mvebu did not use DM, it was solved differently:
  pci_skip_dev returned 1 for (b,d,f) = (*,0,0).
- on this address (*,0,0) there seems to be a Memory Controller -
  without applying your patch the pci command lists

    => pci
    Scanning PCI devices on bus 0
    BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
    _____________________________________________________________
    00.00.00   0x11ab     0x6820     Memory controller       0x80
    00.01.00   0x168c     0x003c     Network controller      0x80

  with your patch

    => pci
    Scanning PCI devices on bus 0
    BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
    _____________________________________________________________
    00.01.00   0x168c     0x003c     Network controller      0x80

  I would like to know why this memory controller is there and whether
  it should be configured. The pci-mvebu driver in kernel currently
  ignores this Memory Controller. That is the reason why your Intel
  WiFi card and my ath10k wifi card are not working: U-Boot configures
  some addresses in PCIe registers of this Memory Controller, but
  kernel does not reconfigure it.

So all in all:
- your patch solves the issue, but I wonder whether it shouldn't be
  solved in another way, for example by adding pci,no-autoconfig device
  tree property in DTS files in u-boot for these Memory Controllers
- I wonder whether kernel should stop ignoring this device and
  configure it somehow

Marek


More information about the U-Boot mailing list