Mark Lord wrote:
>* I don't mind HDIO_DRIVE_TASK nearly as much as HDIO_DRIVE_CMD,
>* since the command protocol is available.
That's not HDIO_DRIVE_TASKFILE, by the way.. a different beast there.
HDIO_DRIVE_TASK is just a slightly different form of HDIO_DRIVE_CMD
for non-data commands (specifically, some SMART commands),
with a more complete register set being exchanged.
Oops, indeed I meant HDIO_DRIVE_TASKFILE.
Anyway, once the infrastructure for the ATA Pass-thru CDB is implemented
in libata, it is trivial to implement any of these three HDIO_DRIVE_xxx
ioctls, using the ioctl data to build a scsi command internally. A bit
strange at first glance, but it maximizes the leverage of existing
kernel infrastructure to send commands, time them out, etc.
Jeff