DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sb(D4sdi)


sb -- define the command block structure

Synopsis

   #include <sys/types.h>
   #include <sys/sdi.h>
   #include <sys/ddi.h>

Description

The sb structure defines the command block, which can be either an scb(D4sdi) structure or an sfb(D4sdi) structure. The sb_type member indicates whether the sb structure contains an scb(D4sdi) (control block) or an sfb(D4sdi) (function block) structure.

Structure definition

The sb structure is defined as follows:
   unsigned long    sb_type;
   union{
     struct scb     b_scb;
     struct sfb     b_sfb;
   }sb_b;

Structure members


sb_type
Indicates whether the sb_b structure is an scb or an sfb. structure. Values can be:

ISCB_TYPE
sb_b is an immediate scb(D4sdi); used with sdi_icmd(D3sdi).

SCB_TYPE
sb_b is an scb(D4sdi); used with the sdi_send(D3sdi) and sdi_xsend(D3sdi) functions.

SFB_TYPE
sb_b is an sfb(D4sdi); used with the sdi_icmd(D3sdi) and sdi_xicmd(D3sdi) functions.

b_scb
The scb(D4sdi) SCSI control block structure.

b_sfb
The sfb(D4sdi) SCSI function block structure

Usage

Use the sb structure when you call an SDI function that sends a request to a SDI device with the sdi_send(D3sdi), sdi_xsend(D3sdi), sdi_icmd(D3sdi), or sdi_xicmd(D3sdi) function.

The sb structure itself was frozen at SDI version 1. Beginning with SDI version 2, the sb_extra structure supplements the sb structure; members that need to be added to support new functionality are added to the sb_extra structure. The members of the sb_extra structure should never be accessed directly by an SDI driver, but should be accessed through the kernel functions defined for each.

The method for using the sb structure is:

  1. Use the sdi_getblk(D3sdi) or sdi_xgetblk(D3sdi) function to allocate a command block.

  2. Set the sb_type member appropriately.

  3. Assign values to the other members of the structure as appropriate.

  4. Call the appropriate function to send the data structure.

See scb(D4sdi) and sfb(D4sdi) for more information on structure use.

The target driver must only allocate a command block using sdi_getblk(D3sdi).

If one sb structure is copied, the new structure must be processed with the sdi_translate(D3sdi) or sdi_xtranslate(D3sdi) function.

Applicable hardware

All.

Version applicability

sdi: 2, 3, 4

Differences between versions

The sb_bufp member was added in SVR5 for SDI version 4.

References

hbadata(D4sdi), owner(D4sdi), scb(D4sdi), sdi_buf_ptr(D3sdi), sdi_getblk(D3sdi), sdi_icmd(D3sdi), sdi_send(D3sdi), sdi_translate(D3sdi), sdi_xicmd(D3sdi), sdi_xsend(D3sdi), sdi_xtranslate(D3sdi), sfb(D4sdi), xsb(D4sdi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005