diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-02-07 18:18:35 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2025-02-21 17:31:35 -0600 |
commit | 79c731e20d7401cc39e4f0e633b135b966a04f62 (patch) | |
tree | cb73c411e1200a47ceedd9ba44c969a2f2e8f95b /drivers/pci/pci.h | |
parent | fab874e12593b68f9a7fcb1a31a7dcf4829e88f7 (diff) |
PCI: Track Flit Mode Status & print it with link status
PCIe r6.0 added Flit mode, which mainly alters HW behavior, but there are
some OS visible changes. The OS visible changes include differences in the
layout of some capabilities and interpretation of the TLP headers (in
diagnostics situations).
To be able to determine which mode the PCIe Link is using, store the Flit
Mode Status (PCIe r6.1 sec 7.5.3.20) information in addition to the Link
speed into struct pci_bus in pcie_update_link_speed().
Link: https://lore.kernel.org/r/20250207161836.2755-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[bhelgaas: use unsigned int:1 instead of bool, update flit_mode setting]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 01e51db8d285..9da7da58e0de 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -406,9 +406,10 @@ const char *pci_speed_string(enum pci_bus_speed speed); void __pcie_print_link_status(struct pci_dev *dev, bool verbose); void pcie_report_downtraining(struct pci_dev *dev); -static inline void __pcie_update_link_speed(struct pci_bus *bus, u16 linksta) +static inline void __pcie_update_link_speed(struct pci_bus *bus, u16 linksta, u16 linksta2) { bus->cur_bus_speed = pcie_link_speed[linksta & PCI_EXP_LNKSTA_CLS]; + bus->flit_mode = (linksta2 & PCI_EXP_LNKSTA2_FLIT) ? 1 : 0; } void pcie_update_link_speed(struct pci_bus *bus); |