OpenWrt Forum Archive

Topic: How to disable UDMA access to HDD?

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

How can I disable the UDMA access to HDD in kamikaze? I use WRAP-2C (x86) with (5GB Sygate Microdrive) and it doesn't support udma and the root time is horrible long..

SC1200: IDE controller at PCI slot 0000:00:12.2
SC1200: chipset revision 1
SC1200: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:pio, hdd:pio
hda: ST650211CF, CFA DISK drive
Clocksource tsc unstable (delta = -490051000 ns)
Time: pit clocksource has been installed.
hda: sc1200_set_xfer_mode(UDMA 2)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: IRQ probe failed (0xbefa)
hdc: IRQ probe failed (0xbefa)
hdc: no response (status = 0x0a), resetting drive
hdc: IRQ probe failed (0xbefa)
hdc: no response (status = 0x0a)
hdd: IRQ probe failed (0xbefa)
hdd: IRQ probe failed (0xbefa)
hdd: no response (status = 0x0a), resetting drive
hdd: IRQ probe failed (0xbefa)
hdd: no response (status = 0x0a)
hdc: IRQ probe failed (0xbefa)
hdc: IRQ probe failed (0xbefa)
hdc: no response (status = 0x0a), resetting drive
hdc: IRQ probe failed (0xbefa)
hdc: no response (status = 0x0a)
hdd: IRQ probe failed (0xbefa)
hdd: IRQ probe failed (0xbefa)
hdd: no response (status = 0x0a), resetting drive
hdd: IRQ probe failed (0xbefa)
hdd: no response (status = 0x0a)
hda: max request size: 128KiB
hda: 9767520 sectors (5000 MB) w/128KiB Cache, CHS=9690/16/63, UDMA(33)
hda: cache flushes supported
 hda:<4>hda: dma_timer_expiry: dma status == 0x21
hda: DMA timeout error
 ide_dma_end dma_stat=21 err=1 newerr=0
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: DMA disabled
ide0: reset: success
 hda1 hda2
block2mtd: version $Revision: 1.30 $
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
enabling scx200 high-res timer (1 MHz +0 ppm)
nf_conntrack version 0.5.0 (512 buckets, 4096 max)
Time: scx200_hrt clocksource has been installed.
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
Using IPI Shortcut mode
hda: dma_timer_expiry: dma status == 0x21
hda: DMA timeout error
 ide_dma_end dma_stat=21 err=1 newerr=0
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: DMA disabled
ide0: reset: success
hda: dma_timer_expiry: dma status == 0x21
hda: DMA timeout error
 ide_dma_end dma_stat=21 err=1 newerr=0
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: DMA disabled
ide0: reset: success
ide0: reset: success
 hda1 hda2
block2mtd: version $Revision: 1.30 $
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
enabling scx200 high-res timer (1 MHz +0 ppm)
nf_conntrack version 0.5.0 (512 buckets, 4096 max)
Time: scx200_hrt clocksource has been installed.
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
Using IPI Shortcut mode
hda: dma_timer_expiry: dma status == 0x21
hda: DMA timeout error
 ide_dma_end dma_stat=21 err=1 newerr=0
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: DMA disabled
ide0: reset: success
hda: dma_timer_expiry: dma status == 0x21
hda: DMA timeout error
 ide_dma_end dma_stat=21 err=1 newerr=0
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: DMA disabled
ide0: reset: success
hda: dma_timer_expiry: dma status == 0x21
hda: DMA timeout error
 ide_dma_end dma_stat=21 err=1 newerr=0
hda: dma timeout error: status=0x58 { DriveReady SeekComplete DataRequest }
ide: failed opcode was: unknown
hda: DMA disabled
ide0: reset: success
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 128k freed
Warning: unable to open an initial console.
- preinit -
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
- init -
init started:  BusyBox v1.4.2 (2007-06-08 13:38:32 EDT) multi-call binary

hdparm -X

Should I execute it every reboot or it will disable UDMA for good?  executing every reboot will not change anything because the problem is this long waiting until openwrt disable dma by itself...

ofcourse the hdparm -X ia a crap - it disables udma mode AFTER the system boot process so you can execute it by the hand or by init script...
Any other suggestions? nbd, mbm are you there?

Marek wrote:

ofcourse the hdparm -X ia a crap - it disables udma mode AFTER the system boot process so you can execute it by the hand or by init script...

[s]If you read the man page for hdparm(8) which is available on any non-embedded linux distribution, you would realize that the -X flag (with the appropriate argument) is to be used to disable DMA on the drive itself.  This should persist reboots since it has been programmed into the drive; if it does not work then the drive itself isn't working properly.[/s]

Edit: hmm, this info was incorrect, don't know why I thought the changes would persist reboots...

(Last edited by Bartman007 on 30 Aug 2007, 18:11)

I tried this, unfortuletally without success...
I almost sure that disabling UDMA is possible somewhere in init scripts or maybe in kernel_menuconfig before compiling. Developers, could you help me?

Marek wrote:

I tried this, unfortuletally without success...
I almost sure that disabling UDMA is possible somewhere in init scripts or maybe in kernel_menuconfig before compiling. Developers, could you help me?

It is not possible to disable it in the kernel. That would be silly.

You *can* disable it on the kernel command line though. Add "ide=nodma" to your boot loader's configure file for the kernel you are booting.

This will only work if your ide driver is built-in (i.e. not a module). If it is a module you will need to pass it as a module option. This should work for both 2.4. and 2.6... but maybe not 2.6 since we've switched to the new SATA driver in 2.6.19. (or was it .18)

The discussion might have continued from here.