Port-Driver-Supplied ConfigInfo for HwScsiFindAdapter

The system port driver always sets up the following PORT_CONFIGURATION_INFORMATION before it calls a miniport driver's HwScsiFindAdapter routine with a pointer to the PORT_CONFIGURATION_INFORMATION (the ConfigInfo buffer):

  • Length to sizeof(PORT_CONFIGURATION_INFORMATION)

  • AdapterInterfaceType to the miniport driver's HW_INITIALIZATION_DATA (SCSI) specification

  • InterruptMode to LevelSensitive for a PCI bus or Latched for all other bus types

    If the miniport driver has no HwScsiInterrupt routine and, therefore, sets the HwInterrupt entry point to NULL in the HW_INITIALIZATION_DATA, this member is irrelevant.

  • AtdiskPrimaryClaimed to TRUE if a previously loaded driver is using the I/O port range 0x1F0 to 0x1FF

  • AtdiskSecondaryClaimed to TRUE if a previously loaded driver is using the I/O port range 0x170 to 0x17F

  • NumberOfAccessRanges to the miniport driver's HW_INITIALIZATION_DATA specification

  • Dma64BitAddresses to the miniport driver's HW_INITIALIZATION_DATA specification if the system has memory with physical addresses above 4 GB

The port driver also attempts to fill in the following members with values from other sources in the system, such as the registry for a legacy miniport driver or from the Plug and Play manager for a Plug and Play miniport driver:

  • SystemIoBusNumber set to the system-assigned value for the I/O bus

    The miniport driver's HwScsiFindAdapter routine can be called for each bus of the given AdapterInterfaceType with an updated value for SystemIoBusNumber, or this can be set to a system-determined value if the system detects an HBA on a particular bus of the given AdapterInterfaceType.

  • AccessRanges elements of type ACCESS_RANGE, set with the bus-relative RangeStart address and RangeLength, as well as whether each range is a RangeInMemory

    RangeInMemory set to FALSE indicates a range of ports in I/O space, rather than a memory-space range.

    The port driver either supplies all the information in an ACCESS_RANGE element or it sets all members of the element to (default) zero. Usually, the port driver supplies additional configuration information if it provides nonzero values for an access range.

    A miniport driver must map any bus-relative access range values supplied by the port driver with ScsiPortGetDeviceBase and use the mapped logical address values to determine whether the corresponding HBA is one that the driver supports. Never map and use a miniport driver-supplied range to access an HBA on the bus if the port driver supplies filled-in access range elements in the PORT_CONFIGURATION_INFORMATION it passes to the HwScsiFindAdapter routine. Using miniport driver-supplied addresses when the port driver has supplied range configuration information can reset an already configured HBA, making it dysfunctional, or even cause the system to fail the boot process.

    For more information about using mapped logical access ranges, see Setting up ConfigInfo in HwScsiFindAdapter.

  • BusInterruptLevel or BusInterruptVector

    This member is irrelevant if the miniport driver has no HwScsiInterrupt routine.

  • DmaChannel or DmaPort if the HBA uses a system DMA controller

    If the HBA is a bus master or uses PIO, these members are irrelevant.

  • InitiatorBusId

    If the input InitiatorBusId[0] has the value zero, the miniport driver can assign a default value if its HBA does not require the use of particular value(s) determined by querying the HBA. Otherwise, the miniport driver should use any nonzero value assigned by the port driver if possible. Every miniport driver must update InitiatorBusId specifications to match what its HBA uses, if necessary querying the HBA to determine the appropriate values(s).

    A miniport driver must set an entry for each SCSI bus supported by the HBA, as indicated by the value of NumberOfBuses.