cpqary3_scsi.h revision 80c94ecd7a524eb933a4bb221a9618b9dc490e76
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
*/
#ifndef _CPQARY3_SCSI_H
#define _CPQARY3_SCSI_H
#include "cpqary3_ciss.h"
#ifdef __cplusplus
extern "C" {
#endif
/* CISS LUN Addressing MODEs */
#define PERIPHERIAL_DEV_ADDR 0x0
#define LOGICAL_VOL_ADDR 0x1
#define MASK_PERIPHERIAL_DEV_ADDR 0x3
#define CISS_PHYS_MODE 0x0
/*
* Definitions for compatibility with the old array BMIC interface
* CISS_OPCODE_RLL IS THE OPCODE FOR THE Report Logical Luns command
*/
#define ARRAY_READ 0x26
#define ARRAY_WRITE 0x27
#define CISS_NEW_READ 0xC0
#define CISS_NEW_WRITE 0xC1
#define CISS_OPCODE_RLL 0xC2
#define CISS_OPCODE_RPL 0xC3
#define CISS_NO_TIMEOUT 0x0
/*
* BMIC commands
*/
#define CISS_FLUSH_CACHE 0xC2
#define BMIC_IDENTIFY_LOGICAL_DRIVE 0x10
#define BMIC_SENSE_LOGICAL_DRIVE_STATUS 0x12
#define CISS_MSG_ABORT 0x0
#define CISS_ABORT_TASK 0x0
#define CISS_ABORT_TASKSET 0x1
#define CISS_CTLR_INIT 0xffff0000
#define CISS_MSG_RESET 0x1
#define CISS_RESET_CTLR 0x0
#define CISS_RESET_TGT 0x3
/*
* The Controller SCSI ID is 7. Hence, when ever the OS issues a command
* for a target with ID greater than 7, the intended Logical Drive is
* actually one less than the issued ID.
* So, the allignment.
* The Mapping from OS to the HBA is as follows:
* OS Target IDs HBA taret IDs
* 0 - 6 0 - 6
* 7 - (Controller)
* 8 - 32 7 - 31
*/
#define CPQARY3_TGT_ALIGNMENT 0x1
#define CPQARY3_LEN_TAGINUSE 0x4
#define CPQARY3_CDBLEN_12 12
#define CPQARY3_CDBLEN_16 16
/*
* possible values to fill in the cmdpvt_flag member
* in the cpqary3_cmdpvt_t structure
*/
#define CPQARY3_TIMEOUT 1
#define CPQARY3_CV_TIMEOUT 2
#define CPQARY3_RESET 4
#define CPQARY3_SYNC_SUBMITTED 8
#define CPQARY3_SYNC_TIMEOUT 16
#define CPQARY3_INTR_ENABLE 1
#define CPQARY3_INTR_DISABLE 2
#define CPQARY3_LOCKUP_INTR_ENABLE 1
#define CPQARY3_LOCKUP_INTR_DISABLE 2
#define CPQARY3_COALESCE_DELAY 0x0
#define CPQARY3_COALESCE_COUNT 0x00000001l
#define CPQARY3_NO_MUTEX 0
#define CPQARY3_HOLD_SW_MUTEX 1
/* Completed With NO Error */
#define CPQARY3_OSCMD_SUCCESS 0x0
#define CPQARY3_SELFCMD_SUCCESS 0x2
#define CPQARY3_NOECMD_SUCCESS 0x4
#define CPQARY3_SYNCCMD_SUCCESS 0x6
/* Completed With ERROR */
#define CPQARY3_OSCMD_FAILURE 0x1
#define CPQARY3_SELFCMD_FAILURE 0x3
#define CPQARY3_NOECMD_FAILURE 0x5
#define CPQARY3_SYNCCMD_FAILURE 0x7
/* Fatal SCSI Status */
#define SCSI_CHECK_CONDITION 0x2
#define SCSI_COMMAND_TERMINATED 0x22
#pragma pack(1)
typedef struct flushcache {
typedef struct each_logical_lun_data {
typedef struct rll_data {
} rll_data_t;
typedef struct each_physical_lun_data {
typedef struct rpl_data {
} rpl_data_t;
/*
* Format of the data returned for the IDENTIFY LOGICAL DRIVE Command
*/
typedef struct Identify_Logical_Drive {
} IdLogDrive;
/* FORMAT */
typedef struct Identify_Ld_Status {
/*
* The following fields are for firmware supporting > 7 drives per
* SCSI bus. The "Drives Per SCSI Bus" indicates how many bits /
* words (in case of remap count) correspond to each drive.
*/
/* FORMAT */
/*
* SCSI Command Opcodes
*/
/*
* SCSI Opcodes Not supported by FW
*
*/
#pragma pack()
#ifdef __cplusplus
}
#endif
#endif /* _CPQARY3_SCSI_H */