What we have is documented, if somewhat difficult to find using MSDN.
One good IOCTL to send is IOCTL_STORAGE_QUERY_PROPERTY,
StorageAdapterProperty type. This has a field (STORAGE_BUS_TYPE)BusType
which is the OS’s view of the matter. This is not always accurate, as
some IDE RAID controllers have reported SCSI in the past (because they
used SCSIPORT as their port driver), but it’s a good start. Then again,
if the port driver reports itself as SCSI, it won’t accept ATA pass
through anyways, so this may be sufficient for your needs.
As an aside, don’t all port drivers supporting DISK device types support
IOCTL_SCSI_PASS_THROUGH? (with the notable exceptions of memory stick
and SD-type memory devices?)
Here’s some links to MSDN to help you get started:
Hth,
.
IOCTL_STORAGE_QUERY_PROPERTY:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/storage
/hh/storage/k307_8z3m.asp
StorageAdapterDescriptor:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/storage
/hh/storage/k306_2pf6.asp
StorageDeviceDescriptor:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/storage
/hh/storage/k306_00qa.asp
-----Original Message-----
From: Gary G. Little [mailto:xxxxx@seagate.com]
Sent: Wednesday, September 17, 2003 1:38 PM
Subject: Determining if the disk is SCSI, ATA, or GKW …
GKW == God Knows What.
Ok, I’ve just done an IoGetDeviceInterface using GUID_DEVINTERFACE_DISK.
What I get back is a list of all disks in the system, but now I want to
know
is this given element in that list a SCSI, an IDE or a GKW type disk?
I’ve scoured the DDK with no joy, and really don’t know how to formulate
a
search of the list to find this technique. I use the old trial and error
of
doing an op like ATA pass through and assume if rejected that it ain’t
ATA,
same for SCSI, or GKW I suppose. But is there an IOCTL that might
provide a
cleaner means of doing this?
–
Gary G. Little
Seagate Technologies, LLC