Copyright (c) 2006, 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> void scsi_reset_notify(struct scsi_address *ap, int flag, void (*callback)(caddr_t), caddr_t arg);
Solaris DDI specific (Solaris DDI).
Pointer to the scsi_address structure.
A flag indicating registration or cancellation of the notification request.
A pointer to the target driver's reset notification function.
The callback function argument.
The scsi_reset_notify() function is used by a target driver when it needs to be notified of a bus reset. The bus reset could be issued by the transport layer (e.g. the host bus adapter (HBA) driver or controller) or by another initiator.
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 driver.
Cancel the reset notification request.
Target drivers can find out whether the HBA driver and controller support reset notification by checking the reset-notification capability using the scsi_ifgetcap(9F) function.
If flag is SCSI_RESET_NOTIFY, scsi_reset_notify() returns: DDI_SUCCESS
The notification request has been accepted.
The transport layer does not support reset notification or could not accept this request.
If flag is SCSI_RESET_CANCEL, scsi_reset_notify() returns: DDI_SUCCESS
The notification request has been canceled.
No notification request was registered.
The scsi_reset_notify() function can be called from user, interrupt, or kernel context.
scsi_address(9S), scsi_ifgetcap(9F)
Writing Device Drivers