DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_scsi_ctl_cb_t(3udi)


Control block for SCSI control operations

SYNOPSIS

#include <udi.h>

typedef struct {

	udi_cb_t gcb;

	udi_ubit8_t ctrl_func;

	udi_ubit16_t queue_depth;

} udi_scsi_ctl_cb_t;
 
/* Values for ctrl_func */
 
#define  UDI_SCSI_CTL_ABORT_TASK_SET				1
 
#define  UDI_SCSI_CTL_CLEAR_TASK_SET				2
 
#define  UDI_SCSI_CTL_LUN_RESET				3
 
#define  UDI_SCSI_CTL_TGT_RESET				4
 
#define  UDI_SCSI_CTL_BUS_RESET				5
 
#define  UDI_SCSI_CTL_CLEAR_ACA				6
 
#define  UDI_SCSI_CTL_SET_QUEUE_DEPTH				7
 
/* Control Block Group Number */
 
#define UDI_SCSI_CTL_CB_NUM 3

MEMBERS gcb are standard members at the front of SCSI control blocks, as defined in udi_scsi_bind_cb_t.

ctrl_func is one of the following SCSI control functions:

UDI_SCSI_CTL_ABORT_TASK_SET -- Sends the appropriate interconnect-specific operation to abort all tasks in the Logical Unit's task set for the requesting initiator. This will cause the corresponding completion operations to be sent to the PD before responding with the udi_scsi_ctl_ack. On interconnects that do not support this operation, ctrl_func is typically a no-op and the status UDI_STAT_NOT_SUPPORTED is returned in the udi_scsi_ctl_ack.

UDI_SCSI_CTL_CLEAR_TASK_SET -- Sends the appropriate interconnect-specific operation to abort all tasks in the Logical Unit's task set for all initiators. This will cause the the corresponding completion operations to be sent to the PDs before responding with the udi_scsi_ctl_ack. On interconnects that do not support this operation, ctrl_func is typically a no-op and the status UDI_STAT_NOT_SUPPORTED is returned in the udi_scsi_ctl_ack.

UDI_SCSI_CTL_LUN_RESET -- Sends the appropriate interconnect-specific operation to perform a logical unit reset as defined by SAM-2. This will cause the the corresponding completion operations to be sent to the PDs before responding with the udi_scsi_ctl_ack. On interconnects that do not support this operation, ctrl_func is typically a no-op and the status UDI_STAT_NOT_SUPPORTED is returned in the udi_scsi_ctl_ack.

UDI_SCSI_CTL_TGT_RESET -- Sends the appropriate interconnect-specific operation to perform a target-level reset to the SCSI device. This will abort all I/Os outstanding on the LUNs attached to the specified SCSI target and will cause corresponding completion operations to be sent to the PD before responding with the udi_scsi_ctl_ack.

UDI_SCSI_CTL_BUS_RESET -- Reset the SCSI bus (parallel SCSI only) associated with this SCSI device. This will abort all I/Os outstanding on the bus and will cause corresponding completion operations to be sent to the PD before responding with the udi_scsi_ctl_ack. On serial SCSI links this ctrl_func is typically a no-op and the status UDI_STAT_NOT_SUPPORTED is returned in the udi_scsi_ctl_ack.

UDI_SCSI_CTL_CLEAR_ACA -- Clear auto-contingent- allegiance condition at the SCSI device.

UDI_SCSI_CTL_SET_QUEUE_DEPTH -- Change the maximum number of commands the HD is allowed to have pending to the device on behalf of this PD simultaneously. This takes effect with respect to subsequent requests received from the PD. QUEUE FULL conditions are handled by the PD.

queue_depth is the maximum number of commands the HD is allowed to have pending to the device simultaneously. Used only with UDI_SCSI_CTL_SET_QUEUE_DEPTH.

DESCRIPTION The control block for SCSI Control operations is used between the PD and HD to process a SCSI Control request.

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

REFERENCES udi_scsi_ctl_req, udi_scsi_ctl_ack, udi_cb_alloc


UDI SCSI Driver Specification Contents