Skip to contentSkip to conversation

How's the nforce4 support in Linux?

DISCUSSION Julien Wajsberg 8 participants 24 messages Mar 25, 2005 – Apr 10, 2005 Network drivers

lore
Share & tools
lore
#0 lore raw

Hi

Just to answer some questions :

- USB works ok since 2.6.11
- audio works too. The only problem is that two applications can't open /dev/dsp in the same time.
- network works

I own an Asus A8N-Sli motherboard with the Nforce4-Sli chipset, and I experiment the following problem :

Mar 25 22:42:55 evenflow kernel: hda: dma_timer_expiry: dma status == 0x60
Mar 25 22:42:55 evenflow kernel: hda: DMA timeout retry
Mar 25 22:42:55 evenflow kernel: hda: timeout waiting for DMA
Mar 25 22:42:55 evenflow kernel: hda: status error: status=0x58 {
DriveReady SeekComplete DataRequest }
Mar 25 22:42:55 evenflow kernel: 
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Mar 25 22:42:55 evenflow kernel: hda: status timeout: status=0xd0 { Busy }
Mar 25 22:42:55 evenflow kernel: 
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hdb: DMA disabled
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command

Of course, if I disable DMA with hdparm, this problem disappear.. but it isn't a long-term solution ;-)

Using vanilla 2.6.11.5 kernel. I attached the config file.

I also experiment sometimes a complete hang of the system. But I didn't find how to reproduce the bug yet, especially because it seems to happen when I do nothing (when I'm sleeping or am at work ;), and I can't get a Oops because I don't have any serial console...

Kind regards,

Signature · 1 line
Julien Wajsberg
#1 lore raw
Quoted 2 lines · Julien Wajsberg

- audio works too. The only problem is that two applications can't open /dev/dsp in the same time.

Not a problem. ALSA does software mixing for chipsets that can't do it in hardware. Google for dmix.

However this doesn't (and can't be made to) work with the in-kernel OSS emulation (it works fine with the alsa-lib/libaoss emulation). So you are technically correct in that two OSS apps can't open /dev/dsp at the same time, but there is no problem with multiple apps sharing the sound device, as long as they use the ALSA API (which they should be using anyway).

Lee

#2 lore raw
Quoted 7 lines · Lee Revell
Quoted 2 lines · Julien Wajsberg

- audio works too. The only problem is that two applications can't open /dev/dsp in the same time.

Not a problem. ALSA does software mixing for chipsets that can't do it in hardware. Google for dmix.

Quoted 6 lines

However this doesn't (and can't be made to) work with the in-kernel OSS emulation (it works fine with the alsa-lib/libaoss emulation). So you are technically correct in that two OSS apps can't open /dev/dsp at the same time, but there is no problem with multiple apps sharing the sound device, as long as they use the ALSA API (which they should be using anyway).

Okay, good to know. Then I'll have to find out why beep-media-player doesn't work with alsa :-)

Signature · 1 line
Julien
#3 lore raw
Quoted 15 lines · Julien Wajsberg
Quoted 7 lines · Lee Revell
Quoted 2 lines · Julien Wajsberg

- audio works too. The only problem is that two applications can't open /dev/dsp in the same time.

Not a problem. ALSA does software mixing for chipsets that can't do it in hardware. Google for dmix.

Quoted 6 lines

However this doesn't (and can't be made to) work with the in-kernel OSS emulation (it works fine with the alsa-lib/libaoss emulation). So you are technically correct in that two OSS apps can't open /dev/dsp at the same time, but there is no problem with multiple apps sharing the sound device, as long as they use the ALSA API (which they should be using anyway).

Quoted 3 lines

Okay, good to know. Then I'll have to find out why beep-media-player doesn't work with alsa :-)

Without knowing anything about it, I'm willing to guess "programmer laziness/lack of time" (depending on your perspective). As long as ALSA continues to provide OSS emulation, lazy developers will not update their apps to the (superior) ALSA API.

I just upgraded all my home machines to a Gnome 2.10 based distro and way shocked to find that it still uses esd via OSS emulation for system sounds. So the endless user complaints about "wtf, esd is blocking my sound device, on windows my apps can share it" will not be going away in the forseeable future.

