Skip to content

mvebu PCI fixes and cleanups

Russell King - ARM Linux linux-arm-kernel linux-pci 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 of 6 patches 0 repliesNew

1 of 6 patches is in this archive. The cover letter announces 6.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
2/6pci: mvebu: generate proper configuration access cycles+0 -01 reply

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndrew LunnThomas Petazzoni
SeriesT-b R-b T-b
2/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] mvebu PCI fixes and cleanups

This small series contains a number of fixes and cleanups to the mvebu PCI host code.

The first patch makes the PCIe host controller more conformant with the requirements of the PCI specification, which requires where a device is present, unused PCI configuration space returns zero. This patch ensures that is the case.

The second patch fixes the very broken idea that it's somehow legal to read-modify-write the PCI configuration space using 32-bit accessors, even when accessing a smaller register. There are _multiple_ registers in PCI space where bits are defined to be "RW1C" - which means "read, write 1 to clear". Registers include the PCI status register, and all PCIe status registers. Hardware which does not support generating 16-bit and 8-bit configuration cycles is essentially broken and non-conformant. Luckily, that is not true of Armada hardware. This patch fixes it. Tested on Armada 388.

These two patches should be considered as fixes. I don't see a need for them to be backported to stable kernels as there is no serious breakage resulting from them with the driver in its current state. The remainder are cleanups.

Patch 3 gets rid of the open coded "of_get_available_child_count()" implementation.

Patch 4 uses for_each_available_child_of_node(), rather than for_each_child_of_node() and checking whether of_device_is_available() returns true. for_each_available_child_of_node() is meant for this.

Patch 5 makes the warning message for the lack of the "marvell,pcie-port" property more useful, by printing the DT path of the offending node rather than the wooly "PCIe DT node".

Lastly, patch 6 converts all the "PCIe%d.%d" and "pcie%d.%d" with the port name string, which is a pre-prepared string of that format. This means we end up with a consistent name for the port being used everywhere which is good for user experience.

 drivers/pci/host/pci-mvebu.c | 87 ++++++++++++++++++++++++--------------------
 1 file changed, 47 insertions(+), 40 deletions(-)
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.