Print this page
4630 clean stale references to ddi_iopb_alloc and ddi_iopb_free
4634 undocument scsi_hba_attach() and ddi_dma_lim(9s)

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man9f/scsi_hba_attach_setup.9f
          +++ new/usr/src/man/man9f/scsi_hba_attach_setup.9f
   1    1  '\" te
   2    2  .\" Copyright (c) 2006 Sun Microsystems, Inc., All Rights Reserved
        3 +.\" Copyright 2014 Pluribus Networks, Inc.
   3    4  .\" 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.
   4    5  .\" 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.
   5    6  .\" 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]
   6    7  .TH SCSI_HBA_ATTACH_SETUP 9F "May 30, 2006"
   7    8  .SH NAME
   8    9  scsi_hba_attach_setup, scsi_hba_attach, scsi_hba_detach \- SCSI HBA attach and
   9   10  detach routines
  10   11  .SH SYNOPSIS
  11   12  .LP
  12   13  .nf
  13   14  #include <sys/scsi/scsi.h>
  14   15  
  15   16  
  16   17  
  17   18  \fBint\fR \fBscsi_hba_attach_setup\fR(\fBdev_info_t *\fR\fIdip\fR, \fBddi_dma_attr_t *\fR\fIhba_dma_attr\fR,
  18   19       \fBscsi_hba_tran_t *\fR\fIhba_tran\fR, \fBint\fR \fIhba_flags\fR);
  19   20  .fi
  20   21  
  21   22  .LP
  22   23  .nf
  23      -\fBint\fR \fBscsi_hba_attach\fR(\fBdev_info_t *\fR\fIdip\fR, \fBddi_dma_lim_t *\fR\fIhba_lim\fR,
  24      -     \fBscsi_hba_tran_t *\fR\fIhba_tran\fR, \fBint\fR \fIhba_flags\fR, \fBvoid *\fR\fIhba_options\fR);
  25      -.fi
  26      -
  27      -.LP
  28      -.nf
  29   24  \fBint\fR \fBscsi_hba_detach\fR(\fBdev_info_t *\fR\fIdip\fR);
  30   25  .fi
  31   26  
  32   27  .SH INTERFACE LEVEL
  33   28  .sp
  34   29  .LP
  35   30  Solaris architecture specific (Solaris DDI).
  36   31  .SH PARAMETERS
  37   32  .sp
  38   33  .ne 2
↓ open down ↓ 48 lines elided ↑ open up ↑
  87   82  .na
  88   83  \fB\fIhba_dma_attr\fR\fR
  89   84  .ad
  90   85  .RS 16n
  91   86  Pointer to a \fBddi_dma_attr\fR(9S) structure.
  92   87  .RE
  93   88  
  94   89  .SH DESCRIPTION
  95   90  .sp
  96   91  .LP
  97      -The \fBscsi_hba_attach_setup()\fR function is the recommended interface over
  98      -the \fBscsi_hba_attach()\fR function.
  99      -.SS "scsi_hba_attach_setup(\|) scsi_hba_attach(\|)"
 100      -.sp
 101      -.LP
 102      -The \fBscsi_hba_attach()\fR function registers the \fIhba_lim\fR DMA limits and
 103      -the \fIhba_tran\fR transport vectors of each instance of the HBA device defined
 104      -by \fIdip\fR. The \fBscsi_hba_attach_setup()\fR function registers the
       92 +The \fBscsi_hba_attach_setup()\fR function registers the
 105   93  \fIhba_dma_attr\fR DMA attributes and the \fIhba_tran\fR transport vectors of
 106   94  each instance of the HBA device defined by \fIdip\fR. The HBA driver can pass
 107   95  different DMA limits or DMA attributes and the transport vectors for each
 108   96  instance of the device to support any constraints imposed by the  HBA itself.
 109   97  .sp
 110   98  .LP
 111      -The \fBscsi_hba_attach()\fR and \fBscsi_hba_attach_setup()\fR functions use the
       99 +The \fBscsi_hba_attach_setup()\fR function uses the
 112  100  \fBdev_bus_ops\fR field in the \fBdev_ops\fR(9S) structure. The HBA driver
 113  101  should initialize this field to \fINULL\fR before calling
 114      -\fBscsi_hba_attach()\fR or \fBscsi_hba_attach_setup()\fR.
      102 +\fBscsi_hba_attach_setup()\fR.
 115  103  .sp
 116  104  .LP
 117  105  If \fBSCSI_HBA_TRAN_CLONE\fR is requested in \fIhba_flags\fR, the
 118  106  \fBhba_tran\fR structure is cloned once for each target that is attached to the
 119  107  HBA. The structure is cloned before the \fBtran_tgt_init\fR(9E) entry point is
 120  108  called to initialize a target. At all subsequent HBA entry points, including
 121  109  \fBtran_tgt_init\fR(9E), the \fBscsi_hba_tran_t\fR structure passed as an
 122  110  argument or found in a \fBscsi_address\fR structure is the cloned
 123  111  \fBscsi_hba_tran_t\fR structure,which allows the HBA to use the
 124  112  \fBtran_tgt_private\fR field in the \fBscsi_hba_tran_t\fR structure to point to
 125  113  per-target data. The HBA should free only the same \fBscsi_hba_tran_t\fR
 126  114  structure allocated when the HBA detaches. All cloned \fBscsi_hba_tran_t\fR
 127  115  structures that are allocated by the system are freed by the system.
 128  116  .sp
 129  117  .LP
 130  118  The flags \fBSCSI_HBA_TRAN_CDB\fR and \fBSCSI_HBA_TRAN_SCB\fR are only valid
 131  119  when \fBtran_setup_pkt()\fR is used. See \fBtran_setup_pkt\fR(9E) for
 132  120  information on using these flags.
 133  121  .sp
 134  122  .LP
 135      -The \fBscsi_hba_attach()\fR and \fBscsi_hba_attach_setup()\fR functions attach
      123 +The \fBscsi_hba_attach_setup()\fR function attaches
 136  124  a number of integer-valued properties to \fIdip\fR, unless properties of the
 137  125  same name are already attached to the node. An HBA driver should retrieve these
 138  126  configuration parameters via \fBddi_prop_get_int\fR(9F), and respect any
 139  127  settings for features provided the HBA.
 140  128  .sp
 141  129  .ne 2
 142  130  .na
 143  131  \fB\fBscsi-options\fR\fR
 144  132  .ad
 145  133  .RS 26n
