]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
PCI: altera: Relax device number checking to allow SR-IOV
authorPo Liu <po.liu@nxp.com>
Mon, 29 Aug 2016 07:26:58 +0000 (15:26 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 12 Sep 2016 21:32:36 +0000 (16:32 -0500)
Previously we only allowed device 0 to be directly attached to the root
port.  But SR-IOV devices may use non-zero device numbers for VFs.

Remove the restriction that only device 0 may be attached to a root port.

[bhelgaas: changelog]
Signed-off-by: Po Liu <po.liu@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Ley Foon Tan <lftan@altera.com>
drivers/pci/host/pcie-altera.c

index 2b7837650db8449378f2c3b09aa4d53fc3c3177c..edbe0a7a56997d5bfbccc966f048474fd5b03792 100644 (file)
@@ -171,13 +171,6 @@ static bool altera_pcie_valid_config(struct altera_pcie *pcie,
        if (bus->number == pcie->root_bus_nr && dev > 0)
                return false;
 
-       /*
-        * Do not read more than one device on the bus directly attached
-        * to root port, root port can only attach to one downstream port.
-        */
-       if (bus->primary == pcie->root_bus_nr && dev > 0)
-               return false;
-
         return true;
 }