[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-ppc-dev
Subject:    I fear hdparm is not big-endian safe!
From:       Gioele Barabucci <ml () gioelebarabucci ! com>
Date:       2002-11-24 15:43:02
[Download RAW message or body]

Hi,

I'm using hdparm on Gentoo/PPC.
I think that hdparm operation are not endian safe because operations like "-I" 
can't understand big-endian data.
Look at the "Model" output for "-i" (via kernel info) and for "-I" (directly 
from HD): The chars are swapped!!!

This is the output of "hdparm -i"

bash-2.05a# hdparm -i /dev/hda

/dev/hda:

 Model=IBM-IC25N020ATCS04-0, FwRev=CA2AA71A, SerialNo=CSL207D9HNBTXA
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=1768kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=4228907259, LBA=yes, LBAsects=39070080
 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=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:  2 3 4 5

and this is the one from "hdparm -I"
bash-2.05a# hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media
powers-up in standby; SET FEATURES subcmd spins-up.

        WARNING: ID response incomplete.
        WARNING: Following data may be incorrect.

        Model Number:       BI-MCI520N02TASC400-
        Serial Number:      SC2L709DNHTBAX
        Firmware Revision:  ACA27AA1
Standards:
        Supported: 13 12 11 10
        Likely used: 13
Configuration:
        Logical         max     current
        cylinders       65343   0
        heads           4096    0
        sectors/track   16128   0
        --
        LBA    user addressable sectors: 1409450025
        device size with M = 1024*1024:      688208 MBytes
        device size with M = 1000*1000:      721638 MBytes (721 GB)
Capabilities:
        IORDY(may be)(cannot be disabled)
        Queue depth: 1
        Standby timer values: spec'd by Vendor
        R/W multiple sector transfer: Max = 128 Current = ?
        Advanced power management level: unknown setting (0x8040)
        DMA: not supported
        PIO: unknown
Security:
        Master password revision code = 65279
        not     supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
        not     supported: enhanced erase



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic