lkml.org 
[lkml]   [2006]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] ALSA: hda-intel - Disable MSI support by default
Please try the patch about using pci_intx.

it could use msi.

YH
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index e35cfd3..88b99ab 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -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;
}

@@ -1435,11 +1436,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 +1537,8 @@ static int __devinit azx_create(struct s
chip->pci = pci;
chip->irq = -1;
chip->driver_type = driver_type;
- chip->msi = enable_msi;
+// chip->msi = enable_msi;
+ chip->msi = 1;

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);
\
 
 \ /
  Last update: 2006-11-16 07:13    [W:2.526 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site