HwIdeXUseDma routine

The IDE controller driver calls the minidriver routine HwIdeXUseDma prior to an I/O operation, in order to determine whether I/O can be done by means of DMA.

Syntax

PCIIDE_USEDMA_FUNC HwIdeXUseDma;

ULONG HwIdeXUseDma(
  _In_ PVOID DeviceExtension,
  _In_ PVOID CdbCommand,
  _In_ UCHAR Subordinate
)
{ ... }

Parameters

  • DeviceExtension [in]
    Contains a pointer to the IDE controller minidriver's device extension.

  • CdbCommand [in]
    Contains a pointer to a control data block (CDB) structure containing the I/O operation to be requested.

  • Subordinate [in]
    Specifies whether the IDE device is a secondary (subordinate) or a primary (master) device. This parameter must be set to one (1) if the device is a subordinate and to zero (0) if the device is a master.

Return value

HwIdeXUseDma returns one (1) if DMA is allowed and zero (0) if DMA is not allowed.

Remarks

HwIdeXUseDma determines whether DMA is appropriate, based on the sort of command indicated in CdbCommand and the type of IDE controller chipset that the minidriver manages.

If HwIdeXUseDma returns zero, the controller driver must complete the data transfer in PIO mode instead of DMA mode.

When the controller driver calls minidriver's HwIdeXGetControllerProperties routine, it passes an IDE_CONTROLLER_PROPERTIES structure to the minidriver. The minidriver must store a pointer to HwIdeXUseDma in this structure.

Requirements

Target platform

Desktop

Header

Ide.h (include Ide.h)

See also

HwIdeXGetControllerProperties

IDE_CONTROLLER_PROPERTIES

 

 

Send comments about this topic to Microsoft