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]
#include <sys/scsi/scsi.h> int prefixtran_reset_notify(struct scsi_address *ap, int flag, void (*callback, caddr_t),caddr_t arg);
Solaris architecture specific (Solaris DDI).
Pointer to the scsi_address(9S) structure.
A flag indicating registration or cancellation of a notification request.
A pointer to the target driver's reset notification function.
The callback function argument.
The tran_reset_notify() entry point is called when a target driver requests notification of a bus reset.
The tran_reset_notify() vector in the scsi_hba_tran(9S) structure may be initialized in the HBA driver's attach(9E) routine to point to the HBA entry point to be called when a target driver calls scsi_reset_notify(9F).
The argument flag is used to register or cancel the notification. The supported values for flag are as follows: SCSI_RESET_NOTIFY
Register callback as the reset notification function for the target.
Cancel the reset notification request for the target.
The HBA driver maintains a list of reset notification requests registered by the target drivers. When a bus reset occurs, the HBA driver notifies registered target drivers by calling the callback routine, callback, with the argument, arg, for each registered target.
For SCSI_RESET_NOTIFY requests, tran_reset_notify() must return DDI_SUCCESS if the notification request has been accepted, and DDI_FAILURE otherwise.
For SCSI_RESET_CANCEL requests, tran_reset_notify() must return DDI_SUCCESS if the notification request has been canceled, and DDI_FAILURE otherwise.
attach(9E), scsi_ifgetcap(9F), scsi_reset_notify(9F), scsi_address(9S), scsi_hba_tran(9S)
Writing Device Drivers