Skip to content

Commit

Permalink
PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device
Browse files Browse the repository at this point in the history
Since all PCI Express device Functions are required to implement the PCI
Express Capability structure, Capabilities List bit in PCI Status Register
must be hardwired to 1b. Capabilities Pointer register (which is already
set by pci-bride-emul.c driver) is valid only when Capabilities List is set
to 1b.

Link: https://lore.kernel.org/r/20211124155944.1290-7-pali@kernel.org
Fixes: 23a5fba ("PCI: Introduce PCI bridge emulated config space common logic")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Pali Rohár authored and Lorenzo Pieralisi committed Dec 6, 2021
1 parent 1f1050c commit 3be9d24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pci/pci-bridge-emul.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ int pci_bridge_emul_init(struct pci_bridge_emul *bridge,

if (bridge->has_pcie) {
bridge->conf.capabilities_pointer = PCI_CAP_PCIE_START;
bridge->conf.status |= cpu_to_le16(PCI_STATUS_CAP_LIST);
bridge->pcie_conf.cap_id = PCI_CAP_ID_EXP;
bridge->pcie_conf.cap |= cpu_to_le16(PCI_EXP_TYPE_ROOT_PORT << 4);
bridge->pcie_cap_regs_behavior =
Expand Down

0 comments on commit 3be9d24

Please sign in to comment.