diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index e35cfd3..98d25d8 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -55,7 +55,7 @@ static char *model; static int position_fix; static int probe_mask = -1; static int single_cmd; -static int enable_msi; +static int disable_msi; module_param(index, int, 0444); MODULE_PARM_DESC(index, "Index value for Intel HD audio interface."); @@ -69,8 +69,8 @@ module_param(probe_mask, int, 0444); MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1)."); module_param(single_cmd, bool, 0444); MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs (for debugging only)."); -module_param(enable_msi, int, 0); -MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)"); +module_param(disable_msi, int, 0); +MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); /* just for backward compatibility */ @@ -547,6 +547,7 @@ static unsigned int azx_rirb_get_respons chip->msi = 0; if (azx_acquire_irq(chip, 1) < 0) return -1; + pci_intx(chip->pci, 1); goto again; } @@ -1380,7 +1381,8 @@ static int __devinit azx_init_stream(str static int azx_acquire_irq(struct azx *chip, int do_disconnect) { - if (request_irq(chip->pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(chip->pci->irq, azx_interrupt, + chip->msi ? 0 : IRQF_SHARED, "HDA Intel", chip)) { printk(KERN_ERR "hda-intel: unable to grab IRQ %d, " "disabling device\n", chip->pci->irq); @@ -1435,11 +1437,16 @@ static int azx_resume(struct pci_dev *pc return -EIO; } pci_set_master(pci); - if (chip->msi) + if (chip->msi) { + pci_intx(pci, 0); if (pci_enable_msi(pci) < 0) chip->msi = 0; + } if (azx_acquire_irq(chip, 1) < 0) return -EIO; + + if (!chip->msi) + pci_intx(pci, 1); azx_init_chip(chip); snd_hda_resume(chip->bus); snd_power_change_state(card, SNDRV_CTL_POWER_D0); @@ -1531,7 +1538,7 @@ static int __devinit azx_create(struct s chip->pci = pci; chip->irq = -1; chip->driver_type = driver_type; - chip->msi = enable_msi; + chip->msi = !disable_msi; chip->position_fix = position_fix; chip->single_cmd = single_cmd; @@ -1561,14 +1568,19 @@ #endif goto errout; } - if (chip->msi) + if (chip->msi) { + pci_intx(pci, 0); if (pci_enable_msi(pci) < 0) chip->msi = 0; + } if (azx_acquire_irq(chip, 0) < 0) { err = -EBUSY; goto errout; } + + if(!chip->msi) + pci_intx(pci, 1); pci_set_master(pci); synchronize_irq(chip->irq);