Querying Storport for Hardware Information

Storage class drivers and other higher-level drivers can query Storport for information about the capabilities of devices and host bus adapters by means of a query-property request (IOCTL_STORAGE_QUERY_PROPERTY). The query-property request is the PnP equivalent of the inquiry and capabilities requests in legacy systems (IOCTL_SCSI_GET_INQUIRY_DATA and IOCTL_SCSI_GET_CAPABILITIES). For storage devices, Storport returns a storage device descriptor (STORAGE_DEVICE_DESCRIPTOR) containing SCSI inquiry data or the non-SCSI equivalent, and for host adapters Storport returns a storage adapter descriptor (STORAGE_ADAPTER_DESCRIPTOR) containing capabilities and limitations data.

Higher-level drivers must pass a STORAGE_PROPERTY_QUERY structure to Storport with the query property request. If a higher-level driver has set the PropertyId member of STORAGE_PROPERTY_QUERY to StorageAdapterProperty, Storport returns a storage adapter descriptor. If the higher-level driver has set the PropertyId member to StorageDeviceProperty, Storport returns a storage device descriptor.

If a higher-level driver sends a query property request IRP to the FDO of the adapter with PropertyId set to StorageDeviceProperty, Storport fails the IRP. If the class driver sends this IRP to the PDO of a device with PropertyId set to StorageAdapterProperty, Storport forwards the IRP down to the adapter FDO.

For a detailed explanation of storage device descriptors and storage adapter descriptors, see Storage Class Driver's GetDescriptor Routine, and the reference pages for STORAGE_PROPERTY_QUERY, STORAGE_DEVICE_DESCRIPTOR, and STORAGE_ADAPTER_DESCRIPTOR.