scm(D4I) scm(D4I)
NAME
scm, scs - Portable Device Interface (PDI) command structures
SYNOPSIS
#include <sys/scsi.h>
DESCRIPTION
Both the scm and scs structures are used by target drivers,
and with the pass-through interface to send a command to a PDI
device. The scs structure defines the layout for a group 6
(six-byte command length) command descriptor block (CDB); scm
is a group 10 (ten-byte command length) CDB. Both types of
CDBs are described in the ANSI Small Computer System Interface
(SCSI), X3T9.2/82-2, Revision 17B, December 16, 1985. Refer
to the ANSI manual for more information on individual
structure members. The sm_pad0 member ensures that the
sm_addr member does not cross a 32-bit word boundary.
USAGE
Structure Members
The members of the scm structure are:
int sm_pad0 : 16; /* 16-bit pad */
int sm_op : 8; /* Opcode */
int sm_lun : 3; /* Logical unit number */
int sm_res1 : 5; /* reserved field */
unsigned sm_addr; /* Block address */
int sm_res2 : 8; /* reserved field */
int sm_len : 16; /* Transfer length */
int sm_cont : 8; /* Control byte */
Because of the sm_pad0 member, you must add 2 to the address
of the scm structure when specifying it in the scb structure.
The members of the scs structure are:
int ss_op : 8; /* Opcode */
int ss_lun : 3; /* Logical unit number */
int ss_addr : 21; /* Block address */
int ss_len : 8; /* Transfer length */
int ss_cont : 8; /* Control byte */
Copyright 1994 Novell, Inc. Page 1