Support of ATA commands over SCSI to ATA Translation (SAT)
Brought to you by:
ideguy
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
Logged In: YES
user_id=350110
Originator: NO
hdparm *already* uses the SG_IO ioctl for SAT.
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?
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