10205780bSrralphs /* 20205780bSrralphs * CDDL HEADER START 30205780bSrralphs * 40205780bSrralphs * The contents of this file are subject to the terms of the 50205780bSrralphs * Common Development and Distribution License (the "License"). 60205780bSrralphs * You may not use this file except in compliance with the License. 70205780bSrralphs * 80205780bSrralphs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90205780bSrralphs * or http://www.opensolaris.org/os/licensing. 100205780bSrralphs * See the License for the specific language governing permissions 110205780bSrralphs * and limitations under the License. 120205780bSrralphs * 130205780bSrralphs * When distributing Covered Code, include this CDDL HEADER in each 140205780bSrralphs * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150205780bSrralphs * If applicable, add the following below this CDDL HEADER, with the 160205780bSrralphs * fields enclosed by brackets "[]" replaced with your own identifying 170205780bSrralphs * information: Portions Copyright [yyyy] [name of copyright owner] 180205780bSrralphs * 190205780bSrralphs * CDDL HEADER END 200205780bSrralphs */ 210205780bSrralphs /* 22*37711685Swl * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230205780bSrralphs * Use is subject to license terms. 240205780bSrralphs */ 250205780bSrralphs #ifndef _SYS_SCSI_ADAPTERS_SCSI_VHCI_TPGS_H 260205780bSrralphs #define _SYS_SCSI_ADAPTERS_SCSI_VHCI_TPGS_H 270205780bSrralphs 280205780bSrralphs /* 290205780bSrralphs * max number of retries for std failover to complete where the ping 300205780bSrralphs * command is failing due to transport errors or commands being rejected by 310205780bSrralphs * std. 320205780bSrralphs * STD_FO_MAX_RETRIES takes into account the case where CMD_CMPLTs but 330205780bSrralphs * std takes time to complete the failover. 340205780bSrralphs */ 350205780bSrralphs #define STD_FO_MAX_CMD_RETRIES 3 360205780bSrralphs 370205780bSrralphs #define STD_ACTIVE_OPTIMIZED 0x0 380205780bSrralphs #define STD_ACTIVE_NONOPTIMIZED 0x1 390205780bSrralphs #define STD_STANDBY 0x2 400205780bSrralphs #define STD_UNAVAILABLE 0x3 410205780bSrralphs #define STD_TRANSITIONING 0xf 420205780bSrralphs 430205780bSrralphs #define STD_SCSI_ASC_STATE_TRANS 0x04 440205780bSrralphs #define STD_SCSI_ASCQ_STATE_TRANS_FAIL 0x0A 450205780bSrralphs #define STD_SCSI_ASC_STATE_CHG 0x2A 460205780bSrralphs #define STD_SCSI_ASCQ_STATE_CHG_SUCC 0x06 470205780bSrralphs #define STD_SCSI_ASCQ_STATE_CHG_FAILED 0x07 480205780bSrralphs #define STD_SCSI_ASC_INVAL_PARAM_LIST 0x26 490205780bSrralphs #define STD_SCSI_ASC_INVAL_CMD_OPCODE 0x20 500205780bSrralphs #define STD_LOGICAL_UNIT_NOT_ACCESSIBLE 0x04 51*37711685Swl #define STD_TGT_PORT_STANDBY 0x0B 520205780bSrralphs #define STD_TGT_PORT_UNAVAILABLE 0x0C 530205780bSrralphs 540205780bSrralphs extern int vhci_tpgs_get_target_fo_mode(struct scsi_device *sd, int *mode, 550205780bSrralphs int *state, int *xlf_capable, int *preferred); 560205780bSrralphs 570205780bSrralphs #endif /* _SYS_SCSI_ADAPTERS_SCSI_VHCI_TPGS_H */ 58