[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] Dom0 PCI: fix SR-IOV function dependency link problem

# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1244024544 -3600
# Node ID 104b6ae6b25765ec778c12536f02d2c81e771ac6
# Parent  2e94884f0e8d0cbcc4072d11a15b4cb4e7d08707
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@xxxxxxxxx>
 drivers/pci/iov.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r 2e94884f0e8d -r 104b6ae6b257 drivers/pci/iov.c
--- a/drivers/pci/iov.c Wed Jun 03 11:21:52 2009 +0100
+++ b/drivers/pci/iov.c Wed Jun 03 11:22:24 2009 +0100
@@ -366,6 +366,8 @@ found:
        iov->self = dev;
        pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap);
        pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link);
+       if (!dev->bus->number)  /* Root Complex Integrated Endpoint */
+               iov->link = PCI_DEVFN(PCI_SLOT(dev->devfn), iov->link);
        if (pdev)
                iov->dev = pci_dev_get(pdev);

Xen-changelog mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.