]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: aardvark: Implement re-issuing config requests on CRS response
authorPali Rohár <pali@kernel.org>
Tue, 5 Oct 2021 18:09:48 +0000 (20:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:44 +0000 (09:04 +0100)
commitc6d8d6f1a868bb86e36ed26b47100b9c2b30064d
treecd2aa4275760a1e6f7c3512c5111d7a55a69f478
parent1251f75e047b9c360cc6bf54c70a310213a9280d
PCI: aardvark: Implement re-issuing config requests on CRS response

commit ca950bdd9bcc07bdb89a29bc176dd57ce810d8b9 upstream.

Commit 810b0dd978b0 ("PCI: aardvark: Fix reporting CRS value") fixed
handling of CRS response and when CRSSVE flag was not enabled it marked CRS
response as failed transaction (due to simplicity).

But pci-aardvark.c driver is already waiting up to the PIO_RETRY_CNT count
for PIO config response and so we can with a small change implement
re-issuing of config requests as described in PCIe base specification.

This change implements re-issuing of config requests when response is CRS.
Set upper bound of wait cycles to around PIO_RETRY_CNT, afterwards the
transaction is marked as failed and an all-ones value is returned as
before.

We do this by returning appropriate error codes from function
advk_pcie_check_pio_status(). On CRS we return -EAGAIN and caller then
reissues transaction.

Link: https://lore.kernel.org/r/20211005180952.6812-10-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/controller/pci-aardvark.c