↓ open down ↓ 131 lines elided ↑ open up ↑
 277  265  
 278  266  .SS "scsi_hba_detach(\|)"
 279  267  .sp
 280  268  .LP
 281  269  The \fBscsi_hba_detach()\fR function removes the reference to the DMA limits or
 282  270  attributes structure and the transport vector for the given instance of an HBA
 283  271  driver.
 284  272  .SH RETURN VALUES
 285  273  .sp
 286  274  .LP
 287      -The \fBscsi_hba_attach()\fR, \fBscsi_hba_attach_setup()\fR, and
      275 +The \fBscsi_hba_attach_setup()\fR and
 288  276  \fBscsi_hba_detach()\fR functions return \fBDDI_SUCCESS\fR if the function call
 289  277  succeeds, and return \fBDDI_FAILURE\fR on failure.
 290  278  .SH CONTEXT
 291  279  .sp
 292  280  .LP
 293      -The \fBscsi_hba_attach()\fR and \fBscsi_hba_attach_setup()\fR functions should
      281 +The \fBscsi_hba_attach_setup()\fR function should
 294  282  be called from \fBattach\fR(9E). The \fBscsi_hba_detach()\fR function should be
 295  283  called from \fBdetach\fR(9E).
 296  284  .SH SEE ALSO
 297  285  .sp
 298  286  .LP
 299  287  \fBattach\fR(9E), \fBdetach\fR(9E), \fBtran_setup_pkt\fR(9E),
 300  288  \fBtran_tgt_init\fR(9E), \fBddi_prop_get_int\fR(9F), \fBddi_dma_attr\fR(9S),
 301      -\fBddi_dma_lim\fR(9S), \fBdev_ops\fR(9S), \fBscsi_address\fR(9S),
      289 +\fBdev_ops\fR(9S), \fBscsi_address\fR(9S),
 302  290  \fBscsi_hba_tran\fR(9S)
 303  291  .sp
 304  292  .LP
 305  293  \fIWriting Device Drivers\fR
 306  294  .SH NOTES
 307  295  .sp
 308  296  .LP
 309  297  It is the HBA driver's responsibility to ensure that no more transport requests
 310  298  will be taken on behalf of any SCSI target device driver after
 311  299  \fBscsi_hba_detach()\fR is called.
 312      -.sp
 313      -.LP
 314      -The \fBscsi_hba_attach()\fR function is obsolete and will be discontinued in a
 315      -future release. This function is replaced by \fBscsi_hba_attach_setup()\fR.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX