DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sdi_xgetbcb(D3sdi)


sdi_xgetbcb -- get a breakup control block for the HBA device

Synopsis

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

bcb_t *sdi_xgetbcb(int hbaflag, struct scsi_ad *addr, int flag)

Description

sdi_xgetbcb( ) allocates bcb(D4) breakup control block structures and call the HBA's getinfo(D2sdi) entry point routine, which initializes the breakup control blocks.

Arguments


hbaflag
Initialize to HBA_EXT_ADDRESS for drivers that understand extended SCSI addressing, or to 0 for drivers that only understand conventional SCSI addressing.

addr
Pointer to the SCSI address of the device.

flag
Indicates whether the allocation may sleep or not, and is set to either KM_SLEEP or KM_NOSLEEP.

Return values

Upon success, sdi_xgetbcb( ) returns the address of the initialized breakup control block. A NULL return indicates failure.

Usage

The sdi_xgetbcb( ) function is called by the target drivers when a new device is claimed by the target drivers. The pointer to the allocated breakup control block, bcb(D4), is passed to the bcbp member of the hbagetinfo(D4sdi) structure.

sdi_xgetbcb( ) also calls physreq_alloc(D3) to get a physreq(D4) physical requirements structure, and initializes the bcb_physreqp member with the pointer to the structure.

The bcb(D4) and physreq(D4) structures are freed using the sdi_freebcb(D3sdi) function.

Context and synchronization

If flag is set to KM_NOSLEEP, non-blockable, initialization, or interrupt context.

If flag is set to KM_SLEEP, user context.

Hardware applicability

All

Version applicability

sdi: 4 target and HBA drivers

Differences between versions

SDI versions prior to SDI version 4 use the sdi_getbcb( ) function, which cannot be used with extended SCSI addresses, rather than sdi_xgetbcb( ). The syntax is:
   bcb_t *sdi_getbcb(struct scsi_ad *addr, int flag)

References

bcb(D4), getinfo(D2sdi), hbagetinfo(D4sdi), physreq(D4), physreq_alloc(D3), sdi_freebcb(D3sdi)

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


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