// irb.h
IDE_HW_CONTROL IdeHwControl;
BOOLEAN IdeHwControl(
[in] PVOID ChannelExtension,
[in] IDE_CONTROL_ACTION ControlAction,
[in, out] PVOID Parameters
)
{...}
View the official Windows Driver Kit DDI reference
No description available.
The IdeHwControl miniport driver routine notifies the miniport driver about Plug and Play (PnP) and power events.
Note The ATA port driver and ATA miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.
ChannelExtension
[in]A pointer to the channel extension.
ControlAction
[in]Contains an enumerator value of type IDE_CONTROL_ACTION that indicates the control action to perform.
Parameters
[in, out]A pointer to a buffer that contains the parameters that are associated with the control action. This parameter can have one of the values in the following table.
Control action | Parameters | Description |
---|---|---|
IdeStart | Parameter points to a structure of type IDE_CHANNEL_CONFIGURATION. | Indicates that the port driver is starting the channel. |
IdeVendorDefined | Parameter points to a structure of type IDE_VENDOR_DEFINED_POWER_INFO. | Indicates that there is a vendor defined power event coming. |
IdeHwControl returns TRUE if the operation was successful. Otherwise, it returns FALSE.
The port driver makes sure that there is no outstanding I/O on the channel before it invokes this routine. The miniport driver can have its own power policy methods when the system enters a different power state. In order to achieve this, the miniport driver needs to do the following:
When the miniport driver routine IdeHwControl is called with control action IdeStart:
Check the SupportedAdvances.AdvancedChannelConfigurationSupported field in the ChannelConfiguration structure.
Check the AdvancedChannelConfiguration->Present.VendorDefinedPower field in the ChannelConfiguration structure.
If the values of the two fields listed previously are both TRUE, this version of the ATA port driver supports vendor-defined power management.
If vendor-defined power management is supported by the ATA port driver, the miniport driver can register for special power management handling by setting the AdvancedChannelConfiguration->VendorDefinedPower.ValidGuids and AdvancedChannelConfiguration->VendorDefinedPower.Guid[] fields (the latter should be the GUID of the power policy in the miniport driver's INF file).
While the miniport driver processes the IdeHwControl routine with control action IdeVendorDefined, it should do following:
Compare the SettingGuid field from the parameter field of structure IDE_VENDOR_DEFINED_POWER_INFO with the GUID that the miniport driver registered to make sure that the call is for this channel. If the GUIDs do not match, the miniport driver should complete the call and take no action.
Get the Value field from the parameter field of structure IDE_VENDOR_DEFINED_POWER_INFO and perform the appropriate miniport driver-specific power management action.