Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SATA disk drives - IOCTL_ATA_PASS_THROUGH support

456 views
Skip to first unread message

J. Mullins

unread,
Jun 21, 2004, 2:23:14 PM6/21/04
to
I've been looking for a third party SATA controller that supports
IOCTL_ATA_PASS_THROUGH, but I've had no luck. Does anyone know of a
controller that supports this?

From what I've seen, third party SATA controllers (Adaptec, Promise)
are implementing there miniport drivers as SCSI miniport drivers, so
IOCTL_SCSI_PASS_THROUGH is supported, but not IOCTL_ATA_PASS_THROUGH.
This makes something as simple as sending an Identify command through
the pass through interface impossible (?).

Also, does anyone know if the Intel ICH5 chipset supports the
IOCTL_ATA_PASS_THROUGH for SATA devices?

Any feedback would be greatly appreciated.

Thanks,
Jeff

Gary G. Little

unread,
Jun 21, 2004, 9:26:45 PM6/21/04
to
It won't be the chip set you need to concern yourself.
IOCTL_ATA_PASS_THROUGH, or any pass through is a software definition and is
strictly dependent on the driver support. For ATA it would be ATAPI.SYS.
That support you will only find in XP SP2 RC2, an XP hot fix, and Server
2003. As you noted, anything not on the motherboard is generally using a
SCSI miniport which would require the miniport to provide support for SCSI
pass through. SATA may have ATAPI support but all I have seen thus far has
been SCSI interfaces. The intel Application Accelerator may support SAT but
I am not sure.

Gary

"J. Mullins" <jmul...@ccs.neu.edu> wrote in message
news:3bd86067.04062...@posting.google.com...

heinz baer

unread,
Jun 22, 2004, 12:29:09 AM6/22/04
to
> From what I've seen, third party SATA controllers (Adaptec, Promise)
> are implementing there miniport drivers as SCSI miniport drivers, so
> IOCTL_SCSI_PASS_THROUGH is supported, but not IOCTL_ATA_PASS_THROUGH.
> This makes something as simple as sending an Identify command through
> the pass through interface impossible (?).

IOCTL_ATA_PASS_THROUGH is new. Try IOCTL_SCSI_MINIPORT_IDENTIFY and
IOCTL_IDE_PASS_THROUGH on legacy subsystems.

Maxim S. Shatskih

unread,
Jun 22, 2004, 8:58:54 AM6/22/04
to
> IOCTL_ATA_PASS_THROUGH is new. Try IOCTL_SCSI_MINIPORT_IDENTIFY and
> IOCTL_IDE_PASS_THROUGH on legacy subsystems.

IOCTL_SCSI_MINIPORT + SMART_RCV_DRIVE_DATA will read the ATA IDENTIFY data for
any disks, even pre-SMART ones :-). Works on all NTs since NT4.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com


Gary G. Little

unread,
Jun 22, 2004, 10:37:20 AM6/22/04
to
Once again ... neither IOCTL_ATA_PASS_THROUGH nor IOCTL_IDE_PASS_THROUGH
work on 2000 or XP SP1. You need the hot fix, XP SP2 RC2 or Server 2003, and
the latest DDK to build functional pass through drivers or applications.
Max's trick of using the SCSI miniport IOCTL with a SMART command will work
to get IDENTIFY data but the full spectrum of pass through and used defined
commands allowed by the ATA-6 specification are not doable using that IOCTL
unless the SCSI miniport permits it. In that case you would need the driver
specific information to do that and not IOCTL_ATA_PASS_THROUGH.

As of right now, if you need to do pass through using ATAPI.sys you are
restricted to XP SP2 RC1 and Server 2003, and note that XP SP2 RC2 has fixes
that may not be in the Server 2003.

--
Gary G. Little
Seagate Technologies, LLC

"heinz baer" <heinz...@my-deja.com> wrote in message
news:5a47bd7f.04062...@posting.google.com...

J. Mullins

unread,
Jun 22, 2004, 4:41:44 PM6/22/04
to
Right, IOCTL_ATA_PASS_THROUGH support in the Intel ICH5 or ICH6
depends on the driver implementation. Does anyone know how the
miniport driver of the onboard SATA controller in the ICH5 or ICH6 is
implemented? Is it a SCSI or ATA miniport driver?

Also, if this is also implemented as a SCSI miniport, how does one go
about sending pass through ATA commands through SATA controllers? Do
you need the miniport driver specs? How would you go about getting
the specs on a SATA controller's miniport driver? It seems like
getting your hands on these would be very unlikely.

