eeh_enable_dma Kernel Service

Purpose

This service enables DMA operations to an adapter after an EEH event.

Syntax

#include <sys/eeh.h>

long eeh_enable_dma(handle)
eeh_handle_t handle;

Parameters

Item Description
handle EEH handle obtained from theeeh_init or eeh_init_multifunc kernel services

Description

When an EEH event occurs on a slot, all Direct Memory Access (DMA) operations on the slot are inhibited. This service should be called to re-enable DMA after an EEH event. This service can only be called from the dump context (that is, when the dump is in progress).

Single-function Drivers: This service enables the DMA operations on a slot. If this call fails with EEH_FAIL, an error is logged by the kernel.

Multifunction Drivers: On the multifunction adapters, the slot state must be either SUSPEND or DEBUG, and the caller must be an EEH_MASTER. This service is called only from a dump context. While a system dump is in progress, all callbacks and broadcasts are suspended, and a multifunction adapter is treated like a single-function adapter, because the system can no longer support the EEH multifunction kernel services. If the service fails, EEH_FAIL is returned. If the failure is due to hardware or firmware, an error is logged.

There are cases when this kernel service cannot succeed because of the platform state restrictions. In such a case, if a driver calls it, the service would return EEH_FAIL. This causes the slot to be marked permanently unavailable, which is not correct because the slot can be recovered. To avoid receiving EEH_FAIL from this service, the driver should supply the EEH_ENABLE_NO_SUPPORT_RC flag at eeh_init_multifunc() time. If the EEH_ENABLE_NO_SUPPORT_RC flag is supplied, eeh_enable_dma() returns EEH_NO_SUPPORT, indicating to the drivers that they cannot collect debug data but must continue with the next step in recovery.

The macro EEH_ENABLE_DMA(handle) is provided for device drivers to call this service.

Execution Environment

This kernel service can only be called from a process or interrupt environment.

Return Values

This kernel service has no return values.