summaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2009-06-23 10:39:27 +0200
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-06-29 21:16:19 +0200
commit7ba1930db02fc3118165338ef4e562869f575583 (patch)
tree6d889549aa2e15c6762c7cfc87764adfc3d6af4b /drivers/pci/msi.c
parentPCI MSI: shorten PCI_MSIX_ENTRY_* symbol names (diff)
downloadlinux-7ba1930db02fc3118165338ef4e562869f575583.tar.xz
linux-7ba1930db02fc3118165338ef4e562869f575583.zip
PCI MSI: Unmask MSI if setup failed
The initial state of mask register of MSI is unmasked. We set it masked before calling arch_setup_msi_irqs(). If arch_setup_msi_irq() fails, it is better to restore the state of the mask register. Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index a088fc6f5838..9ab4fe8f20af 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -383,6 +383,7 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
/* Configure MSI capability structure */
ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSI);
if (ret) {
+ msi_mask_irq(entry, mask, ~mask);
msi_free_irqs(dev);
return ret;
}