2006-10-05 07:38:20

by Prakash Punnoor

[permalink] [raw]
Subject: 2.6.19-rc1: forcedeth, nobody cared

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,
--
(°= =°)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (0.98 kB)
(No filename) (189.00 B)
Download all attachments

2006-10-05 08:04:12

by Prakash Punnoor

[permalink] [raw]
Subject: Re: 2.6.19-rc1: forcedeth, nobody cared

Am Donnerstag 05 Oktober 2006 09:38 schrieb Prakash Punnoor:
> 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,
--
(?= =?)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (362.00 B)
(No filename) (189.00 B)
Download all attachments

2006-10-05 11:42:38

by Gene Heskett

[permalink] [raw]
Subject: Re: 2.6.19-rc1: forcedeth, nobody cared

On Thursday 05 October 2006 04:03, Prakash Punnoor wrote:
>Am Donnerstag 05 Oktober 2006 09:38 schrieb Prakash Punnoor:
>> 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.

--
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.

2006-10-05 17:34:40

by Fatih Asici

[permalink] [raw]
Subject: Re: 2.6.19-rc1: forcedeth, nobody cared

2006/10/5, Prakash Punnoor <[email protected]>:
> 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)
>
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

2006-10-05 21:09:11

by Prakash Punnoor

[permalink] [raw]
Subject: Re: 2.6.19-rc1: forcedeth, nobody cared

Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih Aşıcı:
> 2006/10/5, Prakash Punnoor <[email protected]>:
> > 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


--
(°= =°)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (1.49 kB)
(No filename) (189.00 B)
Download all attachments

2006-10-17 21:13:06

by Adrian Bunk

[permalink] [raw]
Subject: [RFC: 2.6.19 patch] snd-hda-intel: default MSI to off

On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > 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.
>...

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.

Signed-off-by: Adrian Bunk <[email protected]>

---

Documentation/sound/alsa/ALSA-Configuration.txt | 2 +-
sound/pci/hda/hda_intel.c | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)

--- linux-2.6/Documentation/sound/alsa/ALSA-Configuration.txt.old 2006-10-17 18:11:48.000000000 +0200
+++ linux-2.6/Documentation/sound/alsa/ALSA-Configuration.txt 2006-10-17 18:12:54.000000000 +0200
@@ -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.

--- linux-2.6/sound/pci/hda/hda_intel.c.old 2006-10-17 18:10:05.000000000 +0200
+++ linux-2.6/sound/pci/hda/hda_intel.c 2006-10-17 18:10:56.000000000 +0200
@@ -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,

2006-10-17 21:32:23

by Randy Dunlap

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

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

> On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > 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.
> >...
>
> 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?


> <-- 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.
>
> Signed-off-by: Adrian Bunk <[email protected]>
>
> ---
>
> Documentation/sound/alsa/ALSA-Configuration.txt | 2 +-
> sound/pci/hda/hda_intel.c | 14 +++++++-------
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> --- linux-2.6/Documentation/sound/alsa/ALSA-Configuration.txt.old 2006-10-17 18:11:48.000000000 +0200
> +++ linux-2.6/Documentation/sound/alsa/ALSA-Configuration.txt 2006-10-17 18:12:54.000000000 +0200
> @@ -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.
>
> --- linux-2.6/sound/pci/hda/hda_intel.c.old 2006-10-17 18:10:05.000000000 +0200
> +++ linux-2.6/sound/pci/hda/hda_intel.c 2006-10-17 18:10:56.000000000 +0200
> @@ -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,
>
> -
> 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

2006-10-17 21:44:38

by Stephen Hemminger

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

On Tue, 17 Oct 2006 23:13:01 +0200
Adrian Bunk <[email protected]> wrote:

> On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > 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.
> >...
>
> 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).

2006-10-18 04:16:48

by Fatih Asici

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

On 10/18/06, Adrian Bunk <[email protected]> wrote:
> On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > 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.
> >...
>
> 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?


diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 23b599d..75311df 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -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 */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index f069df2..03cb469 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -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

2006-10-18 08:00:23

by Takashi Iwai

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

At Tue, 17 Oct 2006 14:29:57 -0700,
Randy Dunlap wrote:
>
> On Tue, 17 Oct 2006 23:13:01 +0200 Adrian Bunk wrote:
>
> > On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > > 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.
> > >...
> >
> > 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?

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

2006-10-18 10:12:35

by Prakash Punnoor

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

Am Dienstag 17 Oktober 2006 23:40 schrieb Stephen Hemminger:
> On Tue, 17 Oct 2006 23:13:01 +0200
>
> Adrian Bunk <[email protected]> wrote:
> > On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > > 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. ...
> >
> > 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?

--
(?= =?)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (1.14 kB)
(No filename) (189.00 B)
Download all attachments

2006-10-18 10:25:01

by Takashi Iwai

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

