This kernel service enables programmed I/O (PIO or MMIO) to an adapter after an EEH event.
#include <sys/eeh.h>
long eeh_enable_pio(handle)
eeh_handle_t handle;
Item | Description |
---|---|
handle | EEH handle obtained from the eeh_init or eeh_init_multifunc kernel services |
When an EEH event occurs on a slot, all load and store operations (such as PIO) are inhibited. This kernel service should be called to re-enable PIO after an EEH event.
Single-function Drivers: This kernel service enables the load and store 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 state of the slot is checked for either SUSPEND or DEBUG. The caller must be an EEH_MASTER. If the state is SUSPEND, a series of device driver callback routines is executed with a command option of EEH_DD_DEBUG and flag set to EEH_DD_PIO_ENABLED. The callbacks inform device drivers that PIO has been enabled and that further debug procedures can be executed (such as reading command and status register). This service can be called as a result of the EEH_DD_SUSPEND or EEH_DD_DEBUG callback message as many times as needed by the EEH_MASTER. Additional calls to this service trigger a new set of callbacks. If this 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 due to the platform state restrictions. In such a case, if a driver calls it, the kernel service would return EEH_FAIL followed by a EEH_DD_DEAD message. 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_pio() 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_CLEAR(handle) is provided for device drivers to call this service. This service is called via a function pointer in the EEH handle.
This kernel service can be called from the process or interrupt environment.
Item | Description |
---|---|
EEH_SUCC | PIO successfully enabled. |
EEH_FAIL | Invalid call or could not enable PIO. |
EEH_NO_SUPPORT | Call is valid according to AIX® EEH state, but current platform state precludes normal completion. |