PCI: designware: 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:39:20 +0000 (16:39 -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: Jingoo Han <jingoohan1@gmail.com>
drivers/pci/host/pcie-designware.c

index 12afce1..dd20eb2 100644 (file)
@@ -670,13 +670,6 @@ static int dw_pcie_valid_config(struct pcie_port *pp,
        if (bus->number == pp->root_bus_nr && dev > 0)
                return 0;
 
-       /*
-        * do not read more than one device on the bus directly attached
-        * to RC's (Virtual Bridge's) DS side.
-        */
-       if (bus->primary == pp->root_bus_nr && dev > 0)
-               return 0;
-
        return 1;
 }