Print this page
4888 Undocument dma_req(9s)
4884 EOF scsi_hba_attach
4886 EOF ddi_dmae_getlim
4887 EOF ddi_iomin
4634 undocument scsi_hba_attach() and ddi_dma_lim(9s)
4630 clean stale references to ddi_iopb_alloc and ddi_iopb_free
*** 1,13 ****
'\" te
.\" Copyright (c) 2006 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_ATTACH_SETUP 9F "May 30, 2006"
.SH NAME
! scsi_hba_attach_setup, scsi_hba_attach, scsi_hba_detach \- SCSI HBA attach and
detach routines
.SH SYNOPSIS
.LP
.nf
#include <sys/scsi/scsi.h>
--- 1,14 ----
'\" te
.\" Copyright (c) 2006 Sun Microsystems, Inc., All Rights Reserved
+ .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
.\" 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_ATTACH_SETUP 9F "May 24, 2014"
.SH NAME
! scsi_hba_attach_setup, scsi_hba_detach \- SCSI HBA attach and
detach routines
.SH SYNOPSIS
.LP
.nf
#include <sys/scsi/scsi.h>
*** 18,33 ****
\fBscsi_hba_tran_t *\fR\fIhba_tran\fR, \fBint\fR \fIhba_flags\fR);
.fi
.LP
.nf
- \fBint\fR \fBscsi_hba_attach\fR(\fBdev_info_t *\fR\fIdip\fR, \fBddi_dma_lim_t *\fR\fIhba_lim\fR,
- \fBscsi_hba_tran_t *\fR\fIhba_tran\fR, \fBint\fR \fIhba_flags\fR, \fBvoid *\fR\fIhba_options\fR);
- .fi
-
- .LP
- .nf
\fBint\fR \fBscsi_hba_detach\fR(\fBdev_info_t *\fR\fIdip\fR);
.fi
.SH INTERFACE LEVEL
.sp
--- 19,28 ----
*** 45,63 ****
.RE
.sp
.ne 2
.na
- \fB\fIhba_lim\fR\fR
- .ad
- .RS 16n
- Pointer to a \fBddi_dma_lim\fR(9S) structure.
- .RE
-
- .sp
- .ne 2
- .na
\fB\fIhba_tran\fR\fR
.ad
.RS 16n
Pointer to a \fBscsi_hba_tran\fR(9S) structure.
.RE
--- 40,49 ----
*** 91,119 ****
Pointer to a \fBddi_dma_attr\fR(9S) structure.
.RE
.SH DESCRIPTION
.sp
! .LP
! The \fBscsi_hba_attach_setup()\fR function is the recommended interface over
! the \fBscsi_hba_attach()\fR function.
! .SS "scsi_hba_attach_setup(\|) scsi_hba_attach(\|)"
.sp
.LP
! The \fBscsi_hba_attach()\fR function registers the \fIhba_lim\fR DMA limits and
! the \fIhba_tran\fR transport vectors of each instance of the HBA device defined
! by \fIdip\fR. The \fBscsi_hba_attach_setup()\fR function registers the
\fIhba_dma_attr\fR DMA attributes and the \fIhba_tran\fR transport vectors of
each instance of the HBA device defined by \fIdip\fR. The HBA driver can pass
! different DMA limits or DMA attributes and the transport vectors for each
instance of the device to support any constraints imposed by the HBA itself.
.sp
.LP
! The \fBscsi_hba_attach()\fR and \fBscsi_hba_attach_setup()\fR functions use the
\fBdev_bus_ops\fR field in the \fBdev_ops\fR(9S) structure. The HBA driver
should initialize this field to \fINULL\fR before calling
! \fBscsi_hba_attach()\fR or \fBscsi_hba_attach_setup()\fR.
.sp
.LP
If \fBSCSI_HBA_TRAN_CLONE\fR is requested in \fIhba_flags\fR, the
\fBhba_tran\fR structure is cloned once for each target that is attached to the
HBA. The structure is cloned before the \fBtran_tgt_init\fR(9E) entry point is
--- 77,100 ----
Pointer to a \fBddi_dma_attr\fR(9S) structure.
.RE
.SH DESCRIPTION
.sp
! .SS "scsi_hba_attach_setup(\|)"
.sp
.LP
! The \fBscsi_hba_attach_setup()\fR function registers the
\fIhba_dma_attr\fR DMA attributes and the \fIhba_tran\fR transport vectors of
each instance of the HBA device defined by \fIdip\fR. The HBA driver can pass
! different DMA attributes and the transport vectors for each
instance of the device to support any constraints imposed by the HBA itself.
.sp
.LP
! The \fBscsi_hba_attach_setup()\fR function uses the
\fBdev_bus_ops\fR field in the \fBdev_ops\fR(9S) structure. The HBA driver
should initialize this field to \fINULL\fR before calling
! \fBscsi_hba_attach_setup()\fR.
.sp
.LP
If \fBSCSI_HBA_TRAN_CLONE\fR is requested in \fIhba_flags\fR, the
\fBhba_tran\fR structure is cloned once for each target that is attached to the
HBA. The structure is cloned before the \fBtran_tgt_init\fR(9E) entry point is
*** 130,140 ****
The flags \fBSCSI_HBA_TRAN_CDB\fR and \fBSCSI_HBA_TRAN_SCB\fR are only valid
when \fBtran_setup_pkt()\fR is used. See \fBtran_setup_pkt\fR(9E) for
information on using these flags.
.sp
.LP
! The \fBscsi_hba_attach()\fR and \fBscsi_hba_attach_setup()\fR functions attach
a number of integer-valued properties to \fIdip\fR, unless properties of the
same name are already attached to the node. An HBA driver should retrieve these
configuration parameters via \fBddi_prop_get_int\fR(9F), and respect any
settings for features provided the HBA.
.sp
--- 111,121 ----
The flags \fBSCSI_HBA_TRAN_CDB\fR and \fBSCSI_HBA_TRAN_SCB\fR are only valid
when \fBtran_setup_pkt()\fR is used. See \fBtran_setup_pkt\fR(9E) for
information on using these flags.
.sp
.LP
! The \fBscsi_hba_attach_setup()\fR function attaches
a number of integer-valued properties to \fIdip\fR, unless properties of the
same name are already attached to the node. An HBA driver should retrieve these
configuration parameters via \fBddi_prop_get_int\fR(9F), and respect any
settings for features provided the HBA.
.sp
*** 276,306 ****
.RE
.SS "scsi_hba_detach(\|)"
.sp
.LP
! The \fBscsi_hba_detach()\fR function removes the reference to the DMA limits or
attributes structure and the transport vector for the given instance of an HBA
driver.
.SH RETURN VALUES
.sp
.LP
! The \fBscsi_hba_attach()\fR, \fBscsi_hba_attach_setup()\fR, and
\fBscsi_hba_detach()\fR functions return \fBDDI_SUCCESS\fR if the function call
succeeds, and return \fBDDI_FAILURE\fR on failure.
.SH CONTEXT
.sp
.LP
! The \fBscsi_hba_attach()\fR and \fBscsi_hba_attach_setup()\fR functions should
be called from \fBattach\fR(9E). The \fBscsi_hba_detach()\fR function should be
called from \fBdetach\fR(9E).
.SH SEE ALSO
.sp
.LP
\fBattach\fR(9E), \fBdetach\fR(9E), \fBtran_setup_pkt\fR(9E),
\fBtran_tgt_init\fR(9E), \fBddi_prop_get_int\fR(9F), \fBddi_dma_attr\fR(9S),
! \fBddi_dma_lim\fR(9S), \fBdev_ops\fR(9S), \fBscsi_address\fR(9S),
\fBscsi_hba_tran\fR(9S)
.sp
.LP
\fIWriting Device Drivers\fR
.SH NOTES
--- 257,287 ----
.RE
.SS "scsi_hba_detach(\|)"
.sp
.LP
! The \fBscsi_hba_detach()\fR function removes the reference to the DMA
attributes structure and the transport vector for the given instance of an HBA
driver.
.SH RETURN VALUES
.sp
.LP
! The \fBscsi_hba_attach_setup()\fR and
\fBscsi_hba_detach()\fR functions return \fBDDI_SUCCESS\fR if the function call
succeeds, and return \fBDDI_FAILURE\fR on failure.
.SH CONTEXT
.sp
.LP
! The \fBscsi_hba_attach_setup()\fR function should
be called from \fBattach\fR(9E). The \fBscsi_hba_detach()\fR function should be
called from \fBdetach\fR(9E).
.SH SEE ALSO
.sp
.LP
\fBattach\fR(9E), \fBdetach\fR(9E), \fBtran_setup_pkt\fR(9E),
\fBtran_tgt_init\fR(9E), \fBddi_prop_get_int\fR(9F), \fBddi_dma_attr\fR(9S),
! \fBdev_ops\fR(9S), \fBscsi_address\fR(9S),
\fBscsi_hba_tran\fR(9S)
.sp
.LP
\fIWriting Device Drivers\fR
.SH NOTES
*** 307,315 ****
.sp
.LP
It is the HBA driver's responsibility to ensure that no more transport requests
will be taken on behalf of any SCSI target device driver after
\fBscsi_hba_detach()\fR is called.
- .sp
- .LP
- The \fBscsi_hba_attach()\fR function is obsolete and will be discontinued in a
- future release. This function is replaced by \fBscsi_hba_attach_setup()\fR.
--- 288,292 ----