Skip to content

Commit 1302fcf

Browse files
committed
PCI: Configure *all* devices, not just hot-added ones
There's not really a good way to determine whether firmware has already configured a device with _HPP/_HPX settings. On legacy systems, the BIOS has probably configured everything, but on UEFI systems it is not required to do so. Per the PCI Firmware Specification, rev 3.1, sec 3.5, if PCI_COMMAND_IO or PCI_COMMAND_MEMORY is set, we can assume firmware has set the corresponding BARs and maybe we can assume it has configured the rest of the device. And if a bridge has PCI_COMMAND_PARITY or PCI_COMMAND_SERR set, we can assume firmware has configured the bridge. But we can't tell much about devices without BARs. I think it should be safe to apply _HPP and _HPX settings anyway, even if firmware has already configured the device, so configure everything we find. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Yinghai Lu <yinghai@kernel.org>
1 parent 302328c commit 1302fcf

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎drivers/pci/probe.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,9 +1358,6 @@ static void pci_configure_device(struct pci_dev *dev)
13581358
struct hotplug_params hpp;
13591359
int ret;
13601360

1361-
if (system_state == SYSTEM_BOOTING)
1362-
return;
1363-
13641361
memset(&hpp, 0, sizeof(hpp));
13651362
ret = pci_get_hp_params(dev, &hpp);
13661363
if (ret)

0 commit comments

Comments
 (0)