MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                   scsisetupcdb(9F)



NAME
     scsisetupcdb - setup SCSI command descriptor block (CDB)

SYNOPSIS
     int scsisetupcdb(union scsicdb *cdbp, uchart cmd, uintt addr,
          uintt cnt, uintt othrcdbdata);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

PARAMETERS
     cdbp             Pointer to command descriptor block.


     cmd              The first byte of the SCSI group 0,  1,  2,
                      4, or 5 CDB.


     addr             Pointer to the location of the data.


     cnt              Data transfer length in  units  defined  by
                      the  SCSI  device type. For sequential dev-
                      ices cnt is the number of bytes. For  block
                      devices, cnt is the number of blocks.


     othrcdbdata    Additional CDB data.


DESCRIPTION
     The scsisetupcdb() function initializes a group 0,  1,  2,
     4, or 5 type of command descriptor block pointed to by  cdbp
     using cmd, addr, cnt, othrcdbdata.


     addr should be set to 0 for commands  having  no  addressing
     information  (for  example, group 0 READ command for sequen-
     tial access devices). othrcdbdata should be additional CDB
     data for Group 4 commands; otherwise, it should be set to 0.


     The scsisetupcdb() function does not set the LUN  bits  in
     CDB[1]  as  the   makecom(9F) functions do.  Also, the fixed
     bit for sequential access device commands is not set.

RETURN VALUES
     The scsisetupcdb() function returns:

     1    Upon success.




SunOS 5.11          Last change: 16 Jan 2006                    1






Kernel Functions for Drivers                   scsisetupcdb(9F)



     0    Upon failure.


CONTEXT
     These functions can be called from  a  user,  interrupt,  or
     kernel context.

SEE ALSO
     makecom(9F), scsipkt(9S)


     Writing Device Drivers


     American National Standard Small Computer System Interface-2
     (SCSI-2)


     American National Standard SCSI-3 Primary Commands (SPC)




































SunOS 5.11          Last change: 16 Jan 2006                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™