]> git.baikalelectronics.ru Git - kernel.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)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 13 Jun 2022 23:41:32 +0000 (18:41 -0500)
commitdecd44c3773cab4b494f197983e8b8c3644f94a5
treeab0f7f88c2157afdea6b7bb83eb345a2ce694b6a
parent75ab8c750822fb0c5219197f86fca401c9517aa4
PCI: aardvark: Fix reporting Slot capabilities on emulated bridge

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>
drivers/pci/controller/pci-aardvark.c