linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] mvebu PCI fixes and cleanups
@ 2015-09-23 17:17 Russell King - ARM Linux
  2015-09-23 17:17 ` [PATCH 1/6] pci: mvebu: provide a compliant PCI configuration space Russell King
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Russell King - ARM Linux @ 2015-09-23 17:17 UTC (permalink / raw)
  To: Jason Cooper, Thomas Petazzoni; +Cc: Bjorn Helgaas, linux-arm-kernel, linux-pci

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(-)

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-10-08 16:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-23 17:17 [PATCH 0/6] mvebu PCI fixes and cleanups Russell King - ARM Linux
2015-09-23 17:17 ` [PATCH 1/6] pci: mvebu: provide a compliant PCI configuration space Russell King
2015-09-23 17:17 ` [PATCH 2/6] pci: mvebu: generate proper configuration access cycles Russell King
2015-09-24 14:30   ` Andrew Lunn
2015-09-24 22:23   ` Andrew Lunn
2015-09-24 22:43     ` Russell King - ARM Linux
2015-09-24 22:40       ` Andrew Lunn
2015-09-23 17:17 ` [PATCH 3/6] pci: mvebu: use of_get_available_child_count() Russell King
2015-09-23 17:17 ` [PATCH 4/6] pci: mvebu: use for_each_available_child_of_node() to walk child nodes Russell King
2015-09-23 17:17 ` [PATCH 5/6] pci: mvebu: report full node name when reporting a DT error Russell King
2015-09-23 17:17 ` [PATCH 6/6] pci: mvebu: use port->name rather than "PCIe%d.%d" Russell King
2015-09-24 23:36 ` [PATCH 0/6] mvebu PCI fixes and cleanups Andrew Lunn
2015-09-25  7:38 ` Thomas Petazzoni
2015-09-25 12:51   ` Bjorn Helgaas
2015-10-08 16:26 ` Bjorn Helgaas

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).