DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sdi_hba_xfreeblk(D3sdi)


sdi_hba_xfreeblk -- release a previously allocated sdi_ext_address(D4sdi) structure

Synopsis

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

int sdi_hba_xfreeblk(int hbaflag, struct sb *sbp);

Description

sdi_hba_xfreeblk( ) returns an sdi_extended_adr D4sdi extended address block to the free block pool. This routine is used in drivers that are written for HBAs that support the extended SCSI addressing scheme.

Arguments


hbaflag
Must be initialized to HBA_EXT_ADDRESS.

sbp
Pointer to the sb(D4sdi) command block structure.

Return values

On success, sdi_hba_xfreeblk( ) returns SDI_RET_OK. A return value of SDI_RET_ERR indicates an error with the pointer.

Usage

sdi_hba_xfreeblk( ) is typically used after a job completes.

Context and synchronization

Non-blockable context. context in HDK Technical Reference.

Hardware applicability

All

Version applicability

sdi: 4 HBA drivers

References

sb(D4sdi), sdi_extended_adr(D4sdi), sdi_xgetblk(D3sdi)

``Extended SCSI addressing scheme'' in HDK Technical Reference

Examples

In this example, diskfreejob( ) cleans up after a disk job completese and is called with a pointer to the job structure. The job structure contains information about the disk job, including a pointer to the sb structure for the job. sdi_hba_xfreeblk( ) is called with the pointer to the job structure as part of the cleanup operation, to return the previously allocated job structure to the SDI subsystem. If sdi_hba_xfreeblk( ) does not return SDI_RET_OK, the code calls the cmn_err(D3) structure to print an error message.
   struct job {
   	struct sb *j_sbptr;
   	...
   }
   diskfreejob(jp) struct job *jp; {
   	...
   

if(sdi_hba_xfreeblk(HBA_EXT_ADDRESS, jp->j_sbptr) != SDI_RET_OK) { cmn_err(CE_WARN, "DISK: SB rejected by SDI."); } ... }


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005