Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92230 - inconsistant output from hdparm
Summary: inconsistant output from hdparm
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-11 03:51 UTC by genbug
Modified: 2005-05-12 22:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description genbug 2005-05-11 03:51:03 UTC
hdparm and hdparm -i  give conflicting info about DMA status.
The following post shows two systems output that are inconsistant in opposite ways.

http://forums.gentoo.org/viewtopic-p-2398728.html#2398728



Reproducible: Always
Steps to Reproduce:
1.hdparm /dev/hda
2.hdparm -i /dev/hda
3.hdparm -I /dev/hda
compare DMA info.

Actual Results:  
 hdparm /dev/hda

/dev/hda:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 16383/255/63, sectors = 120034123776, start = 0


 hdparm -i /dev/hda

/dev/hda:

 Model=ST3120026A, FwRev=8.01, SerialNo=5JT4E937
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=65535/1/63, CurSects=4128705, LBA=yes, LBAsects=234441648
 IORDY=on/off, tPIO={min:240,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=no WriteCache=enabled
 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2: 


 hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media
        Model Number:       ST3120026A                              
        Serial Number:      5JT4E937            
        Firmware Revision:  8.01    
Standards:
        Used: ATA/ATAPI-6 T13 1410D revision 2 
        Supported: 6 5 4 3 
Configuration:
        Logical         max     current
        cylinders       16383   65535
        heads           16      1
        sectors/track   63      63
        --
        CHS current addressable sectors:    4128705
        LBA    user addressable sectors:  234441648
        LBA48  user addressable sectors:  234441648
        device size with M = 1024*1024:      114473 MBytes
        device size with M = 1000*1000:      120034 MBytes (120 GB)
Capabilities:
        LBA, IORDY(can be disabled)
        bytes avail on r/w long: 4      Queue depth: 1
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 16
        Recommended acoustic management value: 128, current value: 0
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4 
             Cycle time: no flow control=240ns  IORDY flow control=120ns



Expected Results:  
Consistant info.

refer to forum link to see opposite behaviour. hdparm dev/hdx shows DMA off 
whilst -i shows UDMA2* , system usage indicated it is off.
Comment 1 genbug 2005-05-11 04:00:38 UTC
I have Use_DMA_when available in kernel.

man hdparm indicates that this info is boot time info. but presumably not from before the kernel is loaded !
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-05-11 04:07:26 UTC
This is not a bug - see man hdparm

hdparm -i displays "the identification info that was obtained from the drive at boot time, if available... The data returned may or may not  be  current, depending  on  activity since booting the system."

hdparm -I requests "identification info directly from the drive"

The output shown here means that DMA was off when booting and was turned on later on (via hdparm, kernel drivers, ...)
Comment 3 genbug 2005-05-11 04:57:03 UTC
So how does this relate to the info posted in the thread that I indicated above:

I9300 zobi # hdparm -i /dev/hdc 

/dev/hdc: 

 Model=_NEC DVD+/-RW ND-6500A, FwRev=202C, SerialNo= 
 Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic } 
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0 
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0 
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0 
 IORDY=yes, 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=no 

 * signifies the current active mode


here dma is shown as being active by -i at boot.

I have dma built-in (and no hdparm in init) so how can another system get output  where this is on. Could it be that the BIOS turns this on before boot on the other box and not mine.

Thx
[*]         Use PCI DMA by default when available
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-05-11 05:34:05 UTC
Of course that BIOS can turn on DMA on the other machine and not on yours... 

As for the forums thread, whether DMA works or not with CD/DVD writer is completely unrelated to "inconsistent" hdparm output and making the output "consistent" would not fix anything at all. Could be caused by anything from kernel miscofiguration to broken hardware, firmware bugs, k3b or other software bugs, master/slave settings and position on the cable, issues with another ATAPI drive on the same IDE cable, etc. etc.
Comment 5 SpanKY gentoo-dev 2005-05-12 22:20:16 UTC
as the manpage indicates, and like Jakub said, -i/-I may report outdated information, and the output of -I is 'displayed in a new expanded format with considerably more detail than with the older -i flag'

if you have any other concerns, please the hdparm website and file an issue there:
http://sourceforge.net/projects/hdparm/

they are much more likely to tell you everything you ever wanted to know