* what is hdparm doing?
@ 2006-02-28 22:13 Sebastian Kuzminsky
2006-03-01 1:27 ` Mark Lord
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Kuzminsky @ 2006-02-28 22:13 UTC (permalink / raw)
To: linux-ide
Hi folks, hdparm's got me confused.
I've got an old PC with an ALi Corporation MS4803 (rev 01) IDE controller.
According to the manufacturer, this controller does NOT support DMA,
only PIO 0-4. I'm booting off various Sandisk Compact Flash cards,
which I believe all support both PIO and DMA.
I'm using hdparm 6.1, and I get practically identical results with 2.4.32
and 2.6.15.4.
"hdparm /dev/hda" says:
/dev/hda:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 1986/16/63, sectors = 2001888, start = 0
"hdparm -I /dev/hda" says:
CompactFlash ATA device, with removable media
Model Number: SanDisk SDCFH-1024
Serial Number: 003305F1104P3318
Firmware Revision: HDX 2.18
Standards:
Supported: 10
Likely used: 10
Configuration:
Logical max current
cylinders 1986 1986
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 2001888
LBA user addressable sectors: 2001888
device size with M = 1024*1024: 977 MBytes
device size with M = 1000*1000: 1024 MBytes (1 GB)
Capabilities:
LBA, IORDY(may be)(cannot be disabled)
Queue depth: 1
Standby timer values: spec'd by Vendor
R/W multiple sector transfer: Max = 1 Current = 1
DMA: mdma0 mdma1 *mdma2
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
The "hdparm" output shows using_dma is off. That's refering the the
HBA, right?
As I understand the "hdparm -I" output, however, it claims the drive
(not the HBA) is using mdma2. Is that right? How can the drive and
the HBA use different modes?
I thought the HBA and the drive(s) would automatically use the fastest
mode that both devices support, which in this case should be PIO4.
I tried to manually switch the HBA to pio4 with "hdparm -p4 /dev/hda"
but got this error:
/dev/hda:
attempting to set PIO mode to 4
HDIO_SET_PIO_MODE failed: Function not implemented
Manually switching the drive to pio4 with "hdparm -X pio4 /dev/hda"
seems to work:
/dev/hda:
setting xfermode to 12 (PIO flow control mode4)
But even after running this, "hdparm -I /dev/hda" shows it using mdma2
(with the * by it).
BTW, here's the relevant part of dmesg, from 2.4.32:
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
hda: SanDisk SDCFH-1024, CFA DISK drive
ide2: ports already in use, skipping probe
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: attached ide-disk driver.
hda: 2001888 sectors (1025 MB) w/1KiB Cache, CHS=1986/16/63
Partition check:
hda: hda1 hda2 hda3
Please clue in a poor monkey - what is going on here?
--
Sebastian Kuzminsky
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what is hdparm doing?
2006-02-28 22:13 what is hdparm doing? Sebastian Kuzminsky
@ 2006-03-01 1:27 ` Mark Lord
2006-03-01 3:22 ` Sebastian Kuzminsky
0 siblings, 1 reply; 4+ messages in thread
From: Mark Lord @ 2006-03-01 1:27 UTC (permalink / raw)
To: Sebastian Kuzminsky; +Cc: linux-ide
Sebastian Kuzminsky wrote:
> Hi folks, hdparm's got me confused.
..
> "hdparm /dev/hda" says:
.
> DMA: mdma0 mdma1 *mdma2
> Cycle time: min=120ns recommended=120ns
> PIO: pio0 pio1 pio2 pio3 pio4
> Cycle time: no flow control=120ns IORDY flow control=120ns
..
The *mdma2 means, that if you were to issue a READ_DMA (or WRITE_DMA)
command to the drive, the drive is expecting the host to use
the multiword-dma-2 protocol and timings for it.
Meanwhile, the host may, at its option, simply use PIO commands (READ, WRITE)
instead of DMA, any time it chooses.
Drives have both a DMA mode, and a PIO mode, each of which is selected
and used independently of the other.
Cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what is hdparm doing?
2006-03-01 1:27 ` Mark Lord
@ 2006-03-01 3:22 ` Sebastian Kuzminsky
2006-03-01 4:18 ` Mark Lord
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Kuzminsky @ 2006-03-01 3:22 UTC (permalink / raw)
To: linux-ide
Mark Lord <liml@rtr.ca> wrote:
> Sebastian Kuzminsky wrote:
> > Hi folks, hdparm's got me confused.
> ..
> > "hdparm /dev/hda" says:
> .
> > DMA: mdma0 mdma1 *mdma2
> > Cycle time: min=120ns recommended=120ns
> > PIO: pio0 pio1 pio2 pio3 pio4
> > Cycle time: no flow control=120ns IORDY flow control=120ns
> ..
>
> The *mdma2 means, that if you were to issue a READ_DMA (or WRITE_DMA)
> command to the drive, the drive is expecting the host to use
> the multiword-dma-2 protocol and timings for it.
>
> Meanwhile, the host may, at its option, simply use PIO commands (READ, WRITE)
> instead of DMA, any time it chooses.
>
> Drives have both a DMA mode, and a PIO mode, each of which is selected
> and used independently of the other.
Ok thanks!
So how do I know what PIO mode the drive wants to use?
And how do I tell the HBA what PIO mode to use?
--
Sebastian Kuzminsky
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what is hdparm doing?
2006-03-01 3:22 ` Sebastian Kuzminsky
@ 2006-03-01 4:18 ` Mark Lord
0 siblings, 0 replies; 4+ messages in thread
From: Mark Lord @ 2006-03-01 4:18 UTC (permalink / raw)
To: Sebastian Kuzminsky; +Cc: linux-ide
Sebastian Kuzminsky wrote:
>
> So how do I know what PIO mode the drive wants to use?
>
> And how do I tell the HBA what PIO mode to use?
>
You don't do either of those.
The device driver takes care of it, if needed.
In this case, they were both likely set up for PIO4.
Cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-03-01 4:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-28 22:13 what is hdparm doing? Sebastian Kuzminsky
2006-03-01 1:27 ` Mark Lord
2006-03-01 3:22 ` Sebastian Kuzminsky
2006-03-01 4:18 ` Mark Lord
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).