Skip to content

Commit 6568d82

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI/DPC: Print all TLP Prefixes, not just the first
The TLP Prefix Log Register consists of multiple DWORDs (PCIe r6.1 sec 7.9.14.13) but the loop in dpc_process_rp_pio_error() keeps reading from the first DWORD, so we print only the first PIO TLP Prefix (duplicated several times), and we never print the second, third, etc., Prefixes. Add the iteration count based offset calculation into the config read. Fixes: f20c4ea ("PCI/DPC: Add eDPC support") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> [bhelgaas: add user-visible details to commit log] Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 6613476 commit 6568d82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/pcie/dpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static void dpc_process_rp_pio_error(struct pci_dev *pdev)
234234

235235
for (i = 0; i < pdev->dpc_rp_log_size - 5; i++) {
236236
pci_read_config_dword(pdev,
237-
cap + PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG, &prefix);
237+
cap + PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG + i * 4, &prefix);
238238
pci_err(pdev, "TLP Prefix Header: dw%d, %#010x\n", i, prefix);
239239
}
240240
clear_status:

0 commit comments

Comments
 (0)