sfb(D4sdi)
sfb --
function block structure
Synopsis
#include <sys/sdi.h>
Description
sfb is the SDI function block
that serves as a mechanism for sending control information
from a target driver to the host adapter or to a SDI device.
The
scb(D4sdi)
is sent to the device; the sfb is generally
sent to all other receiving entities.
Structure definition
The sfb structure is defined as follows:
unsigned long sf_comp_code;
void (*sf_int)();
struct scsi_ad sf_dev;
unsigned long sf_func;
int sf_wd;
Structure members
sf_comp_code-
Job completion code. See
sc_comp_code(D5sdi)
for a complete list of supported values.
This is identical to the sc_comp_code in the
scb(D4sdi)
structure and it takes on the same values.
sf_int-
Pointer to a target driver's
intr(D2sdi)
entry point routine.
This is identical to the
sc_int
member
in the scb structure.
sf_dev-
Device address (an instance of the
scsi_ad(D4sdi)
structure).
This is identical to the
sc_dev
member
in the scb structure.
sf_func
-
Indicates the operation to be performed.
The following commands are required
for all devices:
SFB_ABORTM-
Send an abort message to the addressed logical unit.
SFB_FLUSHR-
Flush the HBA's logical queue unit.
SFB_NOPF-
The target driver is not to perform an operation.
SFB_RESETM-
Send a bus device reset message to the
addressed controller.
SFB_RESUME-
Permit normal job flow to a logical unit.
This command is used after SFB_SUSPEND,
but no error results if SFB_RESUME is
called first.
SFB_SUSPEND-
Suspend a queue.
This indicates
that normal job flow to the logical unit is halted until the queue is
resumed by the target driver.
The following commands are required
only for devices that support the hot/add removal feature;
see
``SDI peripheral hot add/remove'' in HDK Technical Reference.
These commands are ignored unless the HBA_HOT flag
is set for the
hba_info(D4sdi)
structure.
SFB_ADD_DEV-
Add the device specified in the
sb(D4sdi).
The driver should prepare any structures or queues
to accept commands for this device.
It should fail if a device is already at this address
or it is unable to initialize the structures.
SFB_RM_DEV-
Remove the device specified in the sb.
The driver should flush any cache on the controller.
The driver should invalidate or remove
any structures for this device.
It should fail if the device is not present
or if there are any pending jobs to that device.
SFB_PAUSE-
Stop sending jobs to the controller
and do not return until all jobs sent
to the controller have returned.
SFB_CONTINUE-
Resume sending jobs to the controller.
sf_wd
-
Target driver word.
This member is not examined or changed by SDI;
you can use this member for any purpose.
Usage
An sfb is sent to the device when an
abort or reset message is required.
(Abort and reset messages have a different protocol than do the
commands sent to the SDI device with a CDB.)
Applicable hardware
All.
Version applicability
sdi: 2, 3, 4
References
icmd(D2sdi),
sc_comp_code(D5sdi),
scb(D4sdi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005