4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_SCSI_SCSI_CTL_H
27 #define _SYS_SCSI_SCSI_CTL_H
29 #include <sys/scsi/scsi_types.h>
36 * SCSI Control Information
38 * Defines for stating level of reset.
39 * RESET_ALL, RESET_TARGET, and RESET_LUN defined for tran_reset (invoked
41 * RESET_BUS defined for tran_bus_reset (invoked by ioctl)
43 #define RESET_ALL 0 /* reset SCSI bus, host adapter, everything */
44 #define RESET_TARGET 1 /* reset SCSI target */
45 #define RESET_BUS 2 /* reset SCSI bus only */
46 #define RESET_LUN 3 /* reset SCSI logical unit */
49 * Defines for scsi_reset_notify flag, to register or cancel
50 * the notification of external and internal SCSI bus resets.
52 #define SCSI_RESET_NOTIFY 0x01 /* register the reset notification */
53 #define SCSI_RESET_CANCEL 0x02 /* cancel the reset notification */
56 * Define for scsi_get_name string length.
57 * This is needed because MAXNAMELEN is not part of DDI.
59 #define SCSI_MAXNAMELEN MAXNAMELEN
62 * Property for customizing hotplug procedure
64 #define SCSI_NO_QUIESCE "scsi-no-quiesce"
69 * Kernel function declarations
73 * Capabilities functions
75 int scsi_ifgetcap(struct scsi_address
*ap
, char *cap
, int whom
);
76 int scsi_ifsetcap(struct scsi_address
*ap
, char *cap
, int value
, int whom
);
79 * Abort and Reset functions
81 int scsi_abort(struct scsi_address
*ap
, struct scsi_pkt
*pkt
);
82 int scsi_reset(struct scsi_address
*ap
, int level
);
83 int scsi_reset_notify(struct scsi_address
*ap
, int flag
,
84 void (*callback
)(caddr_t
), caddr_t arg
);
85 int scsi_clear_task_set(struct scsi_address
*ap
);
86 int scsi_terminate_task(struct scsi_address
*ap
, struct scsi_pkt
*pkt
);
91 int scsi_clear_aca(struct scsi_address
*ap
);
92 int scsi_ua_get_reportdev(struct scsi_device
*sd
, char *ba
, int len
);
93 int scsi_ua_get(struct scsi_device
*sd
, char *ua
, int len
);
100 #endif /* _SYS_SCSI_SCSI_CTL_H */