[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Understanding the Diagnostic Subsystem for AIX

pdiag_diagnose_state

Purpose

Puts the device under test into the correct state for testing.

Syntax

#include <sys/pdiag_def.h>
 
int32  pdiag_diagnose_state ( char *device_instance )

Description

The pdiag_diagnose_state subroutine unconfigures the device, and its children if necessary, to set the device into the DIAGNOSE state. Original states of all devices changed will be saved. Use pdiag_restore_state to put the changed devices back to their original states.

This function is platform-implementation specific. Its main purpose is to make sure that the target device is in the correct state for diagnostic purposes and that the Enhanced Error Handling (EEH) option is enabled during the test. If the device is already in a diagnostic state, or any state allowed by the operating system for this purpose, then this function should return a successful status value of zero. If an error occurs, then this function should return a non-zero value.

The global variable diag_cfg_errno will be set to the return value of the method invoked for the device.

Parameters

Parameter Description
device_instance Name of the device under test.

Return Value

The pdiag_diagnose_state subroutine returns one of the following values:

Return Value Description
0 Successful return.
-1 Software error.
1 Error putting device in diagnose state.
-2 EEH hardware error.

Related Information

The pdiag_diagnose_multifunc_state, pdiag_restore_state, and pdiag_restore_multifunc_state subroutines.

pdiag_diagnose_multifunc_state

Purpose

Puts a single function device, a multifunction non-bridged device, and a bridged device under test, into the correct state for testing.

Syntax

#include <sys/pdiag_def.h>
int32 pdiag_diagnose_multifunc_state (char *device_instance, int eeh_activate)

Description

The pdiag_diagnose_multifunc_state subroutine unconfigures the device, and its children if necessary, to set the device into the DIAGNOSE state. The original states of all changed devices will be saved. Use pdiag_restore_multifunc_state to put the changed devices back to their original states.

This function is platform-implementation specific. Its main purpose is to make sure that the target device is in the correct state for diagnostic purposes, and that the Enhanced Error Handling (EEH) option is enabled during test. If the device is already in a diagnostic state, or any state allowed by the operating system for this purpose, this function should return successful status. If an error occurs, this function should return a non-zero.

The global variable, diag_cfg_errno, will be set to the return value of the method invoked for the device.

Parameters

Parameter Description
device_instance Name of device under test.
eeh_activate
0
Do not enable the EEH option
1
Enable the EEH option for bridged adapters
2
Enable the EEH option for multifunction non-bridged adapters
3
Enable the EEH option for single function adapters

Return Value

The pdiag_diagnose_multifunc_state subroutine function returns one of the following values:

Return Value Description
0 Successful return
-1 Software error
1 Error putting device in diagnose state
-2 Hardware error

Related Information

The pdiag_diagnose_state, pdiag_restore_state, and pdiag_restore_multifunc_state subroutines.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]