'\" te .\" Copyright (c) 1997, 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_reset_notify 9E "30 Aug 1995" "SunOS 5.11" "Driver Entry Points" .SH NAME tran_reset_notify \- request to notify SCSI target of bus reset .SH SYNOPSIS .LP .nf #include \fBint prefix\fR\fBtran_reset_notify\fR(\fBstruct scsi_address *\fR\fIap\fR, \fBint\fR \fIflag\fR, \fBvoid (*\fR\fIcallback\fR, \fBcaddr_t),caddr_t\fR \fIarg\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris architecture specific (Solaris DDI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIap\fR \fR .ad .RS 13n .rt Pointer to the \fBscsi_address\fR(9S) structure. .RE .sp .ne 2 .mk .na \fB\fIflag\fR \fR .ad .RS 13n .rt A flag indicating registration or cancellation of a notification request. .RE .sp .ne 2 .mk .na \fB\fIcallback\fR \fR .ad .RS 13n .rt A pointer to the target driver's reset notification function. .RE .sp .ne 2 .mk .na \fB\fIarg\fR \fR .ad .RS 13n .rt The callback function argument. .RE .SH DESCRIPTION .sp .LP The \fBtran_reset_notify()\fR entry point is called when a target driver requests notification of a bus reset. .sp .LP The \fBtran_reset_notify()\fR vector in the \fBscsi_hba_tran\fR(9S) structure may be initialized in the \fBHBA \fRdriver's \fBattach\fR(9E) routine to point to the \fBHBA \fRentry point to be called when a target driver calls \fBscsi_reset_notify\fR(9F). .sp .LP The argument \fIflag\fR is used to register or cancel the notification. The supported values for \fIflag\fR are as follows: .sp .ne 2 .mk .na \fB\fBSCSI_RESET_NOTIFY\fR \fR .ad .RS 22n .rt Register \fIcallback\fR as the reset notification function for the target. .RE .sp .ne 2 .mk .na \fB\fBSCSI_RESET_CANCEL\fR \fR .ad .RS 22n .rt Cancel the reset notification request for the target. .RE .sp .LP The \fBHBA \fRdriver maintains a list of reset notification requests registered by the target drivers. When a bus reset occurs, the \fBHBA \fRdriver notifies registered target drivers by calling the callback routine, \fIcallback\fR, with the argument, \fIarg\fR, for each registered target. .SH RETURN VALUES .sp .LP For \fBSCSI_RESET_NOTIFY\fR requests, \fBtran_reset_notify()\fR must return \fBDDI_SUCCESS\fR if the notification request has been accepted, and \fBDDI_FAILURE\fR otherwise. .sp .LP For \fBSCSI_RESET_CANCEL\fR requests, \fBtran_reset_notify()\fR must return \fBDDI_SUCCESS\fR if the notification request has been canceled, and \fBDDI_FAILURE\fR otherwise. .SH SEE ALSO .sp .LP \fBattach\fR(9E), \fBscsi_ifgetcap\fR(9F), \fBscsi_reset_notify\fR(9F), \fBscsi_address\fR(9S), \fBscsi_hba_tran\fR(9S) .sp .LP \fIWriting Device Drivers\fR