The storage query property test validates if the storage miniport driver is reporting the correct bus type and the storage controller is reporting the correct PCI class code.

 

The test sends the IOCTL_STORAGE_QUERY_PROPERTY with STORAGE_PROPERTY_ID set to StorageAdapterProperty/StorageDeviceProperty to get the device bus type from the storage miniport driver.  The miniport driver should report the correct bus type from the following bus type enumeration values

 

typedef enum _STORAGE_BUS_TYPE {

  BusTypeUnknown = 0x00,

  BusTypeScsi = 0x01,

  BusTypeAtapi = 0x02,

  BusTypeAta = 0x03,

  BusType1394 = 0x04,

  BusTypeSsa = 0x05,

  BusTypeFibre = 0x06,

  BusTypeUsb = 0x07,

  BusTypeRAID = 0x08,

  BusTypeiSCSI = 0x09,

  BusTypeSas = 0x0A,

  BusTypeSata = 0x0B,

  BusTypeMaxReserved = 0x7F

} STORAGE_BUS_TYPE,  *PSTORAGE_BUS_TYPE;

 

The documentation for these bus type values can be found at: http://msdn2.microsoft.com/en-us/library/aa363465.aspx

 

The test gets the storage controller PCI class code from the OS generated PNP compatibility IDs  and determines the controller bus type based on the PCI class code. The test verifies if the bus type reported by the miniport driver matches with the bus type for the storage controller PCI class code. The test also verifies if the user supplied device bus type in the DTM submission matches with the corresponding bus type for the controller PCI class code.

 

The test uses the following PCI class code table to determine the storage controller bus type

 

CLASS CODE

 

SUB CLASS CODE

PROGRAMMING INTERFACE

DESCRIPTION

0x01

0x00

0x00

SCSI CONTROLLER

0x01

0x01

XX

IDE CONTROLLER

0x01

0x02

0x00

FLOPPY CONTROLLER

0x01

0x03

0x00

IPI BUS CONTROLLER

0x01

0x04

0x00

RAID CONTROLLER

0x01

0x05

0x20/0x30

ATA CONTROLLER

0x01

0x06

0x00/0x01

SERIAL ATA CONTROLLER

0x01

0x07

0x00

SERIAL ATTACHED SCSI (SAS) COTNROLLER

0x01

0x80

0x00

OTHER MASS STORAGE CONTROLLER

 

The controller bus type validation testing will continue to be a key test scenario in the Storage HBA category, but it will be modified to stop checking  the Programming Interface byte (IF), of the 0x0101 (IDE) and 0x0104 (RAID) types to determine the bus type. 

This results in being the following required class code definitions that must be present:

IDE Type:  Mass Storage Device (0x01), ATA Parallel - IDE Type (0x01), Programming Interface (Don’t Care - 0xXX )

RAID Type:  Mass Storage Device (0x01), RAID Type (0x04), Programming Interface (Don’t Care - 0xXX)

However, because the PCI Conventional specification (2.3) declares two unique values for the SATA Type (Non-ATA Compatible Mode) Programming Interface, the following is required for AHCI-enabled controllers:

AHCI Type:  Mass Storage Device (0x01), SATA Type (0x06), AHCI Type (0x01)

The SATA controller must report 0x0101XX in IDE compatible mode, 0x010601 in AHCI mode and 0x010600 in vendor specific implementations.