'\" 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 "Nov 1, 1993" .SH NAME tran_tgt_free \- request to free HBA resources allocated on behalf of a target .SH SYNOPSIS .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 illumos architecture specific (illumos DDI). .SH PARAMETERS .ne 2 .na \fB\fIhba_dip\fR \fR .ad .RS 13n Pointer to a \fBdev_info_t\fR structure, referring to the \fBHBA\fR device instance. .RE .sp .ne 2 .na \fB\fItgt_dip\fR \fR .ad .RS 13n Pointer to a \fBdev_info_t\fR structure, referring to the target device instance. .RE .sp .ne 2 .na \fB\fIhba_tran\fR \fR .ad .RS 13n Pointer to a \fBscsi_hba_tran\fR(9S) structure, consisting of the \fBHBA\fR's transport vectors. .RE .sp .ne 2 .na \fB\fIsd\fR \fR .ad .RS 13n Pointer to a \fBscsi_device\fR(9S) structure, describing the target. .RE .SH DESCRIPTION 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 \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