ia64/linux-2.6.18-xen.hg

changeset 891:104b6ae6b257

Dom0 PCI: fix SR-IOV function dependency link problem

PCIe Root Complex Integrated Endpoint does not implement ARI, so this
kind of endpoint uses 3-bit function number. The function dependency
link of the integrated endpoint should be calculated using the device
number field in conjunction with the value from function dependency
link register.

Normal SR-IOV endpoint always implements ARI and the function
dependency link register contains 8-bit function number (i.e. `devfn'
from software perspective).

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jun 03 11:22:24 2009 +0100 (2009-06-03)
parents 2e94884f0e8d
children 485fe5efa4ff
files drivers/pci/iov.c
line diff
     1.1 --- a/drivers/pci/iov.c	Wed Jun 03 11:21:52 2009 +0100
     1.2 +++ b/drivers/pci/iov.c	Wed Jun 03 11:22:24 2009 +0100
     1.3 @@ -366,6 +366,8 @@ found:
     1.4  	iov->self = dev;
     1.5  	pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap);
     1.6  	pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link);
     1.7 +	if (!dev->bus->number)	/* Root Complex Integrated Endpoint */
     1.8 +		iov->link = PCI_DEVFN(PCI_SLOT(dev->devfn), iov->link);
     1.9  
    1.10  	if (pdev)
    1.11  		iov->dev = pci_dev_get(pdev);