Ugh. dmix has only been available for, oh, 18 months, and the apps still have not caught up.

Lee

#4 lore raw
In reply to Lee Revell
Quoted 9 lines · Lee Revell
Quoted 2 lines · Julien Wajsberg

- audio works too. The only problem is that two applications can't open /dev/dsp in the same time.

Not a problem. ALSA does software mixing for chipsets that can't do it in hardware. Google for dmix.

However this doesn't (and can't be made to) work with the in-kernel OSS emulation (it works fine with the alsa-lib/libaoss emulation). So you

quake3 still segfaults when run through "aoss". And can't be fixed, as
it's closed source still.

Signature · 2 lines
Tomasz Torcz               "Never underestimate the bandwidth of a station
[email protected]    wagon filled with backup tapes." -- Jim Gray
#5 lore raw
Quoted 5 lines · Tomasz Torcz
Quoted 4 lines · Lee Revell
Quoted 2 lines · Julien Wajsberg

- audio works too. The only problem is that two applications can't open /dev/dsp in the same time.

Quoted 9 lines
Quoted 5 lines

Not a problem. ALSA does software mixing for chipsets that can't do it in hardware. Google for dmix.

However this doesn't (and can't be made to) work with the in-kernel OSS emulation (it works fine with the alsa-lib/libaoss emulation). So you

quake3 still segfaults when run through "aoss". And can't be fixed, as
it's closed source still.

I guess that's Quake3's problem...

Lee

#6 lore raw
Quoted 9 lines · Lee Revell
Quoted 8 lines · Tomasz Torcz
Quoted 7 lines · Lee Revell
Quoted 2 lines · Julien Wajsberg

- audio works too. The only problem is that two applications can't open /dev/dsp in the same time.

Not a problem. ALSA does software mixing for chipsets that can't do it in hardware. Google for dmix.

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines

However this doesn't (and can't be made to) work with the in-kernel OSS emulation (it works fine with the alsa-lib/libaoss emulation). So you

quake3 still segfaults when run through "aoss". And can't be fixed, as
it's closed source still.

I guess that's Quake3's problem...

It an glaring example, dmix is unsufficient in one third of my sound
uses (other two beeing movie and music playback)
But you advertise dmix like it was silver bullet.

Signature · 2 lines
Tomasz Torcz               "Never underestimate the bandwidth of a station
[email protected]    wagon filled with backup tapes." -- Jim Gray
#7 lore raw
Quoted 3 lines · Tomasz Torcz

It an glaring example, dmix is unsufficient in one third of my sound
uses (other two beeing movie and music playback)
But you advertise dmix like it was silver bullet.

An emu10k1 is a silver bullet. :)

Len Sorensen

#8 lore raw
In reply to Tomasz Torcz
Quoted 13 lines · Tomasz Torcz
Quoted 12 lines · Lee Revell
Quoted 11 lines · Tomasz Torcz
Quoted 9 lines · Lee Revell
Quoted 2 lines · Julien Wajsberg

- audio works too. The only problem is that two applications can't open /dev/dsp in the same time.

Not a problem. ALSA does software mixing for chipsets that can't do it in hardware. Google for dmix.

However this doesn't (and can't be made to) work with the in-kernel OSS emulation (it works fine with the alsa-lib/libaoss emulation). So you

Quoted 9 lines
Quoted 4 lines
Quoted 3 lines

quake3 still segfaults when run through "aoss". And can't be fixed, as
it's closed source still.

I guess that's Quake3's problem...

It an glaring example, dmix is unsufficient in one third of my sound
uses (other two beeing movie and music playback)
But you advertise dmix like it was silver bullet.

Or goes limbo randomly and no mailing to lists seems to result in a reply (from the alsa peeps at least) ...

Signature · 1 line
Martin Schlemmer
#9 lore raw
Quoted 6 lines · Martin Schlemmer
Quoted 5 lines · Tomasz Torcz
Quoted 4 lines
Quoted 3 lines

quake3 still segfaults when run through "aoss". And can't be fixed, as
it's closed source still.

I guess that's Quake3's problem...

Quoted 8 lines
Quoted 4 lines

