2 .\" Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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 .\" 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 .\" 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 TRAN_DMAFREE 9E "Aug 30, 1995"
8 tran_dmafree \- SCSI HBA DMA deallocation entry point
12 #include <sys/scsi/scsi.h>
16 \fB void prefix\fR\fBtran_dmafree\fR(\fBstruct scsi_address *\fR\fIap\fR, \fBstruct scsi_pkt *\fR\fIpkt\fR);
22 Solaris architecture specific (Solaris DDI).
30 A pointer to a \fIscsi_address\fR structure. See \fBscsi_address\fR(9S).
39 A pointer to a \fIscsi_pkt\fR structure. See \fBscsi_pkt\fR(9S).
45 The \fBtran_dmafree()\fR vector in the \fIscsi_hba_tran\fR structure must be
46 initialized during the \fBHBA \fRdriver's \fBattach()\fR to point to an \fBHBA
47 \fRentry point to be called when a target driver calls \fBscsi_dmafree\fR(9F).
48 See \fBattach\fR(9E) and \fBscsi_hba_tran\fR(9S).
51 \fBtran_dmafree()\fR must deallocate any \fBDMA \fRresources previously
52 allocated to this \fIpkt\fR in a call to \fBtran_init_pkt\fR(9E).
53 \fBtran_dmafree()\fR should not free the structure pointed to by \fIpkt\fR
54 itself. Since \fBtran_destroy_pkt\fR(9E) must also free \fBDMA \fRresources,
55 it is important that the \fBHBA \fRdriver keeps accurate note of whether
56 \fBscsi_pkt\fR(9S) structures have \fBDMA \fRresources allocated.
60 \fBattach\fR(9E), \fBtran_destroy_pkt\fR(9E), \fBtran_init_pkt\fR(9E),
61 \fBscsi_dmafree\fR(9F), \fBscsi_dmaget\fR(9F), \fBscsi_hba_attach\fR(9F),
62 \fBscsi_init_pkt\fR(9F), \fBscsi_address\fR(9S), \fBscsi_hba_tran\fR(9S),
66 \fIWriting Device Drivers\fR
70 A target driver may call \fBtran_dmafree()\fR on packets for which no \fBDMA
71 \fRresources were allocated.