diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-06-23 04:39:27 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-06-29 15:16:19 -0400 |
commit | 7ba1930db02fc3118165338ef4e562869f575583 (patch) | |
tree | 6d889549aa2e15c6762c7cfc87764adfc3d6af4b /drivers/pci | |
parent | 2c21fd4b333e4c780a46edcd6d1e85bfc6cdf371 (diff) |
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')
-rw-r--r-- | drivers/pci/msi.c | 1 |
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) | |||
383 | /* Configure MSI capability structure */ | 383 | /* Configure MSI capability structure */ |
384 | ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSI); | 384 | ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSI); |
385 | if (ret) { | 385 | if (ret) { |
386 | msi_mask_irq(entry, mask, ~mask); | ||
386 | msi_free_irqs(dev); | 387 | msi_free_irqs(dev); |
387 | return ret; | 388 | return ret; |
388 | } | 389 | } |