Skip to contentSkip to conversation

2.6.19-rc1: forcedeth, nobody cared

RFC PATCH In review Prakash Punnoor 8 participants 23 messages Oct 5, 2006 – Oct 31, 2006 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo to cc, as my IRQs look different, so it may be a prob of APIC routing or the like.

The kernel is patched with reiser4 and acpi_skip_timer_override quirk is deactivated (see last link why).

I tried different combinations (dmesg + .config). Differences are mostly pci mt init, irqpoll, nforce eth napi, pata/ide amd driver. Last is current (working, but with irqpoll)

http://www.prakash.gmxhome.de/linux/2.6.19-rc1-1.txt.bz2
http://www.prakash.gmxhome.de/linux/2.6.19-rc1-2.txt.bz2
http://www.prakash.gmxhome.de/linux/2.6.19-rc1-3.txt.bz2
http://www.prakash.gmxhome.de/linux/2.6.19-rc1-4.txt.bz2

cat /proc/interrupts for 2.6.18 resp .19-rc1
http://www.prakash.gmxhome.de/linux/irqs18.txt
http://www.prakash.gmxhome.de/linux/irqs19.txt

lspci can be found here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=115545986619977&w=2

Cheers,

Signature · 3 lines
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V
#1 lore raw

Am Donnerstag 05 Oktober 2006 09:38 schrieb Prakash Punnoor:

Quoted 3 lines

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo to cc, as my IRQs look different, so it may be a prob of APIC routing or the like.

BTW, it also happens w/o nvidia binary loaded.

Cheers,

Signature · 3 lines
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V
#2 lore raw
Quoted 8 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 09:38 schrieb Prakash Punnoor:

Quoted 3 lines

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo to cc, as my IRQs look different, so it may be a prob of APIC routing or the like.

BTW, it also happens w/o nvidia binary loaded.

Cheers,

It might be something local to your system, Prakash, its working normally here, with no unusual messages in /var/log/dmesg. But I'm an ati user, in-kernel radeon driver too.

Signature · 7 lines
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.
#3 lore raw
In reply to Prakash Punnoor

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 6 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo to cc, as my IRQs look different, so it may be a prob of APIC routing or the like.

Quoted 7 lines

The kernel is patched with reiser4 and acpi_skip_timer_override quirk is deactivated (see last link why).

I tried different combinations (dmesg + .config). Differences are mostly pci mt init, irqpoll, nforce eth napi, pata/ide amd driver. Last is current (working, but with irqpoll)

Can you try booting with pci=nomsi ? I have a similar problem with my sound device:

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2503

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih Aşıcı:

Quoted 10 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 9 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic. But (I noticed this with the kernel booted with irqpoll, as well) IRQ balancing seems not to work anymore:

CPU0 CPU1

  0:      53826          0   IO-APIC-edge     timer
  1:         66          0   IO-APIC-edge     i8042
  7:          0          0   IO-APIC-edge     parport0
  8:          0          0   IO-APIC-edge     rtc
  9:          0          0   IO-APIC-fasteoi  acpi
 12:       1650          0   IO-APIC-edge     i8042
 14:         63          0   IO-APIC-edge     ide0
 16:       2095          0   IO-APIC-fasteoi  nvidia
 19:          6          0   IO-APIC-fasteoi  ohci1394
 20:          0          0   IO-APIC-fasteoi  ohci_hcd:usb1
 21:         66          0   IO-APIC-fasteoi  ehci_hcd:usb2
 22:       5652          0   IO-APIC-fasteoi  libata
 23:       5105          0   IO-APIC-fasteoi  HDA Intel, eth0
NMI:        155         75
LOC:      53715      53649
ERR:          0
Signature · 3 lines
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V
#6 lore raw

RFC PATCH 1/1 snd-hda-intel: default MSI to off

Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

cu
Adrian

<-- snip -->

As reported in http://lkml.org/lkml/2006/10/7/164, MSI support in snd-hda-intel seems to break some previously working setups.

---

 Documentation/sound/alsa/ALSA-Configuration.txt |    2 +-
 sound/pci/hda/hda_intel.c                       |   14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
Documentation/sound/alsa/ALSA-Configuration.txt renamed from Documentation/sound/alsa/ALSA-Configuration.txt.old +1 -1
@@ -753,7 +753,7 @@
     position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
     single_cmd  - Use single immediate commands to communicate with
 		codecs (for debugging only)
-    disable_msi - Disable Message Signaled Interrupt (MSI)
+    enable_msi - Enable Message Signaled Interrupt (MSI)
 
     This module supports one card and autoprobe.
 
sound/pci/hda/hda_intel.c renamed from sound/pci/hda/hda_intel.c.old +7 -7
@@ -55,7 +55,7 @@
 static int position_fix;
 static int probe_mask = -1;
 static int single_cmd;
-static int disable_msi;
+static int enable_msi;
 
 module_param(index, int, 0444);
 MODULE_PARM_DESC(index, "Index value for Intel HD audio interface.");
