Skip to contentSkip to conversation

IDE: PDC20275 turning on/off DMA dangerous?

DISCUSSION Clemens Koller 2 participants 4 messages Dec 16, 2005 – Dec 19, 2005

lore
Share & tools
lore
#0 lore raw

Hello!

I am working on an embedded ppc (mpc8540) using a pretty common Promise IDE PCI controller w/ a PDC20275 on it (it's called Ultra TX2).
I have an otherwise good Maxtor 6B120P0 (160GB) connected to it.

But sometimes (expecially with more than zero disk-i/o-load), when I turn on DMA by

$hdparm -X69 -d1 /dev/hda
I get

hda: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: CHECK for good STATUS

And when I turn off DMA with $hdparm -d0 /dev/hda
I get sometimes a

hda: DMA disabled

which is fine but sometimes I also get:

hda: status error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: drive not ready for command
hda: CHECK for good STATUS

which is not so nice.
Can you tell me if this is dangerous?

$ uname -a Linux ecam.anagramm.de 2.6.13-rc7 #5 Thu Aug 25 15:33:38 CEST 2005 ppc ppc ppc GNU/Linux

I am about to update to the latest 2.6.15-rc5.

Thanks,

Signature · 11 lines
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19
#1 lore raw
Quoted 1 line · Clemens Koller

Hello!

Hi,

Quoted 22 lines

I am working on an embedded ppc (mpc8540) using a pretty common Promise IDE PCI controller w/ a PDC20275 on it (it's called Ultra TX2).
I have an otherwise good Maxtor 6B120P0 (160GB) connected to it.

But sometimes (expecially with more than zero disk-i/o-load), when I turn on DMA by

$hdparm -X69 -d1 /dev/hda
I get

hda: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: CHECK for good STATUS

And when I turn off DMA with
$hdparm -d0 /dev/hda
I get sometimes a

hda: DMA disabled

which is fine but sometimes I also get:

Quoted 7 lines

hda: status error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: drive not ready for command
hda: CHECK for good STATUS

which is not so nice.
Can you tell me if this is dangerous?

Is there any particular reason why you are using hdparm with '-d' and '-X'?

Your IDE host driver (pdc202xx_new in this case) should configure best xfer mode and enable DMA so you shouldn't need to use hdparm.

Given that IDE driver code for changing xfer mode and DMA setting is racy and actually quite hard to fix, it will probably be removed in the future (after auditing IDE host drivers).

BTW please use [email protected] for IDE problems

Thanks,
Bartlomiej

#2 lore raw

Hello, Bartolmiej!

Quoted 27 lines
Quoted 27 lines

I am working on an embedded ppc (mpc8540) using a pretty common Promise IDE PCI controller w/ a PDC20275 on it (it's called Ultra TX2).
I have an otherwise good Maxtor 6B120P0 (160GB) connected to it.

But sometimes (expecially with more than zero disk-i/o-load), when I turn on DMA by

$hdparm -X69 -d1 /dev/hda
I get

hda: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: CHECK for good STATUS

And when I turn off DMA with
$hdparm -d0 /dev/hda
I get sometimes a

hda: DMA disabled

which is fine but sometimes I also get:

hda: status error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: drive not ready for command
hda: CHECK for good STATUS

Quoted 5 lines
Quoted 2 lines

which is not so nice.
Can you tell me if this is dangerous?

Is there any particular reason why you are using hdparm with '-d' and '-X'?

I want to test it with DMA before fixing it into the kernel.

Quoted 2 lines

Your IDE host driver (pdc202xx_new in this case) should configure best xfer mode and enable DMA so you shouldn't need to use hdparm.

I didn't enable automatic turning on of DMA it in the kernel by default in the past because I had problems with this hdd controller and interrupts (some PCI IRQ mapping issues). The interrupt issues are solved now, so I've tried to enable DMA. DMA works pretty fine, I was just worried about the severity of the message. It doesn't really tell anything useful for non-ide-hackers. (whether it's dangerous or not.)

Quoted 3 lines

Given that IDE driver code for changing xfer mode and DMA setting is racy and actually quite hard to fix, it will probably be removed in the future (after auditing IDE host drivers).

So, I guess the answer is: DMA itself seems to work and it isn't really dangerous - it's working as it's supposed to. But if you do it the way you do, you can run into problems due to races. Right? So, if I enable DMA as usual in the kernel, I don't usually risk my data?!

Quoted 1 line

BTW please use [email protected] for IDE problems

Okay, in next thread.

Thanks,

Signature · 11 lines
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19
#3 lore raw
Quoted 48 lines · Clemens Koller

Hello, Bartolmiej!

Quoted 27 lines
Quoted 27 lines

I am working on an embedded ppc (mpc8540) using a pretty common Promise IDE PCI controller w/ a PDC20275 on it (it's called Ultra TX2).
I have an otherwise good Maxtor 6B120P0 (160GB) connected to it.

But sometimes (expecially with more than zero disk-i/o-load), when I turn on DMA by

$hdparm -X69 -d1 /dev/hda
I get

hda: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: CHECK for good STATUS

And when I turn off DMA with
$hdparm -d0 /dev/hda
I get sometimes a

hda: DMA disabled

which is fine but sometimes I also get:

hda: status error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: drive not ready for command
hda: CHECK for good STATUS

Quoted 5 lines
Quoted 2 lines

which is not so nice.
Can you tell me if this is dangerous?

Is there any particular reason why you are using hdparm with '-d' and '-X'?

I want to test it with DMA before fixing it into the kernel.

Quoted 2 lines

Your IDE host driver (pdc202xx_new in this case) should configure best xfer mode and enable DMA so you shouldn't need to use hdparm.

I didn't enable automatic turning on of DMA it in the kernel by default in the past because I had problems with this hdd controller and interrupts (some PCI IRQ mapping issues). The interrupt issues are solved now, so I've tried to enable DMA. DMA works pretty fine, I was just worried about the severity of the message. It doesn't really tell anything useful for non-ide-hackers. (whether it's dangerous or not.)

Quoted 6 lines
Quoted 3 lines

Given that IDE driver code for changing xfer mode and DMA setting is racy and actually quite hard to fix, it will probably be removed in the future (after auditing IDE host drivers).

So, I guess the answer is: DMA itself seems to work and it isn't really dangerous - it's working as it's supposed to.

Yes.

Quoted 3 lines

But if you do it the way you do, you can run into problems due to races. Right? So, if I enable DMA as usual in the kernel, I don't usually risk my data?!

Yes, just use default settings.

Thanks,
Bartlomiej