'\" 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 "Aug 30, 1995" .SH NAME tran_reset_notify \- request to notify SCSI target of bus reset .SH SYNOPSIS .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 illumos architecture specific (illumos DDI). .SH PARAMETERS .ne 2 .na \fB\fIap\fR \fR .ad .RS 13n Pointer to the \fBscsi_address\fR(9S) structure. .RE .sp .ne 2 .na \fB\fIflag\fR \fR .ad .RS 13n A flag indicating registration or cancellation of a notification request. .RE .sp .ne 2 .na \fB\fIcallback\fR \fR .ad .RS 13n A pointer to the target driver's reset notification function. .RE .sp .ne 2 .na \fB\fIarg\fR \fR .ad .RS 13n The callback function argument. .RE .SH DESCRIPTION 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 .na \fB\fBSCSI_RESET_NOTIFY\fR \fR .ad .RS 22n Register \fIcallback\fR as the reset notification function for the target. .RE .sp .ne 2 .na \fB\fBSCSI_RESET_CANCEL\fR \fR .ad .RS 22n 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 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 .BR attach (9E), .BR scsi_ifgetcap (9F), .BR scsi_reset_notify (9F), .BR scsi_address (9S), .BR scsi_hba_tran (9S) .sp .LP \fIWriting Device Drivers\fR