6 * You may not use this file except in compliance with the License.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
23 */
24 /*
25 * Copyright 2011 cyril.galibern@opensvc.com
26 */
27
28 #ifndef _SYS_SCSI_TARGETS_SDDEF_H
29 #define _SYS_SCSI_TARGETS_SDDEF_H
30
31 #include <sys/dktp/fdisk.h>
32 #include <sys/note.h>
33 #include <sys/mhd.h>
34 #include <sys/cmlb.h>
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40
41 #if defined(_KERNEL) || defined(_KMEMUSER)
42
43
44 #define SD_SUCCESS 0
45 #define SD_FAILURE (-1)
499 opaque_t un_swr_token; /* scsi_watch request token */
500
501 /* Non-512 byte block support */
502 struct kmem_cache *un_wm_cache; /* fast alloc in non-512 write case */
503 uint_t un_rmw_count; /* count of read-modify-writes */
504 struct sd_w_map *un_wm; /* head of sd_w_map chain */
505 uint64_t un_rmw_incre_count; /* count I/O */
506 timeout_id_t un_rmw_msg_timeid; /* for RMW message control */
507
508 /* For timeout callback to issue a START STOP UNIT command */
509 timeout_id_t un_startstop_timeid;
510
511 /* Timeout callback handle for SD_PATH_DIRECT_PRIORITY cmd restarts */
512 timeout_id_t un_direct_priority_timeid;
513
514 /* TRAN_FATAL_ERROR count. Cleared by TRAN_ACCEPT from scsi_transport */
515 ulong_t un_tran_fatal_count;
516
517 timeout_id_t un_retry_timeid;
518
519 time_t un_pm_idle_time;
520 timeout_id_t un_pm_idle_timeid;
521
522 /*
523 * Count to determine if a Sonoma controller is in the process of
524 * failing over, and how many I/O's are failed with the 05/94/01
525 * sense code.
526 */
527 uint_t un_sonoma_failure_count;
528
529 /*
530 * Support for failfast operation.
531 */
532 struct buf *un_failfast_bp;
533 struct buf *un_failfast_headp;
534 struct buf *un_failfast_tailp;
535 uint32_t un_failfast_state;
536 /* Callback routine active counter */
537 short un_in_callback;
538
539 kcondvar_t un_wcc_cv; /* synchronize changes to */
|
6 * You may not use this file except in compliance with the License.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
23 */
24 /*
25 * Copyright 2011 cyril.galibern@opensvc.com
26 * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
27 */
28
29 #ifndef _SYS_SCSI_TARGETS_SDDEF_H
30 #define _SYS_SCSI_TARGETS_SDDEF_H
31
32 #include <sys/dktp/fdisk.h>
33 #include <sys/note.h>
34 #include <sys/mhd.h>
35 #include <sys/cmlb.h>
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41
42 #if defined(_KERNEL) || defined(_KMEMUSER)
43
44
45 #define SD_SUCCESS 0
46 #define SD_FAILURE (-1)
500 opaque_t un_swr_token; /* scsi_watch request token */
501
502 /* Non-512 byte block support */
503 struct kmem_cache *un_wm_cache; /* fast alloc in non-512 write case */
504 uint_t un_rmw_count; /* count of read-modify-writes */
505 struct sd_w_map *un_wm; /* head of sd_w_map chain */
506 uint64_t un_rmw_incre_count; /* count I/O */
507 timeout_id_t un_rmw_msg_timeid; /* for RMW message control */
508
509 /* For timeout callback to issue a START STOP UNIT command */
510 timeout_id_t un_startstop_timeid;
511
512 /* Timeout callback handle for SD_PATH_DIRECT_PRIORITY cmd restarts */
513 timeout_id_t un_direct_priority_timeid;
514
515 /* TRAN_FATAL_ERROR count. Cleared by TRAN_ACCEPT from scsi_transport */
516 ulong_t un_tran_fatal_count;
517
518 timeout_id_t un_retry_timeid;
519
520 hrtime_t un_pm_idle_time;
521 timeout_id_t un_pm_idle_timeid;
522
523 /*
524 * Count to determine if a Sonoma controller is in the process of
525 * failing over, and how many I/O's are failed with the 05/94/01
526 * sense code.
527 */
528 uint_t un_sonoma_failure_count;
529
530 /*
531 * Support for failfast operation.
532 */
533 struct buf *un_failfast_bp;
534 struct buf *un_failfast_headp;
535 struct buf *un_failfast_tailp;
536 uint32_t un_failfast_state;
537 /* Callback routine active counter */
538 short un_in_callback;
539
540 kcondvar_t un_wcc_cv; /* synchronize changes to */
|