Commit b7360f60 authored by Tiezhu Yang's avatar Tiezhu Yang Committed by Bjorn Helgaas
Browse files

PCI: Announce device after early fixups

Announce the device, e.g.,

  pci 0000:00:00.0: [8086:5910] type 00 class 0x060000

after running early fixups, so the log message reflects any device type or
class code fixups.

[bhelgaas: commit log]
Link: https://lore.kernel.org/r/1595833615-8049-1-git-send-email-yangtiezhu@loongson.cn


Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 99b50be9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1802,9 +1802,6 @@ int pci_setup_device(struct pci_dev *dev)
	dev->revision = class & 0xff;
	dev->class = class >> 8;		    /* upper 3 bytes */

	pci_info(dev, "[%04x:%04x] type %02x class %#08x\n",
		   dev->vendor, dev->device, dev->hdr_type, dev->class);

	if (pci_early_dump)
		early_dump_pci_device(dev);

@@ -1822,6 +1819,9 @@ int pci_setup_device(struct pci_dev *dev)
	/* Early fixups, before probing the BARs */
	pci_fixup_device(pci_fixup_early, dev);

	pci_info(dev, "[%04x:%04x] type %02x class %#08x\n",
		 dev->vendor, dev->device, dev->hdr_type, dev->class);

	/* Device class may be changed after fixup */
	class = dev->class >> 8;