udi_scsi_bind_cb_t(3udi)


Control block for SCSI bind operations

SYNOPSIS

#include <udi.h>

typedef struct {

	udi_cb_t gcb;

	udi_ubit16_t events;

} udi_scsi_bind_cb_t;
 
/* SCSI Events */
 
#define  UDI_SCSI_EVENT_AEN				(1U<<0)
 
#define  UDI_SCSI_EVENT_TGT_RESET				(1U<<1)
 
#define  UDI_SCSI_EVENT_BUS_RESET				(1U<<2)
 
#define  UDI_SCSI_EVENT_UNSOLICITED_RESELECT				(1U<<3)
 
/* Control Block Group Number */
 
#define UDI_SCSI_BIND_CB_NUM 1

MEMBERS gcb is a generic control block header, which includes a pointer to the scratch space associated with this control block. The driver may use the scratch space while it owns the control block, but the values are not guaranteed to persist across channel operations.

events is a set of SCSI event types. On the udi_scsi_bind_req the PD sets the events for which it wants to be notified. On the corresponding ack the HD masks off any requested events that it doesn't support, and passes back that (potentially smaller) set of events to the PD. An HD for a parallel SCSI bus must support UDI_SCSI_EVENT_TGT_RESET and UDI_SCSI_EVENT_BUS_RESET. The events field is ignored on SCSI unbind operations.

Note that if a SCSI event occurs which affects the PDs on a given LUN, any multi-lun PDs which have the event enabled will be notified along with the single-lun PDs attached to the LUN.

The following events are defined:

UDI_SCSI_EVENT_AEN - Asynchronous Event Notification. The HD will send notification to the PD when its device sends a SCSI AEN, which is typically used to send notification of out-of-band events - i.e., device events that occur outside the context of a SCSI command from this HD initiator. If the PD finds that the HD doesn't support receiving AENs (by noting that the HD has cleared this flag), then the PD must poll for events that it cares about. The PD must also poll if it determines that its device does not support SCSI AEN.

UDI_SCSI_EVENT_TGT_RESET - A reset on the SCSI target ID has occured (via a BDR or Target Reset). The HD will only deliver this event for a locally requested Target Reset (as opposed to a reset due to another initiator), and in that case it will only deliver the event to other PDs attached to the LUN than the one that requested the reset (which includes any multi-lun PDs).

UDI_SCSI_EVENT_BUS_RESET - A SCSI bus reset occurred.

UDI_SCSI_EVENT_UNSOLICITED_RESELECT - The PD's LUN generated an unsolicited re-selection.

DESCRIPTION The SCSI bind control block is used in udi_scsi_bind_req/ack and udi_scsi_unbind_req/ack operations.

In order to use this type of control block it must be associated with a control block index by including UDI_SCSI_BIND_CB_NUM in a udi_cb_init_t in the driver's udi_init_info.

REFERENCES udi_scsi_bind_req, udi_scsi_bind_ack, udi_scsi_unbind_req, udi_scsi_unbind_ack, udi_cb_alloc


UDI SCSI Driver Specification Contents