@@ -69,8 +69,8 @@
 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(disable_msi, int, 0);
-MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
+module_param(enable_msi, int, 0);
+MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)");
 
 
 /* just for backward compatibility */
@@ -1381,7 +1381,7 @@
 	azx_free_cmd_io(chip);
 	if (chip->irq >= 0)
 		free_irq(chip->irq, chip);
-	if (!disable_msi)
+	if (enable_msi)
 		pci_disable_msi(chip->pci);
 	pci_disable_device(pci);
 	pci_save_state(pci);
@@ -1395,7 +1395,7 @@
 
 	pci_restore_state(pci);
 	pci_enable_device(pci);
-	if (!disable_msi)
+	if (enable_msi)
 		pci_enable_msi(pci);
 	/* FIXME: need proper error handling */
 	request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
@@ -1437,7 +1437,7 @@
 
 	if (chip->irq >= 0) {
 		free_irq(chip->irq, (void*)chip);
-		if (!disable_msi)
+		if (enable_msi)
 			pci_disable_msi(chip->pci);
 	}
 	if (chip->remap_addr)
@@ -1523,7 +1523,7 @@
 		goto errout;
 	}
 
-	if (!disable_msi)
+	if (enable_msi)
 		pci_enable_msi(pci);
 
 	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#7 lore raw

Re: [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

Quoted 11 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

MSI works with my sound, ethernet, and SATA:

 66:    1131814          0         PCI-MSI  libata
 98:      89556          0         PCI-MSI  HDA Intel
106:     943530          0         PCI-MSI  eth0

so maybe this should be done for nforce chipsets or whatever is seeing the problem?

Quoted 85 lines

<-- snip -->

As reported in http://lkml.org/lkml/2006/10/7/164, MSI support in snd-hda-intel seems to break some previously working setups.

---

 Documentation/sound/alsa/ALSA-Configuration.txt |    2 +-
 sound/pci/hda/hda_intel.c                       |   14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
Documentation/sound/alsa/ALSA-Configuration.txt renamed from Documentation/sound/alsa/ALSA-Configuration.txt.old +1 -1
@@ -753,7 +753,7 @@
     position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
     single_cmd  - Use single immediate commands to communicate with
 		codecs (for debugging only)
-    disable_msi - Disable Message Signaled Interrupt (MSI)
+    enable_msi - Enable Message Signaled Interrupt (MSI)
 
     This module supports one card and autoprobe.
 
sound/pci/hda/hda_intel.c renamed from sound/pci/hda/hda_intel.c.old +7 -8
@@ -55,7 +55,7 @@
 static int position_fix;
 static int probe_mask = -1;
 static int single_cmd;
-static int disable_msi;
+static int enable_msi;
 
 module_param(index, int, 0444);
 MODULE_PARM_DESC(index, "Index value for Intel HD audio interface.");
@@ -69,8 +69,8 @@
 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(disable_msi, int, 0);
-MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
+module_param(enable_msi, int, 0);
+MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)");
 
 
 /* just for backward compatibility */
@@ -1381,7 +1381,7 @@
 	azx_free_cmd_io(chip);
 	if (chip->irq >= 0)
 		free_irq(chip->irq, chip);
-	if (!disable_msi)
+	if (enable_msi)
 		pci_disable_msi(chip->pci);
 	pci_disable_device(pci);
 	pci_save_state(pci);
@@ -1395,7 +1395,7 @@
 
 	pci_restore_state(pci);
 	pci_enable_device(pci);
-	if (!disable_msi)
+	if (enable_msi)
 		pci_enable_msi(pci);
 	/* FIXME: need proper error handling */
 	request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
@@ -1437,7 +1437,7 @@
 
 	if (chip->irq >= 0) {
 		free_irq(chip->irq, (void*)chip);
-		if (!disable_msi)
+		if (enable_msi)
 			pci_disable_msi(chip->pci);
 	}
 	if (chip->remap_addr)
@@ -1523,7 +1523,7 @@
 		goto errout;
 	}
 
-	if (!disable_msi)
+	if (enable_msi)
 		pci_enable_msi(pci);
 
 	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
 
-
Quoted 5 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

---
~Randy

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#8 lore raw

