WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.4-testing] xend: pci: Use PCIe FLR for VF of Inte

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] xend: pci: Use PCIe FLR for VF of Intel 82599 10GbE Controller
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Oct 2009 02:40:34 -0700
Delivery-date: Fri, 23 Oct 2009 02:41:20 -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 1256289452 -3600
# Node ID 5cc95e7456a86a5783ff4768eb4142ab1e058b54
# Parent  df79861db1253d0a40c4e68efd1ee8906e05ba6a
xend: pci: Use PCIe FLR for VF of Intel 82599 10GbE Controller

We know it does have PCIe FLR capability even if it doesn't report
that.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
xen-unstable changeset:   20008:091209f1b95c
xen-unstable date:        Sun Aug 02 12:28:22 2009 +0100
---
 tools/python/xen/util/pci.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)

diff -r df79861db125 -r 5cc95e7456a8 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py      Tue Oct 20 21:44:08 2009 +0100
+++ b/tools/python/xen/util/pci.py      Fri Oct 23 10:17:32 2009 +0100
@@ -76,6 +76,11 @@ PCI_CAP_ID_VENDOR_SPECIFIC_CAP = 0x09
 PCI_CAP_ID_VENDOR_SPECIFIC_CAP = 0x09
 PCI_CLASS_ID_USB = 0x0c03
 PCI_USB_FLRCTRL = 0x4
+
+# The VF of Intel 82599 10GbE Controller
+# See http://download.intel.com/design/network/datashts/82599_datasheet.pdf
+# For 'VF PCIe Configuration Space', see its Table 9.7.
+DEVICE_ID_82599 = 0x10ed
 
 PCI_CAP_ID_AF = 0x13
 PCI_AF_CAPs   = 0x3
@@ -710,6 +715,17 @@ class PciDevice:
             dev_cap = self.pci_conf_read32(pos + PCI_EXP_DEVCAP)
             if dev_cap & PCI_EXP_DEVCAP_FLR:
                 self.pcie_flr = True
+            else:
+                # Quirk for the VF of Intel 82599 10GbE Controller.
+                # We know it does have PCIe FLR capability even if it doesn't
+                # report that (dev_cap.PCI_EXP_DEVCAP_FLR is 0).
+                # See the 82599 datasheet.
+                dev_path = find_sysfs_mnt()+SYSFS_PCI_DEVS_PATH+'/'+self.name
+                vendor_id = parse_hex(os.popen('cat %s/vendor' % 
dev_path).read())
+                device_id = parse_hex(os.popen('cat %s/device' % 
dev_path).read())
+                if  (vendor_id == VENDOR_INTEL) and \
+                    (device_id == DEVICE_ID_82599):
+                    self.pcie_flr = True
         elif self.dev_type == DEV_TYPE_PCI:
             # Try to find the "PCI Advanced Capabilities"
             pos = self.find_cap_offset(PCI_CAP_ID_AF)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] xend: pci: Use PCIe FLR for VF of Intel 82599 10GbE Controller, Xen patchbot-3.4-testing <=