1scsi_hba_init(9F)        Kernel Functions for Drivers        scsi_hba_init(9F)
2
3
4

NAME

6       scsi_hba_init, scsi_hba_fini - SCSI Host Bus Adapter system initializa‐
7       tion and completion routines
8

SYNOPSIS

10       #include <sys/scsi/scsi.h>
11
12
13
14       int scsi_hba_init(struct modlinkage *modlp);
15
16
17       void scsi_hba_fini(struct modlinkage *modlp);
18
19

INTERFACE LEVEL

21       Solaris architecture specific (Solaris DDI).
22

PARAMETERS

24       modlp     Pointer to the Host Bus Adapters module linkage structure.
25
26

DESCRIPTION

28   scsi_hba_init()
29       scsi_hba_init() is the system-provided initialization routine for  SCSI
30       HBA  drivers.   The  scsi_hba_init()  function registers the HBA in the
31       system and allows the driver to accept configuration requests on behalf
32       of  SCSI  target drivers. The scsi_hba_init() routine must be called in
33       the HBA's  _init(9E)  routine  before  mod_install(9F)  is  called.  If
34       mod_install(9F)  fails, the HBA's _init(9E) should call scsi_hba_fini()
35       before returning failure.
36
37   scsi_hba_fini()
38       scsi_hba_fini() is the system provided completion routine for SCSI  HBA
39       drivers.  scsi_hba_fini()  removes all of the system references for the
40       HBA that were created in scsi_hba_init(). The  scsi_hba_fini()  routine
41       should  be  called  in the HBA's _fini(9E) routine if mod_remove(9F) is
42       successful.
43

RETURN VALUES

45       scsi_hba_init() returns 0 if successful, and a  non-zero  value  other‐
46       wise.  If  scsi_hba_init()  fails, the HBA's _init() entry point should
47       return the value returned by scsi_hba_init().
48

CONTEXT

50       scsi_hba_init() and scsi_hba_fini() should be called from _init(9E)  or
51       _fini(9E), respectively.
52

SEE ALSO

54       _fini(9E),   _init(9E),  mod_install(9F),  mod_remove(9F),  scsi_pktal‐
55       loc(9F), scsi_pktfree(9F), scsi_hba_tran(9S)
56
57
58       Writing Device Drivers
59

NOTES

61       The HBA is responsible for ensuring that no DDI  request  routines  are
62       called  on  behalf  of  its SCSI target drivers once scsi_hba_fini() is
63       called.
64
65
66
67SunOS 5.11                        1 Nov 1993                 scsi_hba_init(9F)
Impressum