From: "Jan Beulich" Subject: [PATCH] linux: print at least a message if MSI-X restore failed Date: Thu, 04 Sep 2008 08:31:47 +0100 Message-ID: <48BFAB03.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 Index: head-2008-09-01/drivers/pci/msi-xen.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-09-01.orig/drivers/pci/msi-xen.c 2008-09-01 14:08:26.0000000= 00 +0200 +++ head-2008-09-01/drivers/pci/msi-xen.c 2008-09-01 14:20:17.0000000= 00 +0200 @@ -335,9 +335,15 @@ static void __pci_restore_msix_state(str =20 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 =3D 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); =20 enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX);