A different ATA driver
[Posted August 13, 2003 by corbet]
Much work has been done through 2.5 to improve the ATA/IDE layer. The work
of Bartlomiej Zolnierkiewicz, Alan Cox, and others has brought a great deal
of order and correctness to this code. Not everything that might have been
hoped for at the beginning of 2.5 has been done, but things have clearly
moved in the right direction.
Meanwhile, Jeff Garzik has been quietly developing a completely different
driver for ATA drives; he posted libata 0.70
this week. Jeff's driver concentrates on newer hardware, with an emphasis
on serial ATA drives. The interesting aspect of libata,
however, is the approach it takes: it essentially functions as a
translation layer which makes ATA drives appear to be SCSI devices. They
are managed by the SCSI layer, and do not appear as IDE drives to the user
at all.
This is not as strange a thing to do as one might think. The ATA protocol
is heavily influenced by SCSI, so many SCSI commands can be passed through
with little processing. But the real advantage of this approach seems to
be that it can take advantage of the existing SCSI mid-layer. The SCSI
code takes care of a lot of the work, and already supports a number of
needed features (such as hotplugging). For a developer who wants to make a
new, "legacy free" driver for modern ATA hardware, plugging into the SCSI
layer offers a lot of advantages. This is especially true for serial ATA,
which presents a lot of SCSI-like handling issues.
libata is not intended to replace the current IDE layer; it makes no
attempt to handle the wide range of hardware that the IDE code copes with.
It could be, however, the driver that many of us end up using in a couple
years or so. Sometimes you have to leave the old stuff behind and look to
the future.
(
Log in to post comments)