[PLUG] harddisk dma modes, information using hdparm command

irfan attar irfan_attar at yahoo.com
Thu Aug 14 22:44:00 IST 2008

--- On Thu, 14/8/08, Kapil Pendse <kapil.pendse at gmail.com> wrote:
From: Kapil Pendse <kapil.pendse at gmail.com>
Subject: [PLUG]  harddisk dma modes, information using hdparm command
To: "Pune GNU/Linux Users Group Mailing List" <plug-mail at plug.org.in>
Date: Thursday, 14 August, 2008, 6:57 PM


I have a 2.5" toshiba harddisk connected to an ARM board (Samsung S3C2440
processor). It's running Linux 2.6.12. I need to find out whether the
harddisk is operating in PIO mode or in DMA mode. Can I get this information
using the "hdparm" command? Here's what I've found so far,
need somebody to
tell me whether I'm right or not:

Bootup messages:
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
SET CF & IDE WAIT!now BWSCON=225ed510
now begin cf_ide_init_default_hwifs()
Probing IDE interface ide0...
ide0: Wait for ready failed before probe !
Probing IDE interface ide0...
hda: TOSHIBA MK4025GAS, ATA DISK drive
ide0 at 0xc49c0020-0xc49c0027,0xc49c001c on irq 17

This seems to indicate that the harddisk is configured in PIO mode by

Then after bootup, "hdparm -I /dev/ide/host0/bus0/target0/lun0/part1"
ATA device, with non-removable media
Model Number: TOSHIBA MK4025GAS
Serial Number: 264E1388S
Firmware Revision: KA101A
Supported: 6 5 4 3
Likely used: 6


LBA, IORDY(can be disabled)
bytes avail on r/w long: 48 Queue depth: 1
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = ?
AdvancedPM level: unknown setting (0x0080)
DMA: sdma0 sdma1 sdma2 mdma0 mdma1 *mdma2 udma0 udma1 udma2 udma3 udma4
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns

The "*mdma2" seems to indicate that it's working in multiword DMA
mode 2.

So which mode is it operating in: PIO or DMA?
If it is in PIO mode, how do I set it to DMA mode by default (on bootup)?
Any init command/script that needs to be modified?

Thanks and best regards,
Kapil Pendse
Pune GNU/Linux Users Group Mailing List:      (plug-mail at plug.org.in)
List Information:  http://plug.org.in/cgi-bin/mailman/listinfo/plug-mail
Send 'help' to plug-mail-request at plug.org.in for mailing instructions.

i am using disk sda in example.
hdparm /dev/sda

will list present settings.

 hdparm -d1 /dev/sda 

will set disk to dma mode

htparm -tT /dev/sda 

will let you test the disk performance . if you want to save settings 

hdparm -d1 -k1 /dev/sda

i hope this will do.


      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

More information about the Plug-mail mailing list