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

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man9f/scsi_init_pkt.9f
          +++ new/usr/src/man/man9f/scsi_init_pkt.9f
   1    1  '\" te
        2 +.\"  Copyright 2014 Garrett D'Amore <garrett@damore.org>
   2    3  .\"  Copyright (c) 2006, Sun Microsystems, Inc.,  All Rights Reserved
   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      -.TH SCSI_INIT_PKT 9F "Jan 16, 2006"
        7 +.TH SCSI_INIT_PKT 9F "May 24, 2014"
   7    8  .SH NAME
   8    9  scsi_init_pkt \- prepare a complete SCSI packet
   9   10  .SH SYNOPSIS
  10   11  .LP
  11   12  .nf
  12   13  #include <sys/scsi/scsi.h>
  13   14  
  14   15  
  15   16  
  16   17  \fBstruct scsi_pkt *\fR\fBscsi_init_pkt\fR(\fBstruct scsi_address *\fR\fIap\fR,
↓ open down ↓ 170 lines elided ↑ open up ↑
 187  188  
 188  189  .sp
 189  190  .ne 2
 190  191  .na
 191  192  \fB\fBPKT_DMA_PARTIAL\fR\fR
 192  193  .ad
 193  194  .sp .6
 194  195  .RS 4n
 195  196  This may be set if the driver can accept a partial \fBDMA\fR mapping. If set,
 196  197  \fBscsi_init_pkt()\fR will allocate \fBDMA\fR resources with the
 197      -\fBDDI_DMA_PARTIAL\fR bit set in the \fBdmar_flag\fR element of the
 198      -\fBddi_dma_req\fR(9S) structure. The \fBpkt_resid\fR field of the
      198 +\fBDDI_DMA_PARTIAL\fR bit set in the DMA flags.
      199 +The \fBpkt_resid\fR field of the
 199  200  \fBscsi_pkt\fR(9S) structure may be returned with a non-zero value, which
 200  201  indicates the number of bytes for which \fBscsi_init_pkt()\fR was unable to
 201  202  allocate DMA resources. In this case, a subsequent call to
 202  203  \fBscsi_init_pkt()\fR may be made for the same \fIpktp\fR and \fIbp\fR to
 203  204  adjust the DMA resources to the next portion of the transfer. This sequence
 204  205  should be repeated until the \fBpkt_resid\fR field is returned with a zero
 205  206  value, which indicates that with transport of this final portion the entire
 206  207  original request will have been satisfied.
 207  208  .RE
 208  209  
↓ open down ↓ 155 lines elided ↑ open up ↑
 364  365            1, sizeof (struct buf *), PKT_DMA_PARTIAL,
 365  366            SLEEP_FUNC, NULL);
 366  367  .fi
 367  368  .in -2
 368  369  
 369  370  .SH SEE ALSO
 370  371  .sp
 371  372  .LP
 372  373  \fBscsi_alloc_consistent_buf\fR(9F), \fBscsi_destroy_pkt\fR(9F),
 373  374  \fBscsi_dmaget\fR(9F), \fBscsi_pktalloc\fR(9F), \fBbuf\fR(9S),
 374      -\fBddi_dma_req\fR(9S), \fBscsi_address\fR(9S), \fBscsi_pkt\fR(9S)
      375 +\fBscsi_address\fR(9S), \fBscsi_pkt\fR(9S)
 375  376  .sp
 376  377  .LP
 377  378  \fIWriting Device Drivers\fR
 378  379  .SH NOTES
 379  380  .sp
 380  381  .LP
 381  382  If a \fBDMA\fR allocation request fails with \fBDDI_DMA_NOMAPPING\fR, the
 382  383  \fBB_ERROR\fR flag will be set in \fIbp\fR, and the \fBb_error\fR field will be
 383  384  set to \fBEFAULT\fR.
 384  385  .sp
 385  386  .LP
 386  387  If a \fBDMA\fR allocation request fails with \fBDDI_DMA_TOOBIG\fR, the
 387  388  \fBB_ERROR\fR flag will be set in \fIbp\fR, and the \fBb_error\fR field will be
 388  389  set to \fBEINVAL\fR.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX