udi_scsi_event_ind(3udi)
SCSI event notification (HD-to-PD)
#include <udi.h>void udi_scsi_event_ind ( udi_scsi_event_cb_t *cb );ARGUMENTS cb is a pointer to a SCSI event control block.
TARGET CHANNEL The target channel for this operation is the bind channel connecting a SCSI HD to its child PD.
PROXIES udi_scsi_event_ind_unused
Proxy for udi_scsi_event_ind
udi_scsi_event_ind_op_t udi_scsi_event_ind_unused;udi_scsi_event_ind_unused may be used as a PD's udi_scsi_event_ind entry point if the PD never enables any events for notification.
DESCRIPTION An HD uses the udi_scsi_event_ind operation to send an event notification to its child PD.
The HD must prepare for the udi_scsi_event_ind operation by allocating a SCSI event control block (calling udi_cb_alloc with a cb_idx that was previously associated with UDI_SCSI_EVENT_CB_NUM).
If event is UDI_SCSI_EVENT_AEN and aen_buf_size in the udi_scsi_bind_req was nonzero, the HD must also obtain an AEN buffer containing aen_buf_size valid bytes. In this case, if the size of the AEN data received from the device is greater than aen_buf_size, only the first aen_buf_size byte will be placed in the buffer; the size of the AEN data in the buffer, up to this maximum, will be indicated by the buf_size field of the buffer.
Next, the HD sends the SCSI event control block to the PD with a udi_scsi_event_ind operation. The HD does not need to wait to receive a response before sending another udi_scsi_event_ind; multiple indications may be pending at once.
Whether or not an HD supports a particular type of event notification, and whether or not the PD has enabled those events, is negotiated in the SCSI bind operations.
Note that some events (e.g., SCSI bus reset) can be triggered by a PD through control operations. The event is still sent to the PD that requested the control operation, and is sent before the control operation completes.