diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2016-10-03 10:43:21 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-10-03 10:43:21 -0400 |
| commit | 930ffc03fabf183f1e3309619aaa24869779bffa (patch) | |
| tree | 50b229bd34594e85ea4385515bd1200fbf22bb06 | |
| parent | e15194d2a726b7201878d17ee87fa80d89aaabf4 (diff) | |
| parent | 8e7ca8ca5fd8a3242289105723c429733be8b73b (diff) | |
Merge branch 'pci/virtualization' into next
* pci/virtualization:
PCI: xilinx: Relax device number checking to allow SR-IOV
PCI: designware: Relax device number checking to allow SR-IOV
PCI: altera: Relax device number checking to allow SR-IOV
PCI: Check for pci_setup_device() failure in pci_iov_add_virtfn()
PCI: Mark Atheros AR9580 to avoid bus reset
| -rw-r--r-- | drivers/pci/host/pcie-altera.c | 7 | ||||
| -rw-r--r-- | drivers/pci/host/pcie-designware.c | 7 | ||||
| -rw-r--r-- | drivers/pci/host/pcie-xilinx.c | 7 | ||||
| -rw-r--r-- | drivers/pci/iov.c | 5 | ||||
| -rw-r--r-- | drivers/pci/quirks.c | 1 |
5 files changed, 5 insertions, 22 deletions
diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c index 48f2736a10cd..b3320ae06111 100644 --- a/drivers/pci/host/pcie-altera.c +++ b/drivers/pci/host/pcie-altera.c | |||
| @@ -174,13 +174,6 @@ static bool altera_pcie_valid_config(struct altera_pcie *pcie, | |||
| 174 | if (bus->number == pcie->root_bus_nr && dev > 0) | 174 | if (bus->number == pcie->root_bus_nr && dev > 0) |
| 175 | return false; | 175 | return false; |
| 176 | 176 | ||
| 177 | /* | ||
| 178 | * Do not read more than one device on the bus directly attached | ||
| 179 | * to root port, root port can only attach to one downstream port. | ||
| 180 | */ | ||
| 181 | if (bus->primary == pcie->root_bus_nr && dev > 0) | ||
| 182 | return false; | ||
| 183 | |||
| 184 | return true; | 177 | return true; |
| 185 | } | 178 | } |
| 186 | 179 | ||
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index ee64f9755ea6..4b96e5e95dd7 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c | |||
| @@ -672,13 +672,6 @@ static int dw_pcie_valid_config(struct pcie_port *pp, | |||
| 672 | if (bus->number == pp->root_bus_nr && dev > 0) | 672 | if (bus->number == pp->root_bus_nr && dev > 0) |
| 673 | return 0; | 673 | return 0; |
| 674 | 674 | ||
| 675 | /* | ||
| 676 | * do not read more than one device on the bus directly attached | ||
| 677 | * to RC's (Virtual Bridge's) DS side. | ||
| 678 | */ | ||
| 679 | if (bus->primary == pp->root_bus_nr && dev > 0) | ||
| 680 | return 0; | ||
| 681 | |||
| 682 | return 1; | 675 | return 1; |
| 683 | } | 676 | } |
| 684 | 677 | ||
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index 7b7dbd22bccc..0205662720cb 100644 --- a/drivers/pci/host/pcie-xilinx.c +++ b/drivers/pci/host/pcie-xilinx.c | |||
| @@ -168,13 +168,6 @@ static bool xilinx_pcie_valid_device(struct pci_bus *bus, unsigned int devfn) | |||
| 168 | if (bus->number == port->root_busno && devfn > 0) | 168 | if (bus->number == port->root_busno && devfn > 0) |
| 169 | return false; | 169 | return false; |
| 170 | 170 | ||
| 171 | /* | ||
| 172 | * Do not read more than one device on the bus directly attached | ||
| 173 | * to RC. | ||
| 174 | */ | ||
| 175 | if (bus->primary == port->root_busno && devfn > 0) | ||
| 176 | return false; | ||
| 177 | |||
| 178 | return true; | 171 | return true; |
| 179 | } | 172 | } |
| 180 | 173 | ||
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 2194b447201d..e30f05c8517f 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
| @@ -136,7 +136,10 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset) | |||
| 136 | virtfn->devfn = pci_iov_virtfn_devfn(dev, id); | 136 | virtfn->devfn = pci_iov_virtfn_devfn(dev, id); |
| 137 | virtfn->vendor = dev->vendor; | 137 | virtfn->vendor = dev->vendor; |
| 138 | pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_DID, &virtfn->device); | 138 | pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_DID, &virtfn->device); |
| 139 | pci_setup_device(virtfn); | 139 | rc = pci_setup_device(virtfn); |
| 140 | if (rc) | ||
| 141 | goto failed0; | ||
| 142 | |||
| 140 | virtfn->dev.parent = dev->dev.parent; | 143 | virtfn->dev.parent = dev->dev.parent; |
| 141 | virtfn->physfn = pci_dev_get(dev); | 144 | virtfn->physfn = pci_dev_get(dev); |
| 142 | virtfn->is_virtfn = 1; | 145 | virtfn->is_virtfn = 1; |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 6297942649bf..edc7f9600477 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -3198,6 +3198,7 @@ static void quirk_no_bus_reset(struct pci_dev *dev) | |||
| 3198 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0030, quirk_no_bus_reset); | 3198 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0030, quirk_no_bus_reset); |
| 3199 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0032, quirk_no_bus_reset); | 3199 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0032, quirk_no_bus_reset); |
| 3200 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset); | 3200 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset); |
| 3201 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset); | ||
| 3201 | 3202 | ||
| 3202 | static void quirk_no_pm_reset(struct pci_dev *dev) | 3203 | static void quirk_no_pm_reset(struct pci_dev *dev) |
| 3203 | { | 3204 | { |
