2 .\" Copyright (c) 2006, Sun Microsystems, Inc.,
3 .\" All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH SCSI_RESET_NOTIFY 9F "Jan 16, 2006"
9 scsi_reset_notify \- notify target driver of bus resets
13 #include <sys/scsi/scsi.h>
17 \fBvoid\fR \fBscsi_reset_notify\fR(\fBstruct scsi_address *\fR\fIap\fR, \fBint\fR \fIflag\fR,
18 \fBvoid\fR (*\fIcallback)(caddr_t)\fR, \fBcaddr_t\fR \fIarg\fR);
24 Solaris DDI specific (Solaris DDI).
32 Pointer to the \fBscsi_address\fR structure.
41 A flag indicating registration or cancellation of the notification request.
50 A pointer to the target driver's reset notification function.
59 The callback function argument.
65 The \fBscsi_reset_notify()\fR function is used by a target driver when it needs
66 to be notified of a bus reset. The bus reset could be issued by the transport
67 layer (e.g. the host bus adapter (\fBHBA)\fR driver or controller) or by
71 The argument \fIflag\fR is used to register or cancel the notification. The
72 supported values for \fIflag\fR are as follows:
76 \fB\fBSCSI_RESET_NOTIFY\fR\fR
79 Register \fIcallback\fR as the reset notification function for the target
86 \fB\fBSCSI_RESET_CANCEL\fR\fR
89 Cancel the reset notification request.
94 Target drivers can find out whether the \fBHBA\fR driver and controller support
95 reset notification by checking the \fBreset-notification\fR capability using
96 the \fBscsi_ifgetcap\fR(9F) function.
100 If \fIflag\fR is \fBSCSI_RESET_NOTIFY\fR, \fBscsi_reset_notify()\fR returns:
104 \fB\fBDDI_SUCCESS\fR\fR
107 The notification request has been accepted.
113 \fB\fBDDI_FAILURE\fR\fR
116 The transport layer does not support reset notification or could not accept
122 If \fIflag\fR is \fBSCSI_RESET_CANCEL\fR, \fBscsi_reset_notify()\fR returns:
126 \fB\fBDDI_SUCCESS\fR\fR
129 The notification request has been canceled.
135 \fB\fBDDI_FAILURE\fR\fR
138 No notification request was registered.
144 The \fBscsi_reset_notify()\fR function can be called from user, interrupt, or
149 \fBscsi_address\fR(9S), \fBscsi_ifgetcap\fR(9F)
152 \fIWriting Device Drivers\fR