typedef struct HW_INITIALIZATION_DATA {
ULONG HwInitializationDataSize;
INTERFACE_TYPE AdapterInterfaceType;
PHW_INITIALIZE HwInitialize;
PHW_STARTIO HwStartIo;
PHW_INTERRUPT HwInterrupt;
PHW_FIND_ADAPTER HwFindAdapter;
PHW_RESET_BUS_BUS HwResetBus;
PHW_DMA_STARTED HwDmaStarted;
PHW_ADAPTER_STATE HwAdapterState;
ULONG DeviceExtensionSize;
ULONG SpecificLuExtensionSize;
ULONG SrbExtensionSize;
ULONG NumberOfAccessRanges;
PVOID Reserved;
BOOLEAN MapBuffers;
BOOLEAN NeedPhysicalAddresses;
BOOLEAN TaggedQueuing;
BOOLEAN AutoRequestSense;
BOOLEAN MultipleRequestPerLu;
BOOLEAN ReceiveEvent;
USHORT VendorIdLength;
PVOID VendorId;
USHORT ReservedUshort;
USHORT DeviceIdLength;
PVOID DeviceId;
} HW_INITIALIZATION_DATA, *PHW_INITIALIZATION_DATA;
Each SCSI miniport's DriverEntry routine must initialize with zeros and, then, fill in the relevant HW_INITIALIZATION_DATA information for the OS-specific port driver.
Members
HwInitializationDataSize
Specifies the size of this structure in bytes, as returned by sizeof(). In effect, this member indicates the version of this structure being used by the miniport driver. A miniport's DriverEntry routine should set this member's value for the port driver.
AdapterInterfaceType
Specifies the type of I/O bus to which the HBA is connected, which can be one of the following: Internal, Isa, Eisa, MicroChannel, TurboChannel, or PCIBus. However, additional types of buses will be supported in future. The upper bound on the types of buses supported is always MaximumInterfaceType.
If this is set to PCIBus, the miniport driver must supply values for the VendorIdLength, VendorId, DeviceIdLength, and DeviceId members, described later.
HwInitialize
Points to the miniport's HwScsiInitialize routine, which is a required entry point for all miniport drivers.
HwStartIo
Points to the miniport's HwScsiStartIo routine, which is a required entry point for all miniport drivers.
HwInterrupt
Points to the miniport's HwScsiInterrupt routine, which is a required entry point for any miniport driver of an HBA that generates interrupts. Set this to NULL if the miniport needs no ISR.
HwFindAdapter
Points to the miniport's HwScsiFindAdapter routine, which is a required entry point for all miniport drivers.
HwResetBus
Points to the miniport's HwScsiResetBus routine, which is a required entry point for all miniport drivers.
HwDmaStarted
Points to the miniport's HwScsiDmaStarted routine if its HBA uses system DMA, that is, a system DMA controller. Set this to NULL if the HBA is a busmaster or uses PIO.
HwAdapterState
Points to the miniport's HwScsiAdapterState routine, which is a required entry point for miniport drivers of HBAs with BIOSes that are linked with an OS-dependent, x86-platform-only port driver that must switch between x86 protected and real processor modes. If the miniport needs no HwScsiAdapterState routine, set this member to NULL. A miniport without this routine for an HBA that has a BIOS is incompatible with the x86-only port driver and unportable to an x86-only OS environment.
DeviceExtensionSize
Specifies the size in bytes required by the miniport driver for its per-HBA device extension. A miniport uses its device extension as storage for driver-determined HBA information. The OS-specific port driver initializes each device extension it allocates with zeros, and passes a pointer to the HBA-specific device extension in every call to a miniport driver except to its DriverEntry routine. The given size does not include any miniport-requested per-logical-unit storage, described next.
SpecificLuExtensionSize
Specifies the size in bytes required by the miniport driver for its per-logical-unit storage, if any. A miniport can use its LU extensions as storage for driver-determined logical-unit information about SCSI peripherals on the bus. The OS-specific port driver initializes each LU extension it allocates with zeros. Leave this member set to zero if the miniport does not maintain per-LU information for which it requires storage.
SrbExtensionSize
Specifies the size in bytes required by the miniport driver for its per-request storage, if any. A miniport can use SRB extensions as storage for driver-determined, request-specific information, such as data necessary to process a particular request. The OS-specific port driver does not initialize SRB extensions, but sets a pointer to this storage in each SRB it sends to the miniport driver. An SRB extension can be safely accessed by the HBA hardware. Leave this member set to zero if the miniport driver does not maintain per-SRB information for which it requires storage.
NumberOfAccessRanges
Specifies how many access ranges the adapter uses. Each is a range either of memory addresses or I/O port addresses. A typical HBA uses two ranges, one for its I/O ports and another for its device memory range.
Reserved
This member is reserved for system use and not available for use by miniport drivers.
MapBuffers
TRUE indicates that all data buffer addresses must be mapped to virtual addresses for access by the miniport driver.
NeedPhysicalAddresses
TRUE indicates that the miniport driver needs to translate its device, any per-LU, and any per-SRB extension addresses, as well as SRB buffer addresses, to physical addresses, as required by the HBA.
TaggedQueuing
TRUE indicates that miniport driver can support SCSI-II tagged queueing.
AutoRequestSense
TRUE indicates that the HBA can perform a request-sense operation without requiring an explicit request to do so. Only miniports driving HBAs with built-in firmware to perform request-sense operations should set this member to TRUE.
MultipleRequestPerLu
TRUE indicates that the miniport driver can queue multiple requests per logical unit, in particular, within the HBA. Note that an HBA must support auto request sense for its miniport to enable this functionality. If a miniport driver sets this member to TRUE, it must use each SRB QueueTag member for requests of this type, but the SRB_FLAGS_QUEUE_ACTION_ENABLE is not set in the SrbFlags member of the SCSI_REQUEST_BLOCK structure.
ReceiveEvent
TRUE indicates the miniport drives an HBA that can support the receive-event SRB for SCSI-II asynchronous events.
VendorIdLength
Specifies the size in bytes of the VendorId string, described next.
VendorId
Points to an ASCII byte string identifying the manufacturer of the HBA.
If the given AdapterInterfaceType is PCIBus, the vendor ID is a USHORT value allocated by the PCI SIG, which must be converted into a byte string by the miniport driver. For example, if the assigned PCI vendor ID value is 1001, the miniport-supplied VendorId string would be ('1', '0', '0', '1').
ReservedUshort
This member is reserved for system use and is not available for use by miniport drivers.
DeviceIdLength
Specifies the size in bytes of the DeviceId string, described next.
DeviceId
Points to an ASCII byte string identifying the HBA model(s) supported by the miniport driver.
If the given AdapterInterfaceType is PCIBus, a device ID is a USHORT value assigned by the manufacturer of the HBA. The miniport must convert any PCI device ID value(s) for the HBA(s) it can support into DeviceId byte string(s), as for the VendorId member. For example, if a miniport can support HBAs with the PCI device IDs 8040 and 8050, it might set DeviceId with a pointer to the byte string ('8', '0').
Comments
Each miniport driver must initialize the HW_INITIALIZATION_DATA structure with zeros before it sets the values of relevant members in this structure and calls ScsiPortInitialize.
See Also
DriverEntry, HwScsiInitialize, SCSI_REQUEST_BLOCK, ScsiPortInitialize