stmf_defines.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _STMF_DEFINES_H
#define _STMF_DEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
#define BIT_0 0x1
#define BIT_1 0x2
#define BIT_2 0x4
#define BIT_3 0x8
#define BIT_4 0x10
#define BIT_5 0x20
#define BIT_6 0x40
#define BIT_7 0x80
#define BIT_8 0x100
#define BIT_9 0x200
#define BIT_10 0x400
#define BIT_11 0x800
#define BIT_12 0x1000
#define BIT_13 0x2000
#define BIT_14 0x4000
#define BIT_15 0x8000
#define BIT_16 0x10000
#define BIT_17 0x20000
#define BIT_18 0x40000
#define BIT_19 0x80000
#define BIT_20 0x100000
#define BIT_21 0x200000
#define BIT_22 0x400000
#define BIT_23 0x800000
#define BIT_24 0x1000000
#define BIT_25 0x2000000
#define BIT_26 0x4000000
#define BIT_27 0x8000000
#define BIT_28 0x10000000
#define BIT_29 0x20000000
#define BIT_30 0x40000000
#define BIT_31 0x80000000
/*
* stmf status definitions
*/
typedef uint64_t stmf_status_t;
#define STMF_SUCCESS ((uint64_t)0)
<< 8) |\
0x1F)) << 16)\
/*
* CDB definitions that don't exist in commands.h
*/
#define SCMD_SYNCHRONIZE_CACHE_G4 0x91
/*
* Common key, asc, ascq for stmf_scsilib_send_status
*/
#define STMF_SAA_WRITE_ERROR 0x030C00
#define STMF_SAA_READ_ERROR 0x031100
#define STMF_SAA_INVALID_OPCODE 0x052000
#define STMF_SAA_INVALID_LU 0x052009
#define STMF_SAA_LBA_OUT_OF_RANGE 0x052100
#define STMF_SAA_INVALID_FIELD_IN_CDB 0x052400
#define STMF_SAA_INVALID_FIELD_IN_CMD_IU 0x050E03
#define STMF_SAA_REPORT_LUN_DATA_HAS_CHANGED 0x063F0E
#define STMF_SAA_OPERATION_IN_PROGRESS 0x050016
#define STMF_SAA_POR 0x062900
#define STMF_SAA_CAPACITY_DATA_HAS_CHANGED 0x062A09
struct stmf_lu_provider;
struct stmf_lu;
struct stmf_port_provider;
struct stmf_local_port;
struct stmf_scsi_session;
struct scsi_task;
struct scsi_devid_desc;
struct stmf_data_buf;
struct stmf_lun_map;
struct scsi_devid_desc;
#ifdef __cplusplus
}
#endif
#endif /* _STMF_DEFINES_H */