hba_idata_v4(D4I) hba_idata_v4(D4I)
NAME
hba_idata_v4 - HBA driver device instance information
structure
SYNOPSIS
#include <sys/sdi.h>
#include <sys/ddi.h>
DESCRIPTION
The hba_idata_v4 structure contains information specific to a
given instance of device supported by the HBA driver.
Typically, this information varies for each instance of the
same type of device. The hba_idata_v4 structure is used by
UnixWare 2.0 HBA drivers, and supersedes the use of
hba_idata(D4I), the instance structure for previous versions
of PDI. The hba_idata_v4 makes possible support for features
such as extended definitions of the SCSI address, multiple
SCSI channels, and autoconfiguration.
Return Values
None.
USAGE
For non-autoconfigurable HBA drivers, an array of hba_idata_v4
structures is normally defined and initialized in the
Space.c(4) file of each HBA driver. Much of the information
used to initialize the structure is generated by the kernel
configuration tools and is made available by including
config.h.
For autoconfigurable HBA drivers, the array of hba_idata_v4
structures is returned by sdi_hba_autoconf(D3I) initialized
with information from the Resource Manager (resmgr).
The version_num field must be set to 4 before calling
sdi_register(D3I). This identifies the driver as a UnixWare
2.0 driver.
The idata_ctlorder may be set to 1 by the HBA driver start
routine prior to calling sdi_register if that instance is to
be become the boot controller.
The fields idata_nbus, idata_ntargets, and idata_nluns may be
set by the HBA driver start routine prior to calling
sdi_register if values other than the defaults apply. The
default number of SCSI buses (channels) is 1, number of
Copyright 1994 Novell, Inc. Page 1
hba_idata_v4(D4I) hba_idata_v4(D4I)
targets is 8, and number of luns is 8.
The remaining fields are provided as input to the HBA driver
and provide instance configuration information.
Structure Members
The hba_idata_v4 structure is defined as follows:
/*
* Per-instance HBA information.
*/
struct hba_idata_v4 {
int version_num; /* version number to determine */
/* form of idata structure */
char *name; /* device name */
unsigned char ha_id; /* SCSI target ID of HBA card */
ulong ioaddr1; /* I/O address */
int dmachan1; /* DMA channel */
int iov; /* interrupt vector */
int cntlr; /* controller number */
int active; /* active flag */
/* New as of UnixWare 2.0: */
ulong_t idata_memaddr; /* ROM BIOS start address */
uchar_t idata_ctlorder; /* controller order (for boot, etc)*/
uchar_t idata_nbus; /* number of SCSI buses supported */
ushort_t idata_ntargets; /* number targets supported */
ushort_t idata_nluns; /* number of luns supported */
rm_key_t idata_rmkey; /* autoconfig resource manager key */
void *idata_intrcookie; /* used by cm_intr_detach() */
};
REFERENCES
hba_idata(D4I), sdi_hba_autoconf(D3I), sdi_register(D3I)
Copyright 1994 Novell, Inc. Page 2