Skip to content

Commit

Permalink
PCI MSI: Unmask MSI if setup failed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hidetoshi Seto authored and Jesse Barnes committed Jun 29, 2009
1 parent 2c21fd4 commit 7ba1930
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7ba1930

Please sign in to comment.