This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [linux-2.6.18-xen] Dom0 PCI: fix SR-IOV function depende

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Dom0 PCI: fix SR-IOV function dependency link problem
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Jun 2009 17:35:04 -0700
Delivery-date: Wed, 03 Jun 2009 17:35:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Dom0 PCI: fix SR-IOV function dependency link problem, Xen patchbot-linux-2.6.18-xen <=