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-devel

[Xen-devel] [PATCH] linux: print at least a message if MSI-X restore fai

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux: print at least a message if MSI-X restore failed
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 04 Sep 2008 08:31:47 +0100
Delivery-date: Thu, 04 Sep 2008 00:31:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I'm not sure how to properly recover from that condition, but at least don't
let it happen silently.

As usual, written and tested on 2.6.27-rc5 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2008-09-01/drivers/pci/msi-xen.c
===================================================================
--- head-2008-09-01.orig/drivers/pci/msi-xen.c  2008-09-01 14:08:26.000000000 
+0200
+++ head-2008-09-01/drivers/pci/msi-xen.c       2008-09-01 14:20:17.000000000 
+0200
@@ -335,9 +335,15 @@ static void __pci_restore_msix_state(str
 
        spin_lock_irqsave(&msi_dev_entry->pirq_list_lock, flags);
        list_for_each_entry_safe(pirq_entry, tmp,
-                                &msi_dev_entry->pirq_list_head, list)
-               msi_map_pirq_to_vector(dev, pirq_entry->pirq,
-                                      pirq_entry->entry_nr, table_base);
+                                &msi_dev_entry->pirq_list_head, list) {
+               int rc = msi_map_pirq_to_vector(dev, pirq_entry->pirq,
+                                               pirq_entry->entry_nr, 
table_base);
+               if (rc < 0)
+                       printk(KERN_WARNING
+                              "%s: re-mapping irq #%d (pirq%d) failed: %d\n",
+                              pci_name(dev), pirq_entry->entry_nr,
+                              pirq_entry->pirq, rc);
+       }
        spin_unlock_irqrestore(&msi_dev_entry->pirq_list_lock, flags);
 
        enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX);




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux: print at least a message if MSI-X restore failed, Jan Beulich <=