[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] linux: print at least a message if MSI-X restore failed



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1220524239 -3600
# Node ID c47b7e47ab1916a148f73c0c4a32823a00776a64
# Parent  8925ce7552528e12af680cb9097f1b9cff4b7841
linux: print at least a message if MSI-X restore failed

I'm not sure how to properly recover from that condition, but at least
don't let it happen silently.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/pci/msi-xen.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff -r 8925ce755252 -r c47b7e47ab19 drivers/pci/msi-xen.c
--- a/drivers/pci/msi-xen.c     Thu Sep 04 11:30:12 2008 +0100
+++ b/drivers/pci/msi-xen.c     Thu Sep 04 11:30:39 2008 +0100
@@ -372,9 +372,15 @@ void pci_restore_msix_state(struct pci_d
 
        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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.