Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Unfortunately sg_sat_set_features doesn't work:
- galahad:~/sg3_utils-1.33/src# ./sg_sat_set_features -vvv --feature=0bh --lba=0 /dev/hdc
- open /dev/hdc with flags=0x4002
- ATA pass through (16) cdb: 85 06 0c 00 0b 00 00 00 00 00 00 00 00 00 ef 00
- ioctl(SG_IO) failed: Invalid argument (errno=22)
- duration=0 ms
- ATA pass through (16): os error: Invalid argument
- ATA pass through (16) failed
- This is probably a kernel limitation. CONFIG_IDE_TASK_IOCTL isn't supported either:
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose --read-sector 0 /dev/hdc
- /dev/hdc:
- reading sector 0: oflags.lob_all=0x3f, flags={ nsect lbal lbam lbah dev command }
- oflags.hob_all=0x00, flags={ }
- outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 e0 20 00
- ioctl(fd,SG_IO): Invalid argument
- trying legacy HDIO_DRIVE_TASKFILE
- rc=-1, errno=22, returned ATA registers: er=00 st=20
- The running kernel lacks CONFIG_IDE_TASK_IOCTL support for this device.
- FAILED: Invalid argument
- Getting and setting AAM works like a charm though:
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -M /dev/hdc
- /dev/hdc:
- outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- acoustic = 254 (128=quiet ... 254=fast)
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -M 128 /dev/hdc
- /dev/hdc:
- setting acoustic management to 128
- outgoing cdb: 85 06 20 00 42 00 80 00 00 00 00 00 00 40 ef 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- acoustic = 128 (128=quiet ... 254=fast)
- Reading the current WRV value as well:
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -R /dev/hdc
- /dev/hdc:
- outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- write-read-verify = 0
- Setting it to zero works OK, but doesn't enable WRV:
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -I /dev/hdc
- ...
- * 64-bit World wide name
- Write-Read-Verify feature set
- * WRITE_UNCORRECTABLE_EXT command
- ...
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -R 0 /dev/hdc
- /dev/hdc:
- setting write-read-verify to 0
- outgoing cdb: 85 06 20 00 8b 00 00 00 00 00 00 00 00 40 ef 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- write-read-verify = 0
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -I /dev/hdc
- ...
- * 64-bit World wide name
- Write-Read-Verify feature set
- * WRITE_UNCORRECTABLE_EXT command
- ...
- Interestingly enough the CDB here differs from the one sg_sat_set_features tries to issue. Is -R 0 supposted to set Mode 0 (which is what I want) or disable WRV?
- Setting WRV to 1, 2 or 3 fails:
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -R 1 /dev/hdc
- /dev/hdc:
- setting write-read-verify to 1
- outgoing cdb: 85 06 20 00 0b 00 01 00 00 00 00 00 00 40 ef 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- HDIO_DRIVE_CMD:WRV failed: Input/output error
- outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- write-read-verify = 0
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -R 2 /dev/hdc
- /dev/hdc:
- setting write-read-verify to 2
- outgoing cdb: 85 06 20 00 0b 00 02 00 00 00 00 00 00 40 ef 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- HDIO_DRIVE_CMD:WRV failed: Input/output error
- outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- write-read-verify = 0
- galahad:~/hdparm-9.38-wrv# ./hdparm --verbose -R 3 /dev/hdc
- /dev/hdc:
- setting write-read-verify to 3
- outgoing cdb: 85 06 20 00 0b 00 03 00 00 00 00 00 00 40 ef 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- HDIO_DRIVE_CMD:WRV failed: Input/output error
- outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00
- ioctl(fd,SG_IO): Invalid argument
- Trying legacy HDIO_DRIVE_CMD
- write-read-verify = 0
- The drive does seem to receive the commands, but doesn't accept them:
- galahad:~/hdparm-9.38-wrv# dmesg
- ...
- hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
- hdc: drive_cmd: error=0x04 { DriveStatusError }
- ide: failed opcode was: 0xef
Add Comment
Please, Sign In to add comment