It an glaring example, dmix is unsufficient in one third of my sound
uses (other two beeing movie and music playback)
But you advertise dmix like it was silver bullet.

Or goes limbo randomly and no mailing to lists seems to result in a reply (from the alsa peeps at least) ...

Because no one has ever produced a simple test program with source code that demonstrates the problem. You really expect the ALSA developers to go chasing bugs in closed source apps?

Anyway, do you really need to hear your system sounds and MP3s while playing Q3? This is hardly a fatal problem.

Lee

#10 lore raw
Quoted 16 lines · Lee Revell
Quoted 6 lines · Martin Schlemmer
Quoted 5 lines · Tomasz Torcz
Quoted 4 lines
Quoted 3 lines

quake3 still segfaults when run through "aoss". And can't be fixed, as
it's closed source still.

I guess that's Quake3's problem...

Quoted 8 lines
Quoted 4 lines

It an glaring example, dmix is unsufficient in one third of my sound
uses (other two beeing movie and music playback)
But you advertise dmix like it was silver bullet.

Or goes limbo randomly and no mailing to lists seems to result in a reply (from the alsa peeps at least) ...

Quoted 7 lines

Because no one has ever produced a simple test program with source code that demonstrates the problem. You really expect the ALSA developers to go chasing bugs in closed source apps?

Anyway, do you really need to hear your system sounds and MP3s while playing Q3? This is hardly a fatal problem.

It never involved Q3 - what makes you assume this? I just chipped in due to your dmix advertising.

Signature · 1 line
Martin Schlemmer
#11 lore raw
In reply to Julien Wajsberg
Quoted 4 lines · Julien Wajsberg

I also experiment sometimes a complete hang of the system. But I didn't find how to reproduce the bug yet, especially because it seems to happen when I do nothing (when I'm sleeping or am at work ;), and I can't get a Oops because I don't have any serial console...

You could try netconsole...

Lee

#12 lore raw
Quoted 7 lines · Lee Revell
Quoted 4 lines · Julien Wajsberg

I also experiment sometimes a complete hang of the system. But I didn't find how to reproduce the bug yet, especially because it seems to happen when I do nothing (when I'm sleeping or am at work ;), and I can't get a Oops because I don't have any serial console...

You could try netconsole...

Good point... I just tried, but forcedeth doesn't support netpoll. If you have a pointer, I could try to implement it ;-)

Signature · 1 line
Julien
#13 lore raw
Quoted 2 lines · Julien Wajsberg

Good point... I just tried, but forcedeth doesn't support netpoll. If you have a pointer, I could try to implement it ;-)

Can you try the attached patch for forcedeth?
It compiles for me, but I don't have nForce hardware to test it.

Michal

