Jan Beulich
2008-Sep-04 07:31 UTC
[Xen-devel] [PATCH] 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. 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@novell.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel