1 /* 2 * CDDL HEADER START 3 * 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. 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 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 #ifndef _SYS_SCSI_ADAPTERS_SCSI_VHCI_TPGS_H 26 #define _SYS_SCSI_ADAPTERS_SCSI_VHCI_TPGS_H 27 28 #pragma ident "%Z%%M% %I% %E% SMI" 29 30 /* 31 * max number of retries for std failover to complete where the ping 32 * command is failing due to transport errors or commands being rejected by 33 * std. 34 * STD_FO_MAX_RETRIES takes into account the case where CMD_CMPLTs but 35 * std takes time to complete the failover. 36 */ 37 #define STD_FO_MAX_CMD_RETRIES 3 38 39 #define STD_ACTIVE_OPTIMIZED 0x0 40 #define STD_ACTIVE_NONOPTIMIZED 0x1 41 #define STD_STANDBY 0x2 42 #define STD_UNAVAILABLE 0x3 43 #define STD_TRANSITIONING 0xf 44 45 #define STD_SCSI_ASC_STATE_TRANS 0x04 46 #define STD_SCSI_ASCQ_STATE_TRANS_FAIL 0x0A 47 #define STD_SCSI_ASC_STATE_CHG 0x2A 48 #define STD_SCSI_ASCQ_STATE_CHG_SUCC 0x06 49 #define STD_SCSI_ASCQ_STATE_CHG_FAILED 0x07 50 #define STD_SCSI_ASC_INVAL_PARAM_LIST 0x26 51 #define STD_SCSI_ASC_INVAL_CMD_OPCODE 0x20 52 #define STD_LOGICAL_UNIT_NOT_ACCESSIBLE 0x04 53 #define STD_TGT_PORT_UNAVAILABLE 0x0C 54 55 extern int vhci_tpgs_get_target_fo_mode(struct scsi_device *sd, int *mode, 56 int *state, int *xlf_capable, int *preferred); 57 58 #endif /* _SYS_SCSI_ADAPTERS_SCSI_VHCI_TPGS_H */ 59