DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sdi_gethbano(D3sdi)


sdi_gethbano -- get/validate host bus adapter controller number

Synopsis

   #include <sys/sdi.h>

int sdi_gethbano(int cntlnum);

Description

sdi_gethbano is typically called by the start(D2sdi) entry point routines of HBA drivers to obtain a controller number for later use by sdi_register(D3sdi).

If cntlnum is negative, sdi_gethbano( ) returns the next available controller number. Non-negative values of cntlnum are checked for validity. In this case, sdi_gethbano( ) returns cntlnum if valid or a negative value if not.

Arguments


cntlnum
requested HBA controller number

Return values

A positive return value represents a valid and available controller number. A negative value indicates that the requested controller number is either invalid or unavailable, or there are no available numbers to allocate.

Usage

The sdi_gethbano( ) function returns the external HBA number that is used by the system to generate the node name. The HBA driver needs this number to generate the mapping from the external number to its own internal controller number.

Context and synchronization

Initialization context.

Applicable hardware

All

Version applicability

sdi: 1, 2, 3 HBA drivers.

Differences between versions

For SDI version 4 drivers, this functionality is provided by the sdi_idata_alloc(D3sdi). When sdi_idata_alloc( ) returns, the cntrl member of the hba_idata_v5(D4sdi) structure is set with a valid HBA number that is assigned by SDI.

References

sdi_register(D3sdi) { return ((struct sb_extra *)sbp->SCB.sc_extra)->sb_idatap; }
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005