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] MSI-X: Fix pciback_enable_msix().

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] MSI-X: Fix pciback_enable_msix().
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 06 Sep 2008 01:40:20 -0700
Delivery-date: Sat, 06 Sep 2008 01:41:03 -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 1220537411 -3600
# Node ID 7ec0d9030d8adcd8c98dd5ecd971a11fcb22512f
# Parent  c47b7e47ab1916a148f73c0c4a32823a00776a64
MSI-X: Fix pciback_enable_msix().
Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
---
 drivers/xen/pciback/conf_space_capability_msi.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff -r c47b7e47ab19 -r 7ec0d9030d8a 
drivers/xen/pciback/conf_space_capability_msi.c
--- a/drivers/xen/pciback/conf_space_capability_msi.c   Thu Sep 04 11:30:39 
2008 +0100
+++ b/drivers/xen/pciback/conf_space_capability_msi.c   Thu Sep 04 15:10:11 
2008 +0100
@@ -37,22 +37,26 @@ int pciback_enable_msix(struct pciback_d
 int pciback_enable_msix(struct pciback_device *pdev,
                struct pci_dev *dev, struct xen_pci_op *op)
 {
+       int i;
        int result;
+       struct msix_entry entries[op->value];
 
        if (op->value > SH_INFO_MAX_VEC)
                return -EINVAL;
-       else {
-               struct msix_entry entries[op->value];
-               int i;
 
-               for (i = 0; i < op->value; i++) {
-                       entries[i].entry = op->msix_entries[i].entry;
-                       entries[i].vector = op->msix_entries[i].vector;
-               }
+       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;
+       result = pci_enable_msix(dev, entries, op->value);
+
+       for (i = 0; i < op->value; i++) {
+               op->msix_entries[i].entry = entries[i].entry;
+               op->msix_entries[i].vector = entries[i].vector;
        }
+
+       op->value = result;
 
        return result;
 }

_______________________________________________
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] MSI-X: Fix pciback_enable_msix()., Xen patchbot-linux-2.6.18-xen <=