PHW_FIND_ADAPTER routine

The PHW_FIND_ADAPTER prototype declares a routine that uses supplied configuration to determine whether a specific HBA is supported and, if it is, to return configuration information about that adapter.

Syntax


typedef ULONG (*PHW_FIND_ADAPTER)(
  _In_    PVOID                           DeviceExtension ,
  _In_    PVOID                           HwContext ,
  _In_    PVOID                           BusInformation,
  _In_    PCHAR                           ArgumentString,
  _Inout_ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
  _Out_   PBOOLEAN                        Again
);

Parameters

DeviceExtension [in]

Pointer to the miniport driver's per-HBA storage area.

HwContext [in]

Reserved member when used by one of the Storport driver's miniport drivers. With SCSI miniport drivers this member points to a context value. For a description of the meaning of this member for a SCSI miniport driver, see HwScsiFindAdapter.

BusInformation [in]

Reserved member when used by one of the Storport driver's miniport drivers. With SCSI miniport drivers this member points to bus-type-specific information that the OS-specific port driver has gathered. For a complete description of the meaning of this member for a SCSI miniport driver, see HwScsiFindAdapter.

ArgumentString [in]

Reserved member when used by one of the Storport driver's miniport drivers. With SCSI miniport drivers this member points to a null-terminated ASCII string that contains device information such as a base parameter or an interrupt level from the registry. For a complete description of the meaning of this member for a SCSI miniport driver, see HwScsiFindAdapter.

ConfigInfo [in, out]
Points to a PORT_CONFIGURATION_INFORMATION structure that the miniport driver uses during initialization.
For more information about how a SCSI miniport driver uses this member, see the description of the ConfigId member of the PORT_CONFIGURATION_INFORMATION (SCSI) structure.
For more information about how this member is used by a miniport driver that works with the StorPort driver, see the description of the PortConfiguration member of the PORT_CONFIGURATION_INFORMATION (STORPORT) structure.
Again [out]

Reserved member when used by one of the Storport driver's miniport drivers. With SCSI miniport drivers this member points to a BOOLEAN variable that informs the port driver whether it should call this routine again. For more information about the meaning of this member for a SCSI miniport driver, see HwScsiFindAdapter.

Return value

The routine declared by this prototype must return one of the following status values:

Return codeDescription
SP_RETURN_FOUND

Indicates a supported HBA was found and that the HBA-relevant configuration information was successfully determined and set in the PORT_CONFIGURATION_INFORMATION structure.

SP_RETURN_ERROR

Indicates an HBA was found but there was error obtaining the configuration information. If possible, such an error should be logged with ScsiPortLogError.

SP_RETURN_BAD_CONFIG

Indicates the supplied configuration information was invalid for the adapter.

SP_RETURN_NOT_FOUND

Indicates no supported HBA was found for the supplied configuration information.

 

Remarks

This declaration is used by both SCSI and StorPort miniport drivers.

For more information about the SCSI miniport driver's version of the routine associated with this declaration, see HwScsiFindAdapter.

For more information about the Storport driver's version of the routine associated with this declaration, see HwStorFindAdapter.

Requirements

Target platform

Desktop

Header

Srb.h (include Storport.h, Srb.h, or Storport.h)

See also

HwScsiFindAdapter
HwStorFindAdapter

 

 

Send comments about this topic to Microsoft

Anzeigen: