DOC HOME
SITE MAP
MAN PAGES
GNU INFO
SEARCH
PRINT BOOK
config(D2sdi)
config -- inform drivers of hardware device instances to be managed
Synopsis
See
config
(D2)
for synopsis and general usage information about this entry point.
Usage
All DDI 8 HBA, target, and layered drivers must have a
config
(D2)
entry point routine with the
CFG_ADD
subfunction coded.
HBA drivers
Most DDI 8 HBA drivers need to support hotplug functionality and so need to include code for several subfunctions.
Typical coding includes:
CFG_ADD
subfunction
Call the
sdi_idata_alloc
(D3sdi)
function to allocate and initialize an
hba_idata_v5
(D4sdi)
structure.
Allocate locking structures for all synchronization primitives that are used globally within this instance of the driver.
Call the
cm_intr_attach
(D3)
function to attach interrupts for this device.
If necessary, set the number of buses, targets, and LUNs. Otherwise, default values will be used.
Extract the value of the HBA's target ID and put it in the
hba_idata_v5
structure.
If necessary, populate members of the
hba_idata_v5
structure.
Call the
sdi_register
(D3sdi)
function to register the HBA devices with SDI.
Call the
sdi_enable_instance
(D3sdi)
function to notify SDI of any device instances that are not ready to accept I/O requests. This is generally the last call in the CFG_ADD subfunction.
CFG_SUSPEND
subfunction
Call the
cm_intr_detach
(D3)
function to detach interrupts.
Set the
idata_intrcookie
member of the
hba_idata_v5
(D4sdi)
structure to
NULL
so that the
cm_intr_detach
( ) function will not be called multiple times.
Suspend all I/O to the HBA device.
CFG_RESUME
subfunction
Call the
cm_intr_attach
(D3)
function to attach interrupts.
Verify that the board's SCSI ID and number of devices supported matches what is in the
hba_idata_v5
(D4sdi)
structure.
Restart I/O to the HBt device.
CFG_REMOVE
subfunction
Fail all pending jobs.
Call the
sdi_deregister
(D3sdi)
function to deregister the HBA with the SDI.
If the call to
sdi_deregister
( ) is successful, free all resources, including queues, pointers, and memory that were allocated for this driver.
If the call to
sdi_deregister
( ) is successful, call the
sdi_idata_free
(D3sdi)
function to free the
hba_idata_v5
(D4sdi)
structure.
Free the logical unit queues and the memory that was allocated for them.
CFG_MODIFY
subfunction
Call the
sdi_idata_modify
(D3sdi)
function to modify the
hba_idata_v5
(D4sdi)
structure to match the current hardware configuration.
CFG_VERIFY
subfunction
The
CFG_VERIFY
subfunction is coded according to the guidelines in
config
(D2)
.
Applicable hardware
All
Version applicability
sdi:
4 HBA, target, and layered drivers with DDI 8.
References
config
(D2)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005