drivers/net/forcedeth.c renamed from drivers/net/forcedeth.c.orig +10 -0
@@ -1480,6 +1480,13 @@ static void nv_do_nic_poll(unsigned long
 	enable_irq(dev->irq);
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void nv_poll_controller(struct net_device *dev)
+{
+	nv_do_nic_poll((long) dev);
+}
+#endif
+
 static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
 	struct fe_priv *np = get_nvpriv(dev);
@@ -1962,6 +1969,9 @@ static int __devinit nv_probe(struct pci
 	dev->get_stats = nv_get_stats;
 	dev->change_mtu = nv_change_mtu;
 	dev->set_multicast_list = nv_set_multicast;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = nv_poll_controller;
+#endif
 	SET_ETHTOOL_OPS(dev, &ops);
 	dev->tx_timeout = nv_tx_timeout;
 	dev->watchdog_timeo = NV_WATCHDOG_TIMEO;
#14 lore raw
Quoted 6 lines · Michal Schmidt
Quoted 2 lines · Julien Wajsberg

Good point... I just tried, but forcedeth doesn't support netpoll. If you have a pointer, I could try to implement it ;-)

Can you try the attached patch for forcedeth?
It compiles for me, but I don't have nForce hardware to test it.

Okay, it works :)
maybe I'll have something for you to debug at the next crash...

Signature · 1 line
Julien
Quoted 29 lines
drivers/net/forcedeth.c 2005-03-26 15:08:56.000000000 +0100 renamed from drivers/net/forcedeth.c.orig 2005-03-26 15:00:12.000000000 +0100 +10 -0
@@ -1480,6 +1480,13 @@ static void nv_do_nic_poll(unsigned long
        enable_irq(dev->irq);
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void nv_poll_controller(struct net_device *dev)
+{
+       nv_do_nic_poll((long) dev);
+}
+#endif
+
 static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
        struct fe_priv *np = get_nvpriv(dev);
@@ -1962,6 +1969,9 @@ static int __devinit nv_probe(struct pci
        dev->get_stats = nv_get_stats;
        dev->change_mtu = nv_change_mtu;
        dev->set_multicast_list = nv_set_multicast;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       dev->poll_controller = nv_poll_controller;
+#endif
        SET_ETHTOOL_OPS(dev, &ops);
        dev->tx_timeout = nv_tx_timeout;
        dev->watchdog_timeo = NV_WATCHDOG_TIMEO;
#15 lore raw
In reply to Julien Wajsberg
Quoted 5 lines · Julien Wajsberg
Mar 25 22:42:55 evenflow kernel: hda: dma_timer_expiry: dma status == 0x60
Mar 25 22:42:55 evenflow kernel: hda: DMA timeout retry
Mar 25 22:42:55 evenflow kernel: hda: timeout waiting for DMA
Mar 25 22:42:55 evenflow kernel: hda: status error: status=0x58 {

DriveReady SeekComplete DataRequest }

Quoted 8 lines
Mar 25 22:42:55 evenflow kernel: 
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Mar 25 22:42:55 evenflow kernel: hda: status timeout: status=0xd0 { Busy }
Mar 25 22:42:55 evenflow kernel: 
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hdb: DMA disabled
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command

Are you sure the drive is OK? Those messages are the classic signs of a failing drive...

Lee

#16 lore raw
Quoted 15 lines · Lee Revell
Quoted 5 lines · Julien Wajsberg
Mar 25 22:42:55 evenflow kernel: hda: dma_timer_expiry: dma status == 0x60
Mar 25 22:42:55 evenflow kernel: hda: DMA timeout retry
Mar 25 22:42:55 evenflow kernel: hda: timeout waiting for DMA
Mar 25 22:42:55 evenflow kernel: hda: status error: status=0x58 {

DriveReady SeekComplete DataRequest }

Quoted 8 lines
Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Mar 25 22:42:55 evenflow kernel: hda: status timeout: status=0xd0 { Busy }
Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hdb: DMA disabled
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Quoted 2 lines

Are you sure the drive is OK? Those messages are the classic signs of a failing drive...

It's nearly new, and it was ok in my last computer (an old P3-500 with PIIX4, IIRC).
BTW I did a complete badblocks check on it, and it found nothing.

Signature · 1 line
Julien
#17 lore raw
In reply to Julien Wajsberg
Quoted 17 lines · Julien Wajsberg

I own an Asus A8N-Sli motherboard with the Nforce4-Sli chipset, and I experiment the following problem :

Mar 25 22:42:55 evenflow kernel: hda: dma_timer_expiry: dma status == 0x60
Mar 25 22:42:55 evenflow kernel: hda: DMA timeout retry
Mar 25 22:42:55 evenflow kernel: hda: timeout waiting for DMA
Mar 25 22:42:55 evenflow kernel: hda: status error: status=0x58 {
DriveReady SeekComplete DataRequest }
Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Mar 25 22:42:55 evenflow kernel: hda: status timeout: status=0xd0 { Busy }
Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hdb: DMA disabled
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Quoted 4 lines

Of course, if I disable DMA with hdparm, this problem disappear.. but it isn't a long-term solution ;-)

Using vanilla 2.6.11.5 kernel. I attached the config file.

I tried the multidma mode (as opposed to ultradma), and the system hanged immediately. (Thanks to the patched-for-netpoll forcedeth driver), I got the following message:

Unknown interrupt or fault at EIP 00000206 00000060 c0247a3a

There's definitely something wrong here... I'm still using the same setup as in my first mail.

Signature · 1 line
Julien
#18 lore raw
Quoted 4 lines · Julien Wajsberg
Quoted 3 lines · Julien Wajsberg

I own an Asus A8N-Sli motherboard with the Nforce4-Sli chipset, and I experiment the following problem :

Quoted 12 lines
Quoted 4 lines
Mar 25 22:42:55 evenflow kernel: hda: dma_timer_expiry: dma status == 0x60
Mar 25 22:42:55 evenflow kernel: hda: DMA timeout retry
Mar 25 22:42:55 evenflow kernel: hda: timeout waiting for DMA
Mar 25 22:42:55 evenflow kernel: hda: status error: status=0x58 {
Quoted 8 lines

DriveReady SeekComplete DataRequest }

Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Mar 25 22:42:55 evenflow kernel: hda: status timeout: status=0xd0 { Busy }
Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hdb: DMA disabled
                                     ^^^^^^^^^^^^^^^^^
Quoted 5 lines
Quoted 5 lines
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command

Of course, if I disable DMA with hdparm, this problem disappear.. but it isn't a long-term solution ;-)

The long-term solution is to replace either the drive, cable, or the motherboard that can't do DMA. A bad DMA operation can write data anywhere (right into the middle of the kernel). There isn't anything software can do about it. Software sets up the controller for a DMA operation, then waits for an interrupt that tells it has completed or failed. Software can retry failed operations until software gets destroyed by the hardware, but there isn't anything else that can be done.

The fact that disabling DMA makes the problem(s) go away is proof that it isn't a software problem. There are flash-RAM devices that emulate IDE drives. Most of these can't do DMA and the IDE driver doesn't accept that fact. That is a known bug. One needs to use hdparm to tell it to stop trying to use DMA. In your case, the driver stopped using DMA when it found out that it didn't work. There is no bug.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.

#19 lore raw
Quoted 19 lines · Richard B. Johnson
Quoted 4 lines · Julien Wajsberg
Quoted 3 lines · Julien Wajsberg

I own an Asus A8N-Sli motherboard with the Nforce4-Sli chipset, and I experiment the following problem :

Quoted 12 lines
Quoted 4 lines
Mar 25 22:42:55 evenflow kernel: hda: dma_timer_expiry: dma status == 0x60
Mar 25 22:42:55 evenflow kernel: hda: DMA timeout retry
Mar 25 22:42:55 evenflow kernel: hda: timeout waiting for DMA
Mar 25 22:42:55 evenflow kernel: hda: status error: status=0x58 {
Quoted 8 lines

DriveReady SeekComplete DataRequest }

Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Mar 25 22:42:55 evenflow kernel: hda: status timeout: status=0xd0 { Busy }
Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hdb: DMA disabled
                                      ^^^^^^^^^^^^^^^^^
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command

Of course, if I disable DMA with hdparm, this problem disappear.. but it isn't a long-term solution ;-)

The long-term solution is to replace either the drive, cable, or the motherboard that can't do DMA.

It's a recent drive that did ultra DMA on another motherboard, and a recent motherboard with a cable that did ultra DMA before.It was ultra DMA2 on this old motherboard, but it still was ultra DMA.

Quoted 8 lines

A bad DMA operation can write data
anywhere (right into the middle of the kernel). There isn't anything software can do about it. Software sets up the controller for a DMA operation, then waits for an interrupt that tells it has completed or failed. Software can retry failed operations until software gets destroyed by the hardware, but there isn't anything else that can be done.

Quoted 7 lines

The fact that disabling DMA makes the problem(s) go away is proof that it isn't a software problem. There are flash-RAM devices that emulate IDE drives. Most of these can't do DMA and the IDE driver doesn't accept that fact. That is a known bug. One needs to use hdparm to tell it to stop trying to use DMA. In your case, the driver stopped using DMA when it found out that it didn't work. There is no bug.

In my case, the driver stopped for hdb, that is my dvd-burner/player. It did nothing for hda or hdc, I had to disable DMA myself.

Will I have to install Windows XP to prove ultra DMA works correctly on this setup ? I really don't hope...

Signature · 1 line
Julien
#20 lore raw
Quoted 48 lines · Julien Wajsberg
Quoted 19 lines · Richard B. Johnson
Quoted 4 lines · Julien Wajsberg
Quoted 3 lines · Julien Wajsberg

I own an Asus A8N-Sli motherboard with the Nforce4-Sli chipset, and I experiment the following problem :

Quoted 12 lines
Quoted 4 lines
Mar 25 22:42:55 evenflow kernel: hda: dma_timer_expiry: dma status == 0x60
Mar 25 22:42:55 evenflow kernel: hda: DMA timeout retry
Mar 25 22:42:55 evenflow kernel: hda: timeout waiting for DMA
Mar 25 22:42:55 evenflow kernel: hda: status error: status=0x58 {
Quoted 8 lines

DriveReady SeekComplete DataRequest }

Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Mar 25 22:42:55 evenflow kernel: hda: status timeout: status=0xd0 { Busy }
Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hdb: DMA disabled
                                      ^^^^^^^^^^^^^^^^^
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command

Of course, if I disable DMA with hdparm, this problem disappear.. but it isn't a long-term solution ;-)

The long-term solution is to replace either the drive, cable, or the motherboard that can't do DMA.

It's a recent drive that did ultra DMA on another motherboard, and a recent motherboard with a cable that did ultra DMA before.It was ultra DMA2 on this old motherboard, but it still was ultra DMA.

Quoted 8 lines

A bad DMA operation can write data
anywhere (right into the middle of the kernel). There isn't anything software can do about it. Software sets up the controller for a DMA operation, then waits for an interrupt that tells it has completed or failed. Software can retry failed operations until software gets destroyed by the hardware, but there isn't anything else that can be done.

Quoted 7 lines

The fact that disabling DMA makes the problem(s) go away is proof that it isn't a software problem. There are flash-RAM devices that emulate IDE drives. Most of these can't do DMA and the IDE driver doesn't accept that fact. That is a known bug. One needs to use hdparm to tell it to stop trying to use DMA. In your case, the driver stopped using DMA when it found out that it didn't work. There is no bug.

Quoted 5 lines

In my case, the driver stopped for hdb, that is my dvd-burner/player. It did nothing for hda or hdc, I had to disable DMA myself.

Will I have to install Windows XP to prove ultra DMA works correctly on this setup ? I really don't hope...

How would you know? Windows will just run it as PIOW and be done with it. Did you ever try to copy a large file in XP? Try it. Try the same thing in linux on the same hardware. You don't need a stop-watch. On Win-XP, a 10 megabyte file (hardly large) takes about 10 seconds. That's 1 megabyte/second. Linux tries to be a bit faster.

Quoted 4 lines
Signature · 2 lines
-- 
Julien

Cheers,
Dick Johnson
Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.

#21 lore raw
Quoted 42 lines · Richard B. Johnson
Quoted 40 lines · Julien Wajsberg
Quoted 19 lines · Richard B. Johnson
Quoted 4 lines · Julien Wajsberg
Quoted 3 lines · Julien Wajsberg

I own an Asus A8N-Sli motherboard with the Nforce4-Sli chipset, and I experiment the following problem :

Quoted 12 lines
Quoted 4 lines
Mar 25 22:42:55 evenflow kernel: hda: dma_timer_expiry: dma status == 0x60
Mar 25 22:42:55 evenflow kernel: hda: DMA timeout retry
Mar 25 22:42:55 evenflow kernel: hda: timeout waiting for DMA
Mar 25 22:42:55 evenflow kernel: hda: status error: status=0x58 {
Quoted 8 lines

DriveReady SeekComplete DataRequest }

Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command
Mar 25 22:42:55 evenflow kernel: hda: status timeout: status=0xd0 { Busy }
Mar 25 22:42:55 evenflow kernel:
Mar 25 22:42:55 evenflow kernel: ide: failed opcode was: unknown
Mar 25 22:42:55 evenflow kernel: hdb: DMA disabled
                                      ^^^^^^^^^^^^^^^^^
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Mar 25 22:42:55 evenflow kernel: hda: drive not ready for command

Of course, if I disable DMA with hdparm, this problem disappear.. but it isn't a long-term solution ;-)

The long-term solution is to replace either the drive, cable, or the motherboard that can't do DMA.

It's a recent drive that did ultra DMA on another motherboard, and a recent motherboard with a cable that did ultra DMA before.It was ultra DMA2 on this old motherboard, but it still was ultra DMA.

Quoted 8 lines

A bad DMA operation can write data
anywhere (right into the middle of the kernel). There isn't anything software can do about it. Software sets up the controller for a DMA operation, then waits for an interrupt that tells it has completed or failed. Software can retry failed operations until software gets destroyed by the hardware, but there isn't anything else that can be done.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

The fact that disabling DMA makes the problem(s) go away is proof that it isn't a software problem. There are flash-RAM devices that emulate IDE drives. Most of these can't do DMA and the IDE driver doesn't accept that fact. That is a known bug. One needs to use hdparm to tell it to stop trying to use DMA. In your case, the driver stopped using DMA when it found out that it didn't work. There is no bug.

There still can be a bug in setting up DMA timings etc.

It is hard to even guess as you haven't given any details about your
system: dmesg/hdparm/lspci/config... (or I overlooked it somehow).

Quoted 5 lines
Quoted 5 lines

In my case, the driver stopped for hdb, that is my dvd-burner/player. It did nothing for hda or hdc, I had to disable DMA myself.

Will I have to install Windows XP to prove ultra DMA works correctly on this setup ? I really don't hope...

That would be very helpful.

Another useful thing would be to try non-nVidia motherboard (if you have one handy) without changing anything else.

Bartlomiej

#22 lore raw
Quoted 5 lines · Bartlomiej Zolnierkiewicz

There still can be a bug in setting up DMA timings etc.

It is hard to even guess as you haven't given any details about your
system: dmesg/hdparm/lspci/config... (or I overlooked it somehow).

I sent the related dmesg lines, and my .config.
for dmesg and .config :
http://marc.theaimsgroup.com/?l=linux-kernel&m=111179215521092&w=2

what part of lspci would you need ?

hdparm :

flash@evenflow:~$ sudo hdparm -i /dev/hda

/dev/hda:

Model=Maxtor 6Y160P0, FwRev=YAR41BW0, SerialNo=Y47J8CRE Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57 BuffType=DualPortCache, BuffSize=7936kB, MaxMultSect=16, MultSect=off CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2
AdvancedPM=yes: disabled (255) WriteCache=enabled
Drive conforms to: (null):

* signifies the current active mode

(it shows no mode... it's strange, because this drive should be nearly the same as the following)

flash@evenflow:~$ sudo hdparm -i /dev/hdc

/dev/hdc:

Model=Maxtor 6Y120L0, FwRev=YAR41BW0, SerialNo=Y31LWCXE Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=off CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=240121728 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 AdvancedPM=yes: disabled (255) WriteCache=enabled
Drive conforms to: (null):

* signifies the current active mode

flash@evenflow:~$ sudo hdparm -d /dev/hdc

/dev/hdc:
using_dma = 0 (off)

(Note : hdparm -i says 'udma6', and hdparm -d says 'no dma'... Strange, isn't it ?)

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

In my case, the driver stopped for hdb, that is my dvd-burner/player. It did nothing for hda or hdc, I had to disable DMA myself.

Will I have to install Windows XP to prove ultra DMA works correctly on this setup ? I really don't hope...

That would be very helpful.

I'll try that...

Quoted 2 lines

Another useful thing would be to try non-nVidia motherboard (if you have one handy) without changing anything else.

I succesfully used these drives with another motherboard (PIIX4) before, in udma2 mode, for years...

But first thing : I have to check if the cables are correctly plugged in (I mean in the correct order)... I didn't have the time to do that yet.

Thanks for your answer.

Signature · 1 line
Julien
#23 lore raw
In reply to Richard B. Johnson
Quoted 3 lines · Richard B. Johnson

How would you know? Windows will just run it as PIOW and be done with it.

Yes, but there's a way to know which mode you're using (maybe not precisely, but at least PIO vs DMA).

Quoted 5 lines

Did you ever try to copy a large file in XP? Try it. Try the same thing in linux on the same hardware. You don't need a stop-watch. On Win-XP, a 10 megabyte file (hardly large) takes about 10 seconds. That's 1 megabyte/second. Linux tries to be a bit faster.

Usually, I only have Linux on any hardware I have ;) And there is no point comparing these things here...

--
Julien

PS: Sorry Richard, I forgot my "reply to all" button...