tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ata(4) and NCQ



On Wed, Apr 20, 2011 at 02:32:08PM +0300, Andriy Gapon wrote:
> on 20/04/2011 03:38 Jonathan Stone said the following:
> > Also that both FreeBSD and Linux took the plunge and handle ATA drives 
> > through
> > their SCSI mid-layer.  I agree, that code is big; but maybe that 
> > alternative is
> > worth examiining, too.
> 
> AFAIK, (Open)Solaris did the same.
> And to clarify: you are actually talking about CAM layer.  Yes, previously CAM
> layer was only used for SCSI.

I'm still not sure what the rationale for this is. Managing the tags
is simple and could easily be abstracted and shared by the 2 subsystems
if we want to. Using the scsi code for ATA drives means that you either
have to teach the scsi sd driver to build ATA commands, and the whole
scsipi to handle ATA commands in addition to SCSI and ATAPI; or
or keep SCSI commands in the mid-layer and convert SCSI to ATA commands in
the ATA layer (which I consider useless overhead).

Actually I suspect the idea to have ATA drives show up as SCSI comes from
windows. But this was done so on windows because of a limitation of the
windows kernel: if you want to have a drive appears as ATA the controller
has to follow the pciide 1 specification. if you have a smarter controller,
the only way to have full control at the controller driver level is to
register it as a SCSI driver.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index