From: Po Liu Date: Mon, 29 Aug 2016 07:26:58 +0000 (+0800) Subject: PCI: designware: Relax device number checking to allow SR-IOV X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e18934b5e9c78bb8c223b323275c14a0968e2737;p=openwrt%2Fstaging%2Fblogic.git PCI: designware: Relax device number checking to allow SR-IOV 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 Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han --- diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 12afce19890b..dd20eb2fd865 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -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; }