]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: aardvark: Fix reporting Slot capabilities on emulated bridge
authorPali Rohár <pali@kernel.org>
Tue, 24 May 2022 13:28:27 +0000 (15:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:45:40 +0000 (11:45 +0200)
commitdb0c485f4ac288194fa5e4c6c43436a107acc2b0
tree8b3443e3ac5bf19be96644ee478123522d3de6c0
parent8ec370e0a50f2b0de9304ddaad1c1dacb4680810
PCI: aardvark: Fix reporting Slot capabilities on emulated bridge

[ Upstream commit bcdb6fd4f3e9ac1097698c8d8f56b70853b49873 ]

Slot capabilities are currently not reported because emulated bridge does
not report the PCI_EXP_FLAGS_SLOT flag.

Set PCI_EXP_FLAGS_SLOT to let the kernel know that PCI_EXP_SLT* registers
are supported.

Move setting of PCI_EXP_SLTCTL register from "dynamic" pcie_conf_read
function to static buffer as it is only statically filled the
PCI_EXP_SLTSTA_PDS flag and dynamic read callback is not needed for this
register.

Set Presence State Bit to 1 since there is no support for unplugging the
card and there is currently no platform able to detect presence of a card -
in such a case the bit needs to be set to 1.

Finally correctly set Physical Slot Number to 1 since there is only one
port and zero value is reserved for ports within the same silicon as Root
Port which is not our case for Aardvark HW.

Link: https://lore.kernel.org/r/20220524132827.8837-3-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pci-aardvark.c