'\" te .\" Copyright (c) 1995, 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 tran_tgt_free 9E "1 Nov 1993" "SunOS 5.11" "Driver Entry Points" .SH NAME tran_tgt_free \- request to free HBA resources allocated on behalf of a target .SH SYNOPSIS .LP .nf #include \fBvoid prefix\fR\fBtran_tgt_free\fR(\fBdev_info_t *\fR\fIhba_dip\fR, \fBdev_info_t *\fR\fItgt_dip\fR, \fBscsi_hba_tran_t *\fR\fIhba_tran\fR, \fBstruct scsi_device *\fR\fIsd\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris architecture specific (Solaris DDI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIhba_dip\fR \fR .ad .RS 13n .rt Pointer to a \fBdev_info_t\fR structure, referring to the \fBHBA\fR device instance. .RE .sp .ne 2 .mk .na \fB\fItgt_dip\fR \fR .ad .RS 13n .rt Pointer to a \fBdev_info_t\fR structure, referring to the target device instance. .RE .sp .ne 2 .mk .na \fB\fIhba_tran\fR \fR .ad .RS 13n .rt Pointer to a \fBscsi_hba_tran\fR(9S) structure, consisting of the \fBHBA\fR's transport vectors. .RE .sp .ne 2 .mk .na \fB\fIsd\fR \fR .ad .RS 13n .rt Pointer to a \fBscsi_device\fR(9S) structure, describing the target. .RE .SH DESCRIPTION .sp .LP The \fBtran_tgt_free()\fR vector in the \fBscsi_hba_tran\fR(9S) structure may be initialized during the \fBHBA\fR driver's \fBattach\fR(9E) to point to an \fBHBA\fR driver function to be called by the system when an instance of a target device is being detached. The \fBtran_tgt_free()\fR vector, if not \fINULL\fR, is called after the target device instance has returned successfully from its \fBdetach\fR(9E) entry point, but before the \fBdev_info\fR node structure is removed from the system. The \fBHBA\fR driver should release any resources allocated during its \fBtran_tgt_init()\fR or \fBtran_tgt_probe()\fR initialization performed for this target device instance. .SH SEE ALSO .sp .LP \fBattach\fR(9E), \fBdetach\fR(9E), \fBtran_tgt_init\fR(9E), \fBtran_tgt_probe\fR(9E), \fBscsi_device\fR(9S), \fBscsi_hba_tran\fR(9S) .sp .LP \fIWriting Device Drivers\fR