Intel's ACHI standard is open. This leaves open the possibility of
writing your own driver for a SATA controller or you could wait for
the ATAPORT driver, availble in operating systems greater than Server
2003.

Are there any other options?


"Gary G. Little" <gary.g.lit...@seagate.com> wrote in message news:<AuXBc.7946$WU1...@newssvr24.news.prodigy.com>...

Gary G. Little

unread,
Jun 22, 2004, 11:37:27 PM6/22/04
to
Ask the oem for the specs on the driver and any IOCTL's that may be of
importance in controlling it. STAT uses the same chips as PATA, at least the
Si3112 controller uses the same CMD 680 control commands as are used in the
PATA board.

Gary.

"J. Mullins" <jmul...@ccs.neu.edu> wrote in message
news:3bd86067.04062...@posting.google.com...

heinz baer

unread,
Jun 23, 2004, 1:04:21 AM6/23/04
to
> nor IOCTL_IDE_PASS_THROUGH work on 2000 or XP SP1.

False. IOCTL_IDE_PASS_THROUGH works on 2000 and XP including SP1. I
listed it as there is a chance 3rd party drivers implemented it for
compatibility. You can get sample code for using this IOCTL from here:

ftp://ftp.heise.de/pub/ct/listings/0207-218.zip

> You need the hot fix, XP SP2 RC2 or Server 2003

Does not apply to the OP who is using 3rd party scsi miniport drivers.

> using the SCSI miniport IOCTL with a SMART command will work to get
> IDENTIFY data but the full spectrum of pass through and used defined
> commands allowed by the ATA-6 specification are not doable using that IOCTL
> unless the SCSI miniport permits it.

IF AND ONLY IF you send the command above disk.sys you can use Max's
SMART_RCV_DRV_DATA "trick", otherwise use IOCTL_SCSI_MINIPORT_IDENTIFY
I mentioned before (OP may not be running a disk drive or sending
commands below the disk.sys level). Note there are numerous other
IOCTLs for other ATA commands such as
IOCTL_SCSI_MINIPORT_EXECUTE_OFFLINE_DIAGS. Not the full spectrum, but
IOCTL_ATA_PASS_THROUGH doesn't permit that either. The SCSI miniport
IOCTLs have also been around since Windows 2000 and thus have a chance
of being implemented by existing 3rd party drivers. See the DDK
samples for how to use these.

Gary G. Little

unread,
Jun 23, 2004, 9:25:38 AM6/23/04
to
No it does not. I have been using IOCTL_ATA/IDE_PASS_THROUGH now for over a
year, and until we got the ball rolling to get ATAPI.sys fixed, ATAPI.sys in
XP or 2000 did not work. It still does not work in 2000, and even XP SP2
requires the header files from Server 2003. We investigated the same web
site a year ago, but had to rely on Microsoft to provide the hotfix for us
to use IOCT_ATA_PASS_THROUGH for such commands as READ/WRITE BUFFER. Trust
me ... a disc drive company such as Seagate is intensely interested in using
pass through for diagnostics. We were not able to progress until Microsoft
provided us a hotfix in the fall of 2003.

--
Gary G. Little
Seagate Technologies, LLC

"heinz baer" <heinz...@my-deja.com> wrote in message
news:5a47bd7f.04062...@posting.google.com...

heinz baer

unread,
Jun 24, 2004, 12:04:24 AM6/24/04
to
> I have been using IOCTL_ATA/IDE_PASS_THROUGH now for over a year...

You seem to be confusing the two. IOCTL_IDE_PASS_THROUGH is a
completely different animal and has no resemblance at all to
IOCTL_ATA_PASS_THROUGH/DIRECT. IDE_PASS_THROUGH was never documented
by Microsoft, though the IOCTL code has existed in the DDK header
files for years before ATA_PASS_THROUGH was invented. It doesn't use
anything like the ATA_PASS_THROUGH_EX/DIRECT structures either; you
won't find the IDE_PASS_THROUGH structure in any Microsoft
headers--only in 3rd party sample code like I referenced before. I use
the below tool to send ATA commands and it does so by way of
IOCTL_IDE_PASS_THROUGH under regular Win2k & XP systems (no hot
fixes):

http://www.perisoft.net/bushound

IOCTL_IDE_PASS_THROUGH isn't as powerful as IOCTL_ATA_PASS_THROUGH,
but if you just want to do simple things like read the partition
table, query the IDENTIFY data, or RESET an atapi device, then it
works well.

0 new messages