makecom_g1 man page on SmartOS

Printed from http://www.polarhome.com/service/man/?qf=makecom_g1&af=0&tf=2&of=SmartOS

MAKECOM(9F)							   MAKECOM(9F)

NAME
       makecom,	 makecom_g0,  makecom_g0_s,  makecom_g1,  makecom_g5  - make a
       packet for SCSI commands

SYNOPSIS
       #include <sys/scsi/scsi.h>

       void makecom_g0(struct scsi_pkt *pkt, struct scsi_device *devp,
	    int flag, int cmd, int addr, int cnt);

       void makecom_g0_s(struct scsi_pkt *pkt, struct scsi_device *devp,
	    int flag, int cmd, int cnt, int fixbit);

       void makecom_g1(struct scsi_pkt *pkt, struct scsi_device *devp,
	    int flag, int cmd, int addr, int cnt);

       void makecom_g5(struct scsi_pkt *pkt, struct scsi_device *devp,
	    int flag, int cmd, int addr, int cnt);

INTERFACE LEVEL
       These  interfaces  are  obsolete.  scsi_setup_cdb(9F)  should  be  used
       instead.

PARAMETERS
       pkt
		 Pointer to an allocated scsi_pkt(9S) structure.

       devp
		 Pointer to the target's scsi_device(9S) structure.

       flag
		 Flags for the pkt_flags member.

       cmd
		 First byte of a group 0 or 1 or 5 SCSI 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.

       fixbit
		 Fixed bit in sequential access device commands.

DESCRIPTION
       The  makecom  functions	initialize a packet with the specified command
       descriptor block, devp and transport flags. The pkt_address, pkt_flags,
       and the command descriptor block pointed to by pkt_cdbp are initialized
       using the remaining arguments. Target drivers may use makecom_g0()  for
       Group  0	 commands  (except  for	 sequential  access devices), or make‐
       com_g0_s() for Group 0 commands for sequential access devices, or make‐
       com_g1()	 for  Group 1 commands,	 or makecom_g5() for Group 5 commands.
       fixbit is used by sequential access devices for accessing  fixed	 block
       sizes and sets the tag portion of the SCSI CDB.

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

EXAMPLES
       Example 1 Using makecom Functions

	 if (blkno >= (1<<20)) {
	       makecom_g1(pkt, SD_SCSI_DEVP, pflag, SCMD_WRITE_G1,
		  (int) blkno, nblk);
	 } else {
	       makecom_g0(pkt, SD_SCSI_DEVP, pflag, SCMD_WRITE,
		  (int) blkno, nblk);
	 }

ATTRIBUTES
       See attributes(5) for a description of the following attributes:

       ┌────────────────┬─────────────────┐
       │ATTRIBUTE TYPE	│ ATTRIBUTE VALUE │
       ├────────────────┼─────────────────┤
       │Stability Level │ Obsolete	  │
       └────────────────┴─────────────────┘

SEE ALSO
       attributes(5), scsi_setup_cdb(9F), scsi_device(9S), scsi_pkt(9S)

       ANSI Small Computer System Interface-2 (SCSI-2)

       Writing Device Drivers

NOTES
       The  makecom_g0(), makecom_g0_s(), makecom_g1(), and makecom_g5() func‐
       tions are obsolete and will be discontinued in a future release.	 These
       functions  have	been  replaced	by  the scsi_setup_cdb() function. See
       scsi_setup_cdb(9F).

				 Jan 16, 2006			   MAKECOM(9F)
[top]

List of man pages available for SmartOS

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