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 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <libnvpair.h>
33 #include <sys/types.h>
41 typedef struct ds_transport
{
42 void *(*dt_open
)(struct disk_status
*);
43 void (*dt_close
)(void *);
44 int (*dt_scan
)(void *);
48 char *ds_path
; /* path to device */
49 int ds_fd
; /* device file descriptor */
50 ds_transport_t
*ds_transport
; /* associated transport */
51 void *ds_data
; /* transport-specific data */
52 int ds_faults
; /* mask of current faults */
53 nvlist_t
*ds_overtemp
; /* overtemp */
54 nvlist_t
*ds_predfail
; /* predict fail */
55 nvlist_t
*ds_testfail
; /* self test fail */
56 int ds_error
; /* last error */
57 nvlist_t
*ds_state
; /* protocol state */
60 #define DS_FAULT_OVERTEMP 0x1
61 #define DS_FAULT_PREDFAIL 0x2
62 #define DS_FAULT_TESTFAIL 0x4
64 extern void dprintf(const char *, ...);
65 extern void ddump(const char *, const void *, size_t);
66 extern boolean_t ds_debug
;
68 extern int ds_set_errno(struct disk_status
*, int);
74 #endif /* _DS_IMPL_H */