The HDIO_DRIVE_TASK ioctl should output the taskfile register values, the smartctl utility checks the values of the lba registers specifically the values of lbam and lbah for failure status (0xf4 and 0x2c respectively). This patch will copy the ATA registers back to the user-space application on a check condition similiar to ata_cmd_ioctl(). Please ACK or comment. Thanks, David