aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 7630622e7f0f..c4b6447bfc7e 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -600,11 +600,8 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
600 dev_warn(chip->card->dev, 600 dev_warn(chip->card->dev,
601 "No response from codec, disabling MSI: last cmd=0x%08x\n", 601 "No response from codec, disabling MSI: last cmd=0x%08x\n",
602 chip->last_cmd[addr]); 602 chip->last_cmd[addr]);
603 free_irq(chip->irq, chip); 603 if (chip->ops->disable_msi_reset_irq &&
604 chip->irq = -1; 604 chip->ops->disable_msi_reset_irq(chip) < 0) {
605 pci_disable_msi(chip->pci);
606 chip->msi = 0;
607 if (azx_acquire_irq(chip, 1) < 0) {
608 bus->rirb_error = 1; 605 bus->rirb_error = 1;
609 return -1; 606 return -1;
610 } 607 }
@@ -3469,6 +3466,21 @@ static u8 pci_azx_readb(u8 *addr)
3469 return readb(addr); 3466 return readb(addr);
3470} 3467}
3471 3468
3469static int disable_msi_reset_irq(struct azx *chip)
3470{
3471 int err;
3472
3473 free_irq(chip->irq, chip);
3474 chip->irq = -1;
3475 pci_disable_msi(chip->pci);
3476 chip->msi = 0;
3477 err = azx_acquire_irq(chip, 1);
3478 if (err < 0)
3479 return err;
3480
3481 return 0;
3482}
3483
3472static const struct hda_controller_ops pci_hda_ops = { 3484static const struct hda_controller_ops pci_hda_ops = {
3473 .writel = pci_azx_writel, 3485 .writel = pci_azx_writel,
3474 .readl = pci_azx_readl, 3486 .readl = pci_azx_readl,
@@ -3476,6 +3488,7 @@ static const struct hda_controller_ops pci_hda_ops = {
3476 .readw = pci_azx_readw, 3488 .readw = pci_azx_readw,
3477 .writeb = pci_azx_writeb, 3489 .writeb = pci_azx_writeb,
3478 .readb = pci_azx_readb, 3490 .readb = pci_azx_readb,
3491 .disable_msi_reset_irq = disable_msi_reset_irq,
3479}; 3492};
3480 3493
3481static int azx_probe(struct pci_dev *pci, 3494static int azx_probe(struct pci_dev *pci,