#4 Support of ATA commands over SCSI to ATA Translation (SAT)

closed
nobody
None
5
2008-06-03
2008-05-28
No

Hi,

just a request to man hdparm able to use the SG_IO ioctl
to translate ATA commands. This seems to work for e.g.
SETFEATURES commands as the tool sg_sat_set_features(8)
does. But for sg_sat_set_features(8) the user is limited
to SETFEATURES and the user has to read and understand
<linux/hdparm.h>

Werner

Discussion

  • Mark Lord

    Mark Lord - 2008-06-02

    Logged In: YES
    user_id=350110
    Originator: NO

    hdparm *already* uses the SG_IO ioctl for SAT.

     
  • Mark Lord

    Mark Lord - 2008-06-02
    • status: open --> closed
     
  • Dr. Werner Fink

    Dr. Werner Fink - 2008-06-03
    • status: closed --> open
     
  • Dr. Werner Fink

    Dr. Werner Fink - 2008-06-03

    Logged In: YES
    user_id=547210
    Originator: YES

    It seems that not all features/configurations of an (S)ATA disk
    can be controlled:

    magellan:/ # cat /sys/block/sda/device/vendor
    ATA
    magellan:/ # cat /sys/block/sda/device/model
    SAMSUNG SP1654N

    which is an ATA disk but using hdparm leads to

    magellan:/ # hdparm -v /dev/sda

    /dev/sda:
    IO_support = 0 (default)
    16-bit)
    HDIO_GET_UNMASKINTR failed: Inappropriate ioctl for device
    HDIO_GET_DMA failed: Inappropriate ioctl for device
    HDIO_GET_KEEPSETTINGS failed: Inappropriate ioctl for device
    readonly = 0 (off)
    readahead = 256 (on)
    geometry = 19457/255/63, sectors = 312581808, start = 0

    IMHO the ioctl's HDIO_GET_UNMASKINTR and HDIO_SET_32BIT of the
    old IDE drivers make no sence if the new ATA driver is used and
    maybe the HDIO_GET_DMA and HDIO_GET_KEEPSETTINGS should not fail
    but replaced by an other ioctl (e.g. translate ATA commands and
    send them over SCSI with the SG_IO) if this is possible.
    At least for the WIN_SETFEATURES 0xEF and its sub-commands this
    is done by the tool sg_sat_set_features(8).

    What do you think?

     
  • Mark Lord

    Mark Lord - 2008-06-03

    Logged In: YES
    user_id=350110
    Originator: NO

    1. You are obviously using an old/obsolete version of hdparm, since the last few versions no longer produce those "Inappropriate ioctl" messages from "-v". Please upgrade before trying to report imaginary issues.

    2. The three flags in question, -u, -d, and -k, are *device-driver* flags, not *DRIVE* flags. So they do NOT generate any kind of command to the actual drive. So there is no way to use SAT for them (SAT is only for ATA commands to drives).

    Cheers

     
  • Mark Lord

    Mark Lord - 2008-06-03
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks