eeh_slot_error Kernel Service

Purpose

This service logs a temporary or permanent error and optionally marks the slot permanently unavailable.

Syntax

#include <sys/eeh.h>

long eeh_slot_error(handle, flag, dd_buf, dd_buf_length)
eeh_handle_t    handle;
int             flag;
char           *dd_buf;
long            dd_buf_length;

Parameters

Item Description
handle EEH handle obtained from eeh_init or eeh_init_multifunc
flag EEH_RESET_TEMP or EEH_RESET_PERM
dd_buf Address of the device driver's error log buffer
dd_buf_length Length of device driver's error log buffer in bytes

Description

This service performs a number of tasks:

The behavior of this kernel service is controlled by two flag values:

Item Description
EEH_RESET_TEMP This flag performs only the first two of the preceding tasks..
EEH_RESET_PERM This flag performs all three tasks.

Depending on the hardware state of the slot, this service might not be able to collect the hardware data. Thus, the service succeeds but logs no data. If EEH_RESET_PERM was supplied, it still marks the slot permanently unavailable.

The dd_buf and dd_buf_length parameters are used to combine the device driver error log with the hardware log. The dd_buf argument is the address of an error log buffer containing the device driver's data. The dd_buf_length argument is the length of this buffer. If the length exceeds 1024 bytes in AIX® 5.1/AIX 5.2 and MAX_DD_LOG_SIZE bytes in AIX 5.3 and above, the driver's log data will be truncated. If dd_buf is NULL, the error log will only contain hardware data, if any.

Single-function Driver: The kernel service works as in the preceding description. If it fails because of hardware or firmware reasons, EEH_FAIL is returned and an error is logged.

Multifunction Driver: For the multifunction drivers, this service works as in the preceding description, except that if EEH_RESET_PERM was supplied, the EEH_DD_DEAD message is broadcast.

The macro EEH_SLOT_ERROR(handle, flag, dd_buf, dd_buf_length) is provided for device drivers to call this service.

Execution Environment

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

Return Values

Item Description
EEH_SUCC Successfully logged error
EEH_FAIL Failed to log the error and optionally mark the slot permanently unavailable