@@ -565,7 +565,7 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
void pcie_aspm_init_link_state(struct pci_dev *pdev)
{
struct pcie_link_state *link;
- int blacklist = !!pcie_aspm_sanity_check(pdev);
+ int blacklist;
if (!aspm_support_enabled)
return;
@@ -586,6 +586,8 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
pdev->bus->self)
return;
+ blacklist = !!pcie_aspm_sanity_check(pdev);
+
down_read(&pci_bus_sem);
if (list_empty(&pdev->subordinate->devices))
goto out;
@@ -594,6 +596,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
link = alloc_pcie_link_state(pdev);
if (!link)
goto unlock;
+
/*
* Setup initial ASPM state. Note that we need to configure
* upstream links also because capable state of them can be
commit 8cd2325c4360c6aa680dd32d804ae8dcc8f8cc5b
Author: Bjorn Helgaas <bhelgaas@google.com>
Date: Thu Jan 19 17:21:10 2017 -0600
aspm-debug
@@ -567,6 +567,13 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
struct pcie_link_state *link;
int blacklist;
+ dev_info(&pdev->dev, "support %d PCIe %d link_state %d secondary %d subordinate %d\n",
+ aspm_support_enabled ? 1 : 0,
+ pci_is_pcie(pdev) ? 1 : 0,
+ pdev->link_state ? 1 : 0,
+ pdev->has_secondary_link ? 1 : 0,
+ pdev->subordinate ? 1 : 0);
+
if (!aspm_support_enabled)
return;
commit b89fa357a592615c00c1b98d8c06a3df1d185078
Author: Bjorn Helgaas <bhelgaas@google.com>
Date: Thu Jan 19 17:32:38 2017 -0600
sriov-debug
@@ -129,6 +129,8 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset)
if (!bus)
goto failed;
+ dev_info(&dev->dev, "add VF %d on %s\n", id, dev_name(&bus->dev));
+
virtfn = pci_alloc_dev(bus);
if (!virtfn)
goto failed0;
@@ -145,6 +147,9 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset)
virtfn->is_virtfn = 1;
virtfn->multifunction = 0;
+ dev_info(&virtfn->dev, "new VF %d, subordinate %d\n", id,
+ virtfn->subordinate ? 1 : 0);
+
for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
res = &dev->resource[i + PCI_IOV_RESOURCES];
if (!res->parent)