At Tue, 17 Oct 2006 14:40:53 -0700,
Stephen Hemminger wrote:
>
> On Tue, 17 Oct 2006 23:13:01 +0200
> Adrian Bunk <[email protected]> wrote:
>
> > On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > > 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.
> > >...
> >
> > 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).

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

diff -r 0047a372140b pci/hda/hda_intel.c
--- a/pci/hda/hda_intel.c Tue Oct 17 20:41:38 2006 +0200
+++ b/pci/hda/hda_intel.c Wed Oct 18 11:12:01 2006 +0200
@@ -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,

2006-10-18 16:10:10

by Stephen Hemminger

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

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

> At Tue, 17 Oct 2006 14:40:53 -0700,
> Stephen Hemminger wrote:
> >
> > On Tue, 17 Oct 2006 23:13:01 +0200
> > Adrian Bunk <[email protected]> wrote:
> >
> > > On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > > > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > > > 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.
> > > >...
> > >
> > > 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).
>
> 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

2006-10-18 17:06:10

by Stephen Hemminger

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

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

> At Tue, 17 Oct 2006 14:40:53 -0700,
> Stephen Hemminger wrote:
> >
> > On Tue, 17 Oct 2006 23:13:01 +0200
> > Adrian Bunk <[email protected]> wrote:
> >
> > > On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > > > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > > > 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.
> > > >...
> > >
> > > 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).
>
> 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
>

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

--
Stephen Hemminger <[email protected]>

2006-10-18 17:13:00

by Takashi Iwai

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

At Wed, 18 Oct 2006 10:02:19 -0700,
Stephen Hemminger wrote:
>
> On Wed, 18 Oct 2006 12:24:54 +0200
> Takashi Iwai <[email protected]> wrote:
>
> > At Tue, 17 Oct 2006 14:40:53 -0700,
> > Stephen Hemminger wrote:
> > >
> > > On Tue, 17 Oct 2006 23:13:01 +0200
> > > Adrian Bunk <[email protected]> wrote:
> > >
> > > > On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > > > > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > > > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > > > > 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.
> > > > >...
> > > >
> > > > 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).
> >
> > 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
> >
>
> 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

2006-10-18 17:21:56

by Takashi Iwai

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

At Wed, 18 Oct 2006 19:12:50 +0200,
I wrote:
>
> At Wed, 18 Oct 2006 10:02:19 -0700,
> Stephen Hemminger wrote:
> >
> > On Wed, 18 Oct 2006 12:24:54 +0200
> > Takashi Iwai <[email protected]> wrote:
> >
> > > At Tue, 17 Oct 2006 14:40:53 -0700,
> > > Stephen Hemminger wrote:
> > > >
> > > > On Tue, 17 Oct 2006 23:13:01 +0200
> > > > Adrian Bunk <[email protected]> wrote:
> > > >
> > > > > On Thu, Oct 05, 2006 at 11:08:57PM +0200, Prakash Punnoor wrote:
> > > > > > Am Donnerstag 05 Oktober 2006 19:30 schrieb Fatih A????c??:
> > > > > > > 2006/10/5, Prakash Punnoor <[email protected]>:
> > > > > > > > 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.
> > > > > >...
> > > > >
> > > > > 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).
> > >
> > > 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
> > >
> >
> > 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
--- a/sound/pci/hda/hda_intel.c Wed Oct 18 19:09:46 2006 +0200
+++ b/sound/pci/hda/hda_intel.c Wed Oct 18 19:17:48 2006 +0200
@@ -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);

2006-10-22 20:28:59

by Prakash Punnoor

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

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

> > 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,
--
(?= =?)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (427.00 B)
(No filename) (189.00 B)
Download all attachments

2006-10-23 12:11:12

by Takashi Iwai

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

At Sun, 22 Oct 2006 22:29:13 +0200,
Prakash Punnoor wrote:
>
> Am Mittwoch 18 Oktober 2006 19:21 schrieb Takashi Iwai:
>
> > > 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

2006-10-31 06:56:58

by Fatih Asici

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

On 10/23/06, Takashi Iwai <[email protected]> wrote:
> At Sun, 22 Oct 2006 22:29:13 +0200,
> Prakash Punnoor wrote:
> >
> > Am Mittwoch 18 Oktober 2006 19:21 schrieb Takashi Iwai:
> >
> > > > 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.
>

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?

2006-10-31 08:37:14

by Prakash Punnoor

[permalink] [raw]
Subject: 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:
> On 10/23/06, Takashi Iwai <[email protected]> wrote:
> > At Sun, 22 Oct 2006 22:29:13 +0200,
> >
> > Prakash Punnoor wrote:
> > > Am Mittwoch 18 Oktober 2006 19:21 schrieb Takashi Iwai:
> > > > > 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.
>
> 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.
--
(°= =°)
//\ Prakash Punnoor /\\
V_/ \_V


Attachments:
(No filename) (1.39 kB)
(No filename) (189.00 B)
Download all attachments