Skip to content

Latest commit

 

History

History
138 lines (107 loc) · 5.42 KB

nc-irb-ide_hw_control.md

File metadata and controls

138 lines (107 loc) · 5.42 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:irb.IDE_HW_CONTROL
IDE_HW_CONTROL (irb.h)
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.
storage\idehwcontrol.htm
storage
03/29/2018
IDE_HW_CONTROL callback function
IDE_HW_CONTROL, IdeHwControl, IdeHwControl routine [Storage Devices], atartns_9c868c08-5470-4940-9067-0aa8a796b191.xml, irb/IdeHwControl, storage.idehwcontrol
irb.h
Irb.h
Desktop
Windows
IDE_HW_CONTROL
irb/IDE_HW_CONTROL
APIRef
kbSyntax
UserDefined
irb.h
IDE_HW_CONTROL

IDE_HW_CONTROL callback function

-description

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.
 

-parameters

-param ChannelExtension [in]

A pointer to the channel extension.

-param ControlAction [in]

Contains an enumerator value of type IDE_CONTROL_ACTION that indicates the control action to perform.

-param 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.

-returns

IdeHwControl returns TRUE if the operation was successful. Otherwise, it returns FALSE.

-remarks

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:

  • Add a power policy setting scheme into the miniport driver's INF file. A GUID is needed to present a miniport driver-defined power policy. For more information about the power settings directive, see INF AddPowerSetting Directive. More information about the GUIDs can be found at Disk settings.
  • 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).
  • After vendor-defined power management is registered, the miniport driver will be able to receive calls to its IdeHwControl routine with control action IdeVendorDefined when the system power scheme changes.
  • 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.

-see-also

AtaPortGetUncachedExtension