Skip to content

Commit 1856d1a

Browse files
committed
PCI: Tidy config space save/restore messages
Update config space save/restore debug messages so they line up better. Previously: nvme 0000:05:00.0: saving config space at offset 0x4 (reading 0x20100006) nvme 0000:05:00.0: saving config space at offset 0x8 (reading 0x1080200) nvme 0000:05:00.0: saving config space at offset 0xc (reading 0x0) nvme 0000:05:00.0: restoring config space at offset 0x4 (was 0x0, writing 0x20100006) Now: nvme 0000:05:00.0: save config 0x04: 0x20100006 nvme 0000:05:00.0: save config 0x08: 0x01080200 nvme 0000:05:00.0: save config 0x0c: 0x00000000 nvme 0000:05:00.0: restore config 0x04: 0x00000000 -> 0x20100006 No functional change intended. Enable these messages by setting CONFIG_DYNAMIC_DEBUG=y and adding 'dyndbg="file drivers/pci/* +p"' to kernel parameters. Link: https://lore.kernel.org/r/20230823191831.476579-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael@kernel.org>
1 parent eb6723b commit 1856d1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ int pci_save_state(struct pci_dev *dev)
16811681
/* XXX: 100% dword access ok here? */
16821682
for (i = 0; i < 16; i++) {
16831683
pci_read_config_dword(dev, i * 4, &dev->saved_config_space[i]);
1684-
pci_dbg(dev, "saving config space at offset %#x (reading %#x)\n",
1684+
pci_dbg(dev, "save config %#04x: %#010x\n",
16851685
i * 4, dev->saved_config_space[i]);
16861686
}
16871687
dev->state_saved = true;
@@ -1712,7 +1712,7 @@ static void pci_restore_config_dword(struct pci_dev *pdev, int offset,
17121712
return;
17131713

17141714
for (;;) {
1715-
pci_dbg(pdev, "restoring config space at offset %#x (was %#x, writing %#x)\n",
1715+
pci_dbg(pdev, "restore config %#04x: %#010x -> %#010x\n",
17161716
offset, val, saved_val);
17171717
pci_write_config_dword(pdev, offset, saved_val);
17181718
if (retry-- <= 0)

0 commit comments

Comments
 (0)