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] [linux-2.6.18-xen] pciif: do not depend on linux' msix_e

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] pciif: do not depend on linux' msix_entries, and use a conversion loop
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Jul 2008 10:30:11 -0700
Delivery-date: Wed, 02 Jul 2008 10:29:56 -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 1215002215 -3600
# Node ID 72786307fa4c9408cca7367e3156213db40392ad
# Parent  3643a33de27793969bd701669ca35ea534712072
pciif: do not depend on linux' msix_entries, and use a conversion loop
instead (already done in the frontend).

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 drivers/xen/pciback/conf_space_capability_msi.c |   16 ++++++++++++++--
 include/xen/interface/io/pciif.h                |    7 ++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)

diff -r 3643a33de277 -r 72786307fa4c 
drivers/xen/pciback/conf_space_capability_msi.c
--- a/drivers/xen/pciback/conf_space_capability_msi.c   Mon Jun 30 16:14:04 
2008 +0100
+++ b/drivers/xen/pciback/conf_space_capability_msi.c   Wed Jul 02 13:36:55 
2008 +0100
@@ -39,9 +39,21 @@ int pciback_enable_msix(struct pciback_d
 {
        int result;
 
-       result = pci_enable_msix(dev, op->msix_entries, op->value);
+       if (op->value > SH_INFO_MAX_VEC)
+               return -EINVAL;
+       else {
+               struct msix_entry entries[op->value];
+               int i;
 
-       op->value = result;
+               for (i = 0; i < op->value; i++) {
+                       entries[i].entry = op.msix_entries[i].entry;
+                       entries[i].vector = op.msix_entries[i].vector;
+               }
+
+               result = pci_enable_msix(dev, entries, op->value);
+               op->value = result;
+       }
+
        return result;
 }
 
diff -r 3643a33de277 -r 72786307fa4c include/xen/interface/io/pciif.h
--- a/include/xen/interface/io/pciif.h  Mon Jun 30 16:14:04 2008 +0100
+++ b/include/xen/interface/io/pciif.h  Wed Jul 02 13:36:55 2008 +0100
@@ -54,6 +54,11 @@
  */
 #define SH_INFO_MAX_VEC     128
 
+struct xen_msix_entry {
+    uint16_t vector;
+    uint16_t entry;
+};
+
 struct xen_pci_op {
     /* IN: what action to perform: XEN_PCI_OP_* */
     uint32_t cmd;
@@ -75,7 +80,7 @@ struct xen_pci_op {
     /* IN: Contains extra infor for this operation */
     uint32_t info;
     /*IN:  param for msi-x */
-    struct msix_entry msix_entries[SH_INFO_MAX_VEC];
+    struct xen_msix_entry xen_msix_entries[SH_INFO_MAX_VEC];
 };
 
 struct xen_pci_sharedinfo {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] pciif: do not depend on linux' msix_entries, and use a conversion loop, Xen patchbot-linux-2.6.18-xen <=