PCI: cadence: Clear FLR in device capabilities register
authorParshuram Thombare <pthombar@cadence.com>
Mon, 25 Oct 2021 12:31:15 +0000 (05:31 -0700)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 12 May 2022 21:19:40 +0000 (22:19 +0100)
commit95b00f68209e2bc9f2ee9126afcebab451e0e9d8
tree1d97ec467b42360d5cf93928a83c6c8ccc5850ec
parenta1f67bc131c3935f325513cd153249fdbc22ac5b
PCI: cadence: Clear FLR in device capabilities register

Clear FLR (Function Level Reset) from device capabilities
registers for all physical functions.

During FLR, the Margining Lane Status and Margining Lane Control
registers should not be reset, as per PCIe specification.
However, the controller incorrectly resets these registers upon FLR.
This causes PCISIG compliance FLR test to fail. Hence preventing
all functions from advertising FLR support if flag quirk_disable_flr
is set.

Link: https://lore.kernel.org/r/1635165075-89864-1-git-send-email-pthombar@cadence.com
Signed-off-by: Parshuram Thombare <pthombar@cadence.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/cadence/pci-j721e.c
drivers/pci/controller/cadence/pcie-cadence-ep.c
drivers/pci/controller/cadence/pcie-cadence.h