ATAPI.SYS Pass Through?

Please forgive an ignorant question; I’m very new to the NT file system
driver stack(s). I am trying to support some vendor specific extensions on
an ATAPI drive. So far, I am at a loss as what sort of driver to write (if
any!) and where it should fit in the scheme of things.

Based upon my spelunking so far, it appears that, on Win2000 at least,
ATAPI.SYS is a ‘port’ driver that simulates SCSI to the drivers above. On a
true SCSI drive, I seem to be able to get to at least some vendor specific
options using IOCTL_SCSI_PASS_THROUGH(_DIRECT). I can submit the same
IOCTLs to an IDE/ATA drive, but I only seem to get responses for the SCSI
requests that ATAPI.SYS understands (that is, there does not appear to be a
generic translation for unknown SRBs to ATA commands, which is
understandable).

According to a single knowledge base article, ATAPI.SYS has a provision for
MiniIDE drivers. I can’t seem to locate any documentation, but the one
sample I located, PCIIDE, seems to show that the Miniport’s role is limited
to hardware setup and capability reporting.

In light of this, I cannot figure out how, exactly, I would go about
accessing vendor specific drive commands or, for that matter, standard
commands like ATA security. Do I need to implement a complete port driver
(or SCSI miniport driver)? That seems like a heck of a lot of work to
execute a couple crummy ATA commands. Or, does ATAPI.SYS have some IOCTL
support akin to IOCTL_SCSI_PASS_THROUGH that I could use?

Again, forgive the stupid question. I’ve been watching IRPs fly between
drivers for two days and my head is still reeling. Thanks in advance for
any help.

-jjf

Joe,

you wrote on Wednesday, July 24, 2002, 02:09:59:

FJ> Based upon my spelunking so far, it appears that, on Win2000 at least,
FJ> ATAPI.SYS is a ‘port’ driver that simulates SCSI to the drivers above. On a
FJ> true SCSI drive, I seem to be able to get to at least some vendor specific
FJ> options using IOCTL_SCSI_PASS_THROUGH(_DIRECT). I can submit the same
FJ> IOCTLs to an IDE/ATA drive, but I only seem to get responses for the SCSI
FJ> requests that ATAPI.SYS understands (that is, there does not appear to be a
FJ> generic translation for unknown SRBs to ATA commands, which is
FJ> understandable).

I’m not sure if that helps, but take a look at
ftp://ftp.heise.de/pub/ct/listings/0207-218.zip . This sample uses an
undocumented SCSIOP_ATA_PASSTHROUGH code with IOCTL_SCSI_PASS_THROUGH to
control the acoustic management of IDE hard disk drives.

Ralf.

Ralf,

The below seems to be exactly what I was looking for. Thank you!

I’m not sure if that helps, but take a look at
ftp://ftp.heise.de/pub/ct/listings/0207-218.zip . This sample uses an
undocumented SCSIOP_ATA_PASSTHROUGH code with IOCTL_SCSI_PASS_THROUGH to
control the acoustic management of IDE hard disk drives.