Re: [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

At Tue, 17 Oct 2006 14:29:57 -0700,

Quoted 23 lines · Randy Dunlap
Quoted 11 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 8 lines

MSI works with my sound, ethernet, and SATA:

 66:    1131814          0         PCI-MSI  libata
 98:      89556          0         PCI-MSI  HDA Intel
106:     943530          0         PCI-MSI  eth0

so maybe this should be done for nforce chipsets or whatever is seeing the problem?

I agree that this is pretty much depending on the hardware, so disabling all might be exaggerated.
The sound with MSI works on all of my test machines with Intel chipset, so far.

Takashi

#9 lore raw

Re: [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

In reply to Randy Dunlap

At Tue, 17 Oct 2006 14:29:57 -0700,

Quoted 23 lines · Randy Dunlap
Quoted 11 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 8 lines

MSI works with my sound, ethernet, and SATA:

 66:    1131814          0         PCI-MSI  libata
 98:      89556          0         PCI-MSI  HDA Intel
106:     943530          0         PCI-MSI  eth0

so maybe this should be done for nforce chipsets or whatever is seeing the problem?

I agree that this is pretty much depending on the hardware, so disabling all might be exaggerated.
The sound with MSI works on all of my test machines with Intel chipset, so far.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#10 lore raw

Re: [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

In reply to Adrian Bunk
Quoted 17 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Quoted 6 lines

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

cu
Adrian

It shouldn't be that hard to write a small bit of code to force an interrupt and catch it, that's what other drivers do to workaround the BIOS braindamage that seems to be rampant (until M$ Vista comes out and supports MSI).

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#11 lore raw

Re: [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

Am Dienstag 17 Oktober 2006 23:40 schrieb Stephen Hemminger:

Quoted 23 lines

On Tue, 17 Oct 2006 23:13:01 +0200

Quoted 20 lines · Adrian Bunk
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 9 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 8 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic. ...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Could it perhaps be that the forcedeth driver isn't MSI aware and this causes breakage?

Signature · 3 lines
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#12 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

In reply to Stephen Hemminger

At Tue, 17 Oct 2006 14:40:53 -0700,

Quoted 24 lines · Stephen Hemminger
Quoted 20 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 7 lines
Quoted 3 lines

cu
Adrian

It shouldn't be that hard to write a small bit of code to force an interrupt and catch it, that's what other drivers do to workaround the BIOS braindamage that seems to be rampant (until M$ Vista comes out and supports MSI).

OK, what about a patch like below?

It's against the latest ALSA tree, so please pull alsa.git from
git://kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
before applying it (this tree includes only patches to be pushed to 2.6.19).

Takashi

pci/hda/hda_intel.c +33 -11
diff -r 0047a372140b pci/hda/hda_intel.c
@@ -337,6 +337,7 @@ struct azx {
 	unsigned int initialized :1;
 	unsigned int single_cmd :1;
 	unsigned int polling_mode :1;
+	unsigned int msi :1;
 };
 
 /* driver types */
@@ -397,6 +398,7 @@ static char *driver_short_names[] __devi
  */
 #define upper_32bit(addr) (sizeof(addr) > 4 ? (u32)((addr) >> 32) : (u32)0)
 
+static int azx_acquire_irq(struct azx *chip);
 
 /*
  * Interface for HD codec
@@ -535,6 +537,18 @@ static unsigned int azx_rirb_get_respons
 			return chip->rirb.res; /* the last value */
 		schedule_timeout_interruptible(1);
 	} while (time_after_eq(timeout, jiffies));
+
+	if (chip->msi) {
+		snd_printk(KERN_WARNING "hda_intel: No response from codec, "
+			   "disabling MSI...\n");
+		free_irq(chip->irq, chip);
+		chip->irq = -1;
+		pci_disable_msi(chip->pci);
+		chip->msi = 0;
+		if (azx_acquire_irq(chip) < 0)
+			return -1;
+		goto again;
+	}
 
 	if (!chip->polling_mode) {
 		snd_printk(KERN_WARNING "hda_intel: azx_get_response timeout, "
@@ -1364,6 +1378,19 @@ static int __devinit azx_init_stream(str
 	return 0;
 }
 
+static int azx_acquire_irq(struct azx *chip)
+{
+	if (request_irq(chip->pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+			"HDA Intel", chip)) {
+		printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
+		       "disabling device\n", chip->pci->irq);
+		snd_card_disconnect(chip->card);
+		return -1;
+	}
+	chip->irq = chip->pci->irq;
+	return 0;
+}
+
 
 #ifdef CONFIG_PM
 /*
@@ -1385,7 +1412,7 @@ static int azx_suspend(struct pci_dev *p
 		free_irq(chip->irq, chip);
 		chip->irq = -1;
 	}
-	if (!disable_msi)
+	if (chip->msi)
 		pci_disable_msi(chip->pci);
 	pci_disable_device(pci);
 	pci_save_state(pci);
@@ -1407,16 +1434,10 @@ static int azx_resume(struct pci_dev *pc
 		return -EIO;
 	}
 	pci_set_master(pci);
-	if (!disable_msi)
+	if (chip->msi)
 		pci_enable_msi(pci);
-	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
-			"HDA Intel", chip)) {
-		printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
-		       "disabling device\n", pci->irq);
-		snd_card_disconnect(card);
+	if (azx_acquire_irq(chip) < 0)
 		return -EIO;
-	}
-	chip->irq = pci->irq;
 	azx_init_chip(chip);
 	snd_hda_resume(chip->bus);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
@@ -1452,7 +1473,7 @@ static int azx_free(struct azx *chip)
 		synchronize_irq(chip->irq);
 		free_irq(chip->irq, (void*)chip);
 	}
-	if (!disable_msi)
+	if (chip->msi)
 		pci_disable_msi(chip->pci);
 	if (chip->remap_addr)
 		iounmap(chip->remap_addr);
@@ -1508,6 +1529,7 @@ static int __devinit azx_create(struct s
 	chip->pci = pci;
 	chip->irq = -1;
 	chip->driver_type = driver_type;
+	chip->msi = !disable_msi;
 
 	chip->position_fix = position_fix;
 	chip->single_cmd = single_cmd;
@@ -1537,7 +1559,7 @@ static int __devinit azx_create(struct s
 		goto errout;
 	}
 
-	if (!disable_msi)
+	if (chip->msi)
 		pci_enable_msi(pci);
 
 	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
#13 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

Quoted 34 lines · On Wed, 18 Oct 2006 12:24:54 +0200 Takashi Iwai <[email protected]> wrote:

At Tue, 17 Oct 2006 14:40:53 -0700,

Quoted 24 lines · Stephen Hemminger
Quoted 20 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 7 lines
Quoted 3 lines

cu
Adrian

It shouldn't be that hard to write a small bit of code to force an interrupt and catch it, that's what other drivers do to workaround the BIOS braindamage that seems to be rampant (until M$ Vista comes out and supports MSI).

Quoted 7 lines

OK, what about a patch like below?

It's against the latest ALSA tree, so please pull alsa.git from
git://kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
before applying it (this tree includes only patches to be pushed to 2.6.19).

Looks good, I'll try it

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#14 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

In reply to Takashi Iwai
Quoted 36 lines · On Wed, 18 Oct 2006 12:24:54 +0200 Takashi Iwai <[email protected]> wrote:

At Tue, 17 Oct 2006 14:40:53 -0700,

Quoted 24 lines · Stephen Hemminger
Quoted 20 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 7 lines
Quoted 3 lines

cu
Adrian

It shouldn't be that hard to write a small bit of code to force an interrupt and catch it, that's what other drivers do to workaround the BIOS braindamage that seems to be rampant (until M$ Vista comes out and supports MSI).

OK, what about a patch like below?

Quoted 8 lines

It's against the latest ALSA tree, so please pull alsa.git from
git://kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
before applying it (this tree includes only patches to be pushed to 2.6.19).

Takashi

Don't you need to check return value from pci_enable_msi()?

Signature · 7 lines
Stephen Hemminger <[email protected]>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
#15 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

At Wed, 18 Oct 2006 10:02:19 -0700,

Quoted 46 lines · Stephen Hemminger
Quoted 42 lines · On Wed, 18 Oct 2006 12:24:54 +0200 Takashi Iwai <[email protected]> wrote:

At Tue, 17 Oct 2006 14:40:53 -0700,

Quoted 24 lines · Stephen Hemminger
Quoted 20 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 7 lines
Quoted 3 lines

cu
Adrian

It shouldn't be that hard to write a small bit of code to force an interrupt and catch it, that's what other drivers do to workaround the BIOS braindamage that seems to be rampant (until M$ Vista comes out and supports MSI).

OK, what about a patch like below?

It's against the latest ALSA tree, so please pull alsa.git from
git://kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
before applying it (this tree includes only patches to be pushed to 2.6.19).

Quoted 4 lines
Quoted 2 lines

Takashi

Don't you need to check return value from pci_enable_msi()?

Yes, it would be better to check the value and reset chip->msi if not successful. But it's not a fatal error, so the current code should work.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#16 lore raw

Re: [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

At Wed, 18 Oct 2006 19:12:50 +0200,

Quoted 49 lines · I wrote:

At Wed, 18 Oct 2006 10:02:19 -0700,

Quoted 46 lines · Stephen Hemminger
Quoted 42 lines · On Wed, 18 Oct 2006 12:24:54 +0200 Takashi Iwai <[email protected]> wrote:

At Tue, 17 Oct 2006 14:40:53 -0700,

Quoted 24 lines · Stephen Hemminger
Quoted 20 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 7 lines
Quoted 3 lines

cu
Adrian

It shouldn't be that hard to write a small bit of code to force an interrupt and catch it, that's what other drivers do to workaround the BIOS braindamage that seems to be rampant (until M$ Vista comes out and supports MSI).

OK, what about a patch like below?

It's against the latest ALSA tree, so please pull alsa.git from
git://kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
before applying it (this tree includes only patches to be pushed to 2.6.19).

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Takashi

Don't you need to check return value from pci_enable_msi()?

Yes, it would be better to check the value and reset chip->msi if not successful. But it's not a fatal error, so the current code should work.

The below is the revised patch.

Takashi

sound/pci/hda/hda_intel.c +40 -18
diff -r 74a0618b5f3e sound/pci/hda/hda_intel.c
@@ -337,6 +337,7 @@ struct azx {
 	unsigned int initialized :1;
 	unsigned int single_cmd :1;
 	unsigned int polling_mode :1;
+	unsigned int msi :1;
 };
 
 /* driver types */
@@ -397,6 +398,7 @@ static char *driver_short_names[] __devi
  */
 #define upper_32bit(addr) (sizeof(addr) > 4 ? (u32)((addr) >> 32) : (u32)0)
 
+static int azx_acquire_irq(struct azx *chip, int do_disconnect);
 
 /*
  * Interface for HD codec
@@ -535,6 +537,18 @@ static unsigned int azx_rirb_get_respons
 			return chip->rirb.res; /* the last value */
 		schedule_timeout_interruptible(1);
 	} while (time_after_eq(timeout, jiffies));
+
+	if (chip->msi) {
+		snd_printk(KERN_WARNING "hda_intel: No response from codec, "
+			   "disabling MSI...\n");
+		free_irq(chip->irq, chip);
+		chip->irq = -1;
+		pci_disable_msi(chip->pci);
+		chip->msi = 0;
+		if (azx_acquire_irq(chip, 1) < 0)
+			return -1;
+		goto again;
+	}
 
 	if (!chip->polling_mode) {
 		snd_printk(KERN_WARNING "hda_intel: azx_get_response timeout, "
@@ -1364,6 +1378,20 @@ static int __devinit azx_init_stream(str
 	return 0;
 }
 
+static int azx_acquire_irq(struct azx *chip, int do_disconnect)
+{
+	if (request_irq(chip->pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+			"HDA Intel", chip)) {
+		printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
+		       "disabling device\n", chip->pci->irq);
+		if (do_disconnect)
+			snd_card_disconnect(chip->card);
+		return -1;
+	}
+	chip->irq = chip->pci->irq;
+	return 0;
+}
+
 
 #ifdef CONFIG_PM
 /*
@@ -1385,7 +1413,7 @@ static int azx_suspend(struct pci_dev *p
 		free_irq(chip->irq, chip);
 		chip->irq = -1;
 	}
-	if (!disable_msi)
+	if (chip->msi)
 		pci_disable_msi(chip->pci);
 	pci_disable_device(pci);
 	pci_save_state(pci);
@@ -1407,16 +1435,11 @@ static int azx_resume(struct pci_dev *pc
 		return -EIO;
 	}
 	pci_set_master(pci);
-	if (!disable_msi)
-		pci_enable_msi(pci);
-	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
-			"HDA Intel", chip)) {
-		printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
-		       "disabling device\n", pci->irq);
-		snd_card_disconnect(card);
+	if (chip->msi)
+		if (pci_enable_msi(pci) < 0)
+			chip->msi = 0;
+	if (azx_acquire_irq(chip, 1) < 0)
 		return -EIO;
-	}
-	chip->irq = pci->irq;
 	azx_init_chip(chip);
 	snd_hda_resume(chip->bus);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
@@ -1452,7 +1475,7 @@ static int azx_free(struct azx *chip)
 		synchronize_irq(chip->irq);
 		free_irq(chip->irq, (void*)chip);
 	}
-	if (!disable_msi)
+	if (chip->msi)
 		pci_disable_msi(chip->pci);
 	if (chip->remap_addr)
 		iounmap(chip->remap_addr);
@@ -1508,6 +1531,7 @@ static int __devinit azx_create(struct s
 	chip->pci = pci;
 	chip->irq = -1;
 	chip->driver_type = driver_type;
+	chip->msi = !disable_msi;
 
 	chip->position_fix = position_fix;
 	chip->single_cmd = single_cmd;
@@ -1537,16 +1561,14 @@ static int __devinit azx_create(struct s
 		goto errout;
 	}
 
-	if (!disable_msi)
-		pci_enable_msi(pci);
-
-	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
-			"HDA Intel", (void*)chip)) {
-		snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq);
+	if (chip->msi)
+		if (pci_enable_msi(pci) < 0)
+			chip->msi = 0;
+
+	if (azx_acquire_irq(chip, 0) < 0) {
 		err = -EBUSY;
 		goto errout;
 	}
-	chip->irq = pci->irq;
 
 	pci_set_master(pci);
 	synchronize_irq(chip->irq);

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#17 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

In reply to Takashi Iwai

At Wed, 18 Oct 2006 19:12:50 +0200,

Quoted 49 lines · I wrote:

At Wed, 18 Oct 2006 10:02:19 -0700,

Quoted 46 lines · Stephen Hemminger
Quoted 42 lines · On Wed, 18 Oct 2006 12:24:54 +0200 Takashi Iwai <[email protected]> wrote:

At Tue, 17 Oct 2006 14:40:53 -0700,

Quoted 24 lines · Stephen Hemminger
Quoted 20 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 7 lines
Quoted 3 lines

cu
Adrian

It shouldn't be that hard to write a small bit of code to force an interrupt and catch it, that's what other drivers do to workaround the BIOS braindamage that seems to be rampant (until M$ Vista comes out and supports MSI).

OK, what about a patch like below?

It's against the latest ALSA tree, so please pull alsa.git from
git://kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
before applying it (this tree includes only patches to be pushed to 2.6.19).

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Takashi

Don't you need to check return value from pci_enable_msi()?

Yes, it would be better to check the value and reset chip->msi if not successful. But it's not a fatal error, so the current code should work.

The below is the revised patch.

Takashi

sound/pci/hda/hda_intel.c +40 -18
diff -r 74a0618b5f3e sound/pci/hda/hda_intel.c
@@ -337,6 +337,7 @@ struct azx {
 	unsigned int initialized :1;
 	unsigned int single_cmd :1;
 	unsigned int polling_mode :1;
+	unsigned int msi :1;
 };
 
 /* driver types */
@@ -397,6 +398,7 @@ static char *driver_short_names[] __devi
  */
 #define upper_32bit(addr) (sizeof(addr) > 4 ? (u32)((addr) >> 32) : (u32)0)
 
+static int azx_acquire_irq(struct azx *chip, int do_disconnect);
 
 /*
  * Interface for HD codec
@@ -535,6 +537,18 @@ static unsigned int azx_rirb_get_respons
 			return chip->rirb.res; /* the last value */
 		schedule_timeout_interruptible(1);
 	} while (time_after_eq(timeout, jiffies));
+
+	if (chip->msi) {
+		snd_printk(KERN_WARNING "hda_intel: No response from codec, "
+			   "disabling MSI...\n");
+		free_irq(chip->irq, chip);
+		chip->irq = -1;
+		pci_disable_msi(chip->pci);
+		chip->msi = 0;
+		if (azx_acquire_irq(chip, 1) < 0)
+			return -1;
+		goto again;
+	}
 
 	if (!chip->polling_mode) {
 		snd_printk(KERN_WARNING "hda_intel: azx_get_response timeout, "
@@ -1364,6 +1378,20 @@ static int __devinit azx_init_stream(str
 	return 0;
 }
 
+static int azx_acquire_irq(struct azx *chip, int do_disconnect)
+{
+	if (request_irq(chip->pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+			"HDA Intel", chip)) {
+		printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
+		       "disabling device\n", chip->pci->irq);
+		if (do_disconnect)
+			snd_card_disconnect(chip->card);
+		return -1;
+	}
+	chip->irq = chip->pci->irq;
+	return 0;
+}
+
 
 #ifdef CONFIG_PM
 /*
@@ -1385,7 +1413,7 @@ static int azx_suspend(struct pci_dev *p
 		free_irq(chip->irq, chip);
 		chip->irq = -1;
 	}
-	if (!disable_msi)
+	if (chip->msi)
 		pci_disable_msi(chip->pci);
 	pci_disable_device(pci);
 	pci_save_state(pci);
@@ -1407,16 +1435,11 @@ static int azx_resume(struct pci_dev *pc
 		return -EIO;
 	}
 	pci_set_master(pci);
-	if (!disable_msi)
-		pci_enable_msi(pci);
-	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
-			"HDA Intel", chip)) {
-		printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
-		       "disabling device\n", pci->irq);
-		snd_card_disconnect(card);
+	if (chip->msi)
+		if (pci_enable_msi(pci) < 0)
+			chip->msi = 0;
+	if (azx_acquire_irq(chip, 1) < 0)
 		return -EIO;
-	}
-	chip->irq = pci->irq;
 	azx_init_chip(chip);
 	snd_hda_resume(chip->bus);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
@@ -1452,7 +1475,7 @@ static int azx_free(struct azx *chip)
 		synchronize_irq(chip->irq);
 		free_irq(chip->irq, (void*)chip);
 	}
-	if (!disable_msi)
+	if (chip->msi)
 		pci_disable_msi(chip->pci);
 	if (chip->remap_addr)
 		iounmap(chip->remap_addr);
@@ -1508,6 +1531,7 @@ static int __devinit azx_create(struct s
 	chip->pci = pci;
 	chip->irq = -1;
 	chip->driver_type = driver_type;
+	chip->msi = !disable_msi;
 
 	chip->position_fix = position_fix;
 	chip->single_cmd = single_cmd;
@@ -1537,16 +1561,14 @@ static int __devinit azx_create(struct s
 		goto errout;
 	}
 
-	if (!disable_msi)
-		pci_enable_msi(pci);
-
-	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
-			"HDA Intel", (void*)chip)) {
-		snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq);
+	if (chip->msi)
+		if (pci_enable_msi(pci) < 0)
+			chip->msi = 0;
+
+	if (azx_acquire_irq(chip, 0) < 0) {
 		err = -EBUSY;
 		goto errout;
 	}
-	chip->irq = pci->irq;
 
 	pci_set_master(pci);
 	synchronize_irq(chip->irq);
#18 lore raw

Have another card to donate - SBLIVE CT4780

I just got a few more cards in and among them is a pair of CT4780s - one of which is now in my server and the other up for grabs

Who wants it?

Quoted 195 lines · Takashi Iwai

At Wed, 18 Oct 2006 19:12:50 +0200,

Quoted 49 lines · I wrote:

At Wed, 18 Oct 2006 10:02:19 -0700,

Quoted 46 lines · Stephen Hemminger
Quoted 42 lines · On Wed, 18 Oct 2006 12:24:54 +0200 Takashi Iwai <[email protected]> wrote:

At Tue, 17 Oct 2006 14:40:53 -0700,

Quoted 24 lines · Stephen Hemminger
Quoted 20 lines · On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

Quoted 7 lines
Quoted 3 lines

cu
Adrian

It shouldn't be that hard to write a small bit of code to force an interrupt and catch it, that's what other drivers do to workaround the BIOS braindamage that seems to be rampant (until M$ Vista comes out and supports MSI).

OK, what about a patch like below?

It's against the latest ALSA tree, so please pull alsa.git from
git://kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
before applying it (this tree includes only patches to be pushed to 2.6.19).

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Takashi

Don't you need to check return value from pci_enable_msi()?

Yes, it would be better to check the value and reset chip->msi if not successful. But it's not a fatal error, so the current code should work.

The below is the revised patch.

Takashi

diff -r 74a0618b5f3e sound/pci/hda/hda_intel.c

sound/pci/hda/hda_intel.c +40 -19
@@ -337,6 +337,7 @@ struct azx {
 	unsigned int initialized :1;
 	unsigned int single_cmd :1;
 	unsigned int polling_mode :1;
+	unsigned int msi :1;
 };
 
 /* driver types */
@@ -397,6 +398,7 @@ static char *driver_short_names[] __devi
  */
 #define upper_32bit(addr) (sizeof(addr) > 4 ? (u32)((addr) >> 32) : (u32)0)
 
+static int azx_acquire_irq(struct azx *chip, int do_disconnect);
 
 /*
  * Interface for HD codec
@@ -535,6 +537,18 @@ static unsigned int azx_rirb_get_respons
 			return chip->rirb.res; /* the last value */
 		schedule_timeout_interruptible(1);
 	} while (time_after_eq(timeout, jiffies));
+
+	if (chip->msi) {
+		snd_printk(KERN_WARNING "hda_intel: No response from codec, "
+			   "disabling MSI...\n");
+		free_irq(chip->irq, chip);
+		chip->irq = -1;
+		pci_disable_msi(chip->pci);
+		chip->msi = 0;
+		if (azx_acquire_irq(chip, 1) < 0)
+			return -1;
+		goto again;
+	}
 
 	if (!chip->polling_mode) {
 		snd_printk(KERN_WARNING "hda_intel: azx_get_response timeout, "
@@ -1364,6 +1378,20 @@ static int __devinit azx_init_stream(str
 	return 0;
 }
 
+static int azx_acquire_irq(struct azx *chip, int do_disconnect)
+{
+	if (request_irq(chip->pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+			"HDA Intel", chip)) {
+		printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
+		       "disabling device\n", chip->pci->irq);
+		if (do_disconnect)
+			snd_card_disconnect(chip->card);
+		return -1;
+	}
+	chip->irq = chip->pci->irq;
+	return 0;
+}
+
 
 #ifdef CONFIG_PM
 /*
@@ -1385,7 +1413,7 @@ static int azx_suspend(struct pci_dev *p
 		free_irq(chip->irq, chip);
 		chip->irq = -1;
 	}
-	if (!disable_msi)
+	if (chip->msi)
 		pci_disable_msi(chip->pci);
 	pci_disable_device(pci);
 	pci_save_state(pci);
@@ -1407,16 +1435,11 @@ static int azx_resume(struct pci_dev *pc
 		return -EIO;
 	}
 	pci_set_master(pci);
-	if (!disable_msi)
-		pci_enable_msi(pci);
-	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
-			"HDA Intel", chip)) {
-		printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
-		       "disabling device\n", pci->irq);
-		snd_card_disconnect(card);
+	if (chip->msi)
+		if (pci_enable_msi(pci) < 0)
+			chip->msi = 0;
+	if (azx_acquire_irq(chip, 1) < 0)
 		return -EIO;
-	}
-	chip->irq = pci->irq;
 	azx_init_chip(chip);
 	snd_hda_resume(chip->bus);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
@@ -1452,7 +1475,7 @@ static int azx_free(struct azx *chip)
 		synchronize_irq(chip->irq);
 		free_irq(chip->irq, (void*)chip);
 	}
-	if (!disable_msi)
+	if (chip->msi)
 		pci_disable_msi(chip->pci);
 	if (chip->remap_addr)
 		iounmap(chip->remap_addr);
@@ -1508,6 +1531,7 @@ static int __devinit azx_create(struct s
 	chip->pci = pci;
 	chip->irq = -1;
 	chip->driver_type = driver_type;
+	chip->msi = !disable_msi;
 
 	chip->position_fix = position_fix;
 	chip->single_cmd = single_cmd;
@@ -1537,16 +1561,14 @@ static int __devinit azx_create(struct s
 		goto errout;
 	}
 
-	if (!disable_msi)
-		pci_enable_msi(pci);
-
-	if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
-			"HDA Intel", (void*)chip)) {
-		snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq);
+	if (chip->msi)
+		if (pci_enable_msi(pci) < 0)
+			chip->msi = 0;
+
+	if (azx_acquire_irq(chip, 0) < 0) {
 		err = -EBUSY;
 		goto errout;
 	}
-	chip->irq = pci->irq;
 
 	pci_set_master(pci);
 	synchronize_irq(chip->irq);
 
-------------------------------------------------------------------------
Quoted 8 lines

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#19 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

In reply to Takashi Iwai

Am Mittwoch 18 Oktober 2006 19:21 schrieb Takashi Iwai:

Quoted 5 lines
Quoted 3 lines

Yes, it would be better to check the value and reset chip->msi if not successful. But it's not a fatal error, so the current code should work.

The below is the revised patch.

I tried it and it works fine for me now (with the driver not using msi automatically now).

Cheers,

Signature · 3 lines
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#20 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

At Sun, 22 Oct 2006 22:29:13 +0200,

Quoted 11 lines · Prakash Punnoor

Am Mittwoch 18 Oktober 2006 19:21 schrieb Takashi Iwai:

Quoted 5 lines
Quoted 3 lines

Yes, it would be better to check the value and reset chip->msi if not successful. But it's not a fatal error, so the current code should work.

The below is the revised patch.

I tried it and it works fine for me now (with the driver not using msi automatically now).

Thanks for checking. I applied the patch to ALSA tree for the next push round.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#21 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

Quoted 9 lines · Takashi Iwai

At Sun, 22 Oct 2006 22:29:13 +0200,

Quoted 7 lines · Prakash Punnoor

Am Mittwoch 18 Oktober 2006 19:21 schrieb Takashi Iwai:

Quoted 4 lines
Quoted 3 lines

Yes, it would be better to check the value and reset chip->msi if not successful. But it's not a fatal error, so the current code should work.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

The below is the revised patch.

I tried it and it works fine for me now (with the driver not using msi automatically now).

Thanks for checking. I applied the patch to ALSA tree for the next push round.

It does not solve my problem. I still need to boot with pci=nomsi option.

Prakash: did you use Takashi's patch or Andrian's patch?

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#22 lore raw

Re: [Alsa-devel] [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

Am Dienstag 31 Oktober 2006 07:56 schrieb Fatih Asici:

Quoted 14 lines · Takashi Iwai
Quoted 13 lines

At Sun, 22 Oct 2006 22:29:13 +0200,

Quoted 9 lines · Prakash Punnoor

Am Mittwoch 18 Oktober 2006 19:21 schrieb Takashi Iwai:

Quoted 5 lines
Quoted 3 lines

Yes, it would be better to check the value and reset chip->msi if not successful. But it's not a fatal error, so the current code should work.

The below is the revised patch.

I tried it and it works fine for me now (with the driver not using msi automatically now).

Quoted 6 lines
Quoted 2 lines

Thanks for checking. I applied the patch to ALSA tree for the next push round.

It does not solve my problem. I still need to boot with pci=nomsi option.

Prakash: did you use Takashi's patch or Andrian's patch?

I used Takashi's revised patch, but rc3 works w/o patching:

dvanced Linux Sound Architecture Driver Version 1.0.13 (Sun Oct 22 08:56:16 2006 UTC).
ACPI: PCI Interrupt Link [AAZA] enabled at IRQ 23
ACPI: PCI Interrupt 0000:00:10.1[B] -> Link [AAZA] -> GSI 23 (level, low) -> IRQ 23
PCI: Setting latency timer of device 0000:00:10.1 to 64
input: ImPS/2 Generic Wheel Mouse as /class/input/input1
hda_intel: No response from codec, disabling MSI...
ALSA device list:
#0: HDA NVidia at 0xfe028000 irq 316

And it disables MSI automatically.

Signature · 3 lines
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#23 lore raw

Re: [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

In reply to Adrian Bunk
Quoted 11 lines · Adrian Bunk
Quoted 10 lines · Prakash Punnoor

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:

Quoted 8 lines

2006/10/5, Prakash Punnoor <[email protected]>:

Quoted 7 lines

Hi,

subjects say it all. Without irqpoll my nic doesn't work anymore. I added Ingo
to cc, as my IRQs look different, so it may be a prob of APIC routing or the
like.

Quoted 9 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Can you try booting with pci=nomsi ? I have a similar problem with my

I used snd-hda-intel.disable_msi=1 and this actually helped! Now the nforce nic works w/o problems. So it was the audio driver causing havoc on the nic.
...

Unless someone finds and fixes what causes such problems, I'd therefore suggest the patch below to let MSI support to be turned off by default.

What about putting MCP51 to the msi quirk list?

drivers/pci/quirks.c +0 -0
index 23b599d..75311df 100644
@@ -1716,6 +1716,7 @@ static void __devinit quirk_disable_msi(
      }

}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_BRIDGE, quirk_disable_msi);

/* Go through the list of Hypertransport capabilities and
* return 1 if a HT MSI capability is found and enabled */

include/linux/pci_ids.h +0 -0
index f069df2..03cb469 100644
@@ -1146,6 +1146,7 @@ #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP5

#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_BRIDGE 0x026F
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS 0x0368
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E