summaryrefslogtreecommitdiff
path: root/usr/src/man/man9f/scsi_hba_init.9f
blob: c0f97c1dab53264ab6f8e958527a5977d876fe66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
'\" te
.\"  Copyright (c) 1993, Sun Microsystems, Inc.,  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH SCSI_HBA_INIT 9F "Nov 1, 1993"
.SH NAME
scsi_hba_init, scsi_hba_fini \- SCSI Host Bus Adapter system initialization and
completion routines
.SH SYNOPSIS
.LP
.nf
#include <sys/scsi/scsi.h>



\fBint\fR \fBscsi_hba_init\fR(\fBstruct modlinkage *\fR\fImodlp\fR);
.fi

.LP
.nf
\fBvoid\fR \fBscsi_hba_fini\fR(\fBstruct modlinkage *\fR\fImodlp\fR);
.fi

.SH INTERFACE LEVEL
.sp
.LP
Solaris architecture specific (Solaris DDI).
.SH PARAMETERS
.sp
.ne 2
.na
\fB\fImodlp\fR \fR
.ad
.RS 10n
Pointer to the Host Bus Adapters module linkage structure.
.RE

.SH DESCRIPTION
.SS "\fBscsi_hba_init()\fR"
.sp
.LP
\fBscsi_hba_init()\fR is the system-provided initialization routine for
\fBSCSI\fR \fBHBA\fR drivers.  The \fBscsi_hba_init()\fR function registers the
\fBHBA\fR in the system and allows the driver to accept configuration requests
on behalf of \fBSCSI\fR target drivers. The \fBscsi_hba_init()\fR routine must
be called in the \fBHBA\fR's \fB_init\fR(9E) routine before
\fBmod_install\fR(9F) is called. If \fBmod_install\fR(9F) fails, the
\fBHBA\fR's \fB_init\fR(9E) should call \fBscsi_hba_fini()\fR before returning
failure.
.SS "\fBscsi_hba_fini()\fR"
.sp
.LP
\fBscsi_hba_fini()\fR is the system provided completion routine for \fBSCSI\fR
\fBHBA\fR drivers. \fBscsi_hba_fini()\fR removes all of the system references
for the \fBHBA\fR that were created in \fBscsi_hba_init()\fR. The
\fBscsi_hba_fini()\fR routine should be called in the \fBHBA\fR's
\fB_fini\fR(9E) routine if \fBmod_remove\fR(9F) is successful.
.SH RETURN VALUES
.sp
.LP
\fBscsi_hba_init()\fR returns \fB0\fR if successful, and a non-zero value
otherwise. If \fBscsi_hba_init()\fR fails, the HBA's \fB_init()\fR entry point
should return the value returned by \fBscsi_hba_init()\fR.
.SH CONTEXT
.sp
.LP
\fBscsi_hba_init()\fR and \fBscsi_hba_fini()\fR should be called from
\fB_init\fR(9E) or \fB_fini\fR(9E), respectively.
.SH SEE ALSO
.sp
.LP
\fB_fini\fR(9E), \fB_init\fR(9E), \fBmod_install\fR(9F), \fBmod_remove\fR(9F),
\fBscsi_pktalloc\fR(9F), \fBscsi_pktfree\fR(9F), \fBscsi_hba_tran\fR(9S)
.sp
.LP
\fIWriting Device Drivers\fR
.SH NOTES
.sp
.LP
The \fBHBA\fR is responsible for ensuring that no \fBDDI\fR request routines
are called on behalf of its \fBSCSI\fR target drivers once
\fBscsi_hba_fini()\fR is called.