Cc: Anders Eriksson <aeriksson@...>, Rafael J. Wysocki <rjw@...>, Jens Axboe <jens.axboe@...>, Ingo Molnar <mingo@...>, Linux Kernel Mailing List <linux-kernel@...>
Please take a closer look - my "real fix" _only_ affects WIN_SMART command
and _not_ vendor special ones (no, there are none vendor special commands
using the same opcode).
DRQ/ERR bits handling is a tangent issue (and yes it also needs fixing).
This is actually how the ATA hardware operates.
You cannot just bang random commands and expect that later driver will be
able to 100% correctly deduce what the command wants from the drive status
itself (this may work more-or-less well for no-data and PIO-in by using DRQ
bit trick, but we also have PIO-out, DMA, PACKET etc).
IOW this won't fly as drive/controller alone doesn't provide use with enough
information about command being currently executed.
There is some misunderstaning here - taskfile approach lets user specify
_both_ the command and what it really wants (protocol etc.), and no - we
don't do any command checking with the spec but give user the control...
Call taskfile crap all you want but the fact is that taskfile approach
handles _all_ protocols and _all_ commands while the beloved "robust"
and "intelligent" approach is able to handle only 28-bit commands using
no-data or PIO-in protocols (this is what HDIO_DRIVE_CMD is supporting
and there is no way it will ever support more than that with its design).
[ BTW libata also uses taskfile approach (including HDIO_DRIVE_CMD!) ]
The problem here is that we cannot fully trust neither hardware nor the
paper (so we give the control to the user for the final decision).
Please re-consider this decision given the above facts.
Thanks,
Bart
--