HAM_Queue_AEN_HACB (Function 0x05)

Mandatory function. Directs the HAM to monitor asynchronous hardware events such as a bus or device reset.

Remarks

This function is identified by the following information in the HACB's command area.

AEN HACBs are used to respond to events detected outside of a pending request. When events are detected because of a request, the appropriate completion status is returned in the request.

function
5
parameter0
Bitmap indicating the type of events for which the CDM wants to be notified. Currently, NWPA recognizes the following:

Value

Meaning

0x00000001

Bus reset

0x00000002

Device reset

0x00000004

Device attention

0x00000008

Adapter reset

0x00000010

Device disappeared

0x00000020

Device appeared

0x00000040

Adapter attention

0x00000080 to 0x40000000

Reserved

0x80000000

Vendor Unique AEN

parameter1
0
parameter2
0

These requests must be issued on a per device basis, meaning that the CDM provides the correct device handle for the device it wants monitored. The device handle is placed in the AEN HACB's deviceHandle field.

The CDM builds the bitmap indicating the events it wants to be informed of, places the bitmap value in the parameter0 field of the AEN HACB, and executes the request by calling CDI_Non_Blocking_Execute_HACB. This API requires the CDM to provide a pointer to a callback routine as an input parameter.

The HAM receives the AEN HACB through its HAM_Queue_AEN_HACB HAM function and maintains it in a local holding area associated with the target device until an event occurs. These AEN HACBs should not be placed in the device queue because they do not represent I/O requests that need device processing.

After an AEN event occurs, the HAM checks to see if the value in parameter0 represents an event that a CDM wants to be notified of. If so, the HAM freezes the device queue, set a bitmap value in the HACB's controlInfo field to indicate which events occurred, place the AEN code (0x80080000) in the HACB's hacbCompletion field, and complete the AEN HACB by calling HAI_Complete_HACB. The bit definitions for the return bitmap value are the same as those defined for the parameter0 field.

Bit

Meaning

Bus reset

Return this AEN when the IO bus is reset.

Device reset

Return this AEN when this device is reset.

Device attention

Return this AEN when a device requests attention, when no pending request is available to report the attention. This usually requires prior setup of the device to be capable of this feature.

Adapter reset

Return this AEN when an adapter is reset.

Device disappeared

Return this AEN when a device is known to have gone away without on outstanding request to detect it.

Device appeared

Return this AEN when a new device is known to have come online without a scan.

Adapter attention

Return this AEN when an adapter failure is detected without an outstanding request.

Vendor Unique AEN

Return this AEN when a Vendor Unique AEN occurs. See the following description.

If no CDM has registered for a specific AEN event that occurs, the queue state will not change.

The HAM must be ready to accept multiples of these requests per device. When an event occurs, the HAM should complete all AEN HACBs registered for that event for the target device.

Vendor Unique AEN HACBs

Parameter

Value

function

5

parameter0

0x80000000 Vendor Unique AEN

parameter1

novellAssignedModuleID

parameter2

Vendor-Specified Event ID

The variable parameter2 allows a vendor to communicate product-specific events with a CDM.

On completion, the MSB in controlInfo must be set to indicate vendor-specific access.

If any additional information is to be passed back, it should be placed in the buffer pointed to by vDataBufferPtr.

See Also