]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: aardvark: Fix checking for PIO status
authorEvan Wang <xswang@marvell.com>
Thu, 22 Jul 2021 14:40:38 +0000 (16:40 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 5 Aug 2021 09:51:49 +0000 (10:51 +0100)
commitddcf9e4a2648c8b2f9c8b3082b256d7ca15d47cf
treebce95b4d1647cd741914d4266cec34e5115e9ff1
parent01da9c8979f3d24bb75ef7080a8d9915e88dff94
PCI: aardvark: Fix checking for PIO status

There is an issue that when PCIe switch is connected to an Armada 3700
board, there will be lots of warnings about PIO errors when reading the
config space. According to Aardvark PIO read and write sequence in HW
specification, the current way to check PIO status has the following
issues:

1) For PIO read operation, it reports the error message, which should be
   avoided according to HW specification.

2) For PIO read and write operations, it only checks PIO operation complete
   status, which is not enough, and error status should also be checked.

This patch aligns the code with Aardvark PIO read and write sequence in HW
specification on PIO status check and fix the warnings when reading config
space.

[pali: Fix CRS handling when CRSSVE is not enabled]

Link: https://lore.kernel.org/r/20210722144041.12661-2-pali@kernel.org
Tested-by: Victor Gu <xigu@marvell.com>
Signed-off-by: Evan Wang <xswang@marvell.com>
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Victor Gu <xigu@marvell.com>
Reviewed-by: Marek Behún <kabel@kernel.org>
Cc: stable@vger.kernel.org # 20696db13305 ("PCI: aardvark: Indicate error in 'val' when config read fails")
drivers/pci/controller/pci-aardvark.c