scsi_setup_cdb man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

scsi_setup_cdb(9F)	 Kernel Functions for Drivers	    scsi_setup_cdb(9F)

NAME
       scsi_setup_cdb - setup SCSI command descriptor block (CDB)

SYNOPSIS
       int  scsi_setup_cdb(union  scsi_cdb  *cdbp,  uchar_t  cmd, uint_t addr,
       uint_t cnt, uint_t othr_cdb_data);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

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 devices cnt is the number
		       of bytes. For block  devices,  cnt  is  the  number  of
		       blocks.

       othr_cdb_data   Additional CDB data.

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

       addr  should  be set to 0 for commands having no addressing information
       (for example, group 0 READ  command  for	 sequential  access  devices).
       othr_cdb_data  should be additional CDB data for Group 4 commands; oth‐
       erwise, it should be set to 0.

       The scsi_setup_cdb() 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 scsi_setup_cdb() function returns:

       1	Upon success.

       0	Upon failure.

CONTEXT
       These functions can be called from a user, interrupt,  or  kernel  con‐
       text.

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

       Writing Device Drivers

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

       American National Standard SCSI-3 Primary Commands (SPC)

SunOS 5.10			  16 Jan 2006		    scsi_setup_cdb(9F)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net