aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpi/mpi2_init.h
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-03-09 10:15:44 -0500
committerMichal Marek <mmarek@suse.cz>2011-03-09 10:15:44 -0500
commit2d8ad8719591fa803b0d589ed057fa46f49b7155 (patch)
tree4ae051577dad1161c91dafbf4207bb10a9dc91bb /drivers/scsi/mpt2sas/mpi/mpi2_init.h
parent9b4ce7bce5f30712fd926ab4599a803314a07719 (diff)
parentc56eb8fb6dccb83d9fe62fd4dc00c834de9bc470 (diff)
Merge commit 'v2.6.38-rc1' into kbuild/packaging
Diffstat (limited to 'drivers/scsi/mpt2sas/mpi/mpi2_init.h')
-rw-r--r--drivers/scsi/mpt2sas/mpi/mpi2_init.h48
1 files changed, 32 insertions, 16 deletions
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_init.h b/drivers/scsi/mpt2sas/mpi/mpi2_init.h
index 563e56d2e945..20e6b8869341 100644
--- a/drivers/scsi/mpt2sas/mpi/mpi2_init.h
+++ b/drivers/scsi/mpt2sas/mpi/mpi2_init.h
@@ -1,12 +1,12 @@
1/* 1/*
2 * Copyright (c) 2000-2009 LSI Corporation. 2 * Copyright (c) 2000-2010 LSI Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi2_init.h 5 * Name: mpi2_init.h
6 * Title: MPI SCSI initiator mode messages and structures 6 * Title: MPI SCSI initiator mode messages and structures
7 * Creation Date: June 23, 2006 7 * Creation Date: June 23, 2006
8 * 8 *
9 * mpi2_init.h Version: 02.00.07 9 * mpi2_init.h Version: 02.00.10
10 * 10 *
11 * Version History 11 * Version History
12 * --------------- 12 * ---------------
@@ -27,6 +27,12 @@
27 * Query Asynchronous Event. 27 * Query Asynchronous Event.
28 * Defined two new bits in the SlotStatus field of the SCSI 28 * Defined two new bits in the SlotStatus field of the SCSI
29 * Enclosure Processor Request and Reply. 29 * Enclosure Processor Request and Reply.
30 * 10-28-09 02.00.08 Added defines for decoding the ResponseInfo bytes for
31 * both SCSI IO Error Reply and SCSI Task Management Reply.
32 * Added ResponseInfo field to MPI2_SCSI_TASK_MANAGE_REPLY.
33 * Added MPI2_SCSITASKMGMT_RSP_TM_OVERLAPPED_TAG define.
34 * 02-10-10 02.00.09 Removed unused structure that had "#if 0" around it.
35 * 05-12-10 02.00.10 Added optional vendor-unique region to SCSI IO Request.
30 * -------------------------------------------------------------------------- 36 * --------------------------------------------------------------------------
31 */ 37 */
32 38
@@ -53,20 +59,6 @@ typedef struct
53} MPI2_SCSI_IO_CDB_EEDP32, MPI2_POINTER PTR_MPI2_SCSI_IO_CDB_EEDP32, 59} MPI2_SCSI_IO_CDB_EEDP32, MPI2_POINTER PTR_MPI2_SCSI_IO_CDB_EEDP32,
54 Mpi2ScsiIoCdbEedp32_t, MPI2_POINTER pMpi2ScsiIoCdbEedp32_t; 60 Mpi2ScsiIoCdbEedp32_t, MPI2_POINTER pMpi2ScsiIoCdbEedp32_t;
55 61
56/* TBD: I don't think this is needed for MPI2/Gen2 */
57#if 0
58typedef struct
59{
60 U8 CDB[16]; /* 0x00 */
61 U32 DataLength; /* 0x10 */
62 U32 PrimaryReferenceTag; /* 0x14 */
63 U16 PrimaryApplicationTag; /* 0x18 */
64 U16 PrimaryApplicationTagMask; /* 0x1A */
65 U32 TransferLength; /* 0x1C */
66} MPI2_SCSI_IO32_CDB_EEDP16, MPI2_POINTER PTR_MPI2_SCSI_IO32_CDB_EEDP16,
67 Mpi2ScsiIo32CdbEedp16_t, MPI2_POINTER pMpi2ScsiIo32CdbEedp16_t;
68#endif
69
70typedef union 62typedef union
71{ 63{
72 U8 CDB32[32]; 64 U8 CDB32[32];
@@ -107,7 +99,13 @@ typedef struct _MPI2_SCSI_IO_REQUEST
107 U8 LUN[8]; /* 0x34 */ 99 U8 LUN[8]; /* 0x34 */
108 U32 Control; /* 0x3C */ 100 U32 Control; /* 0x3C */
109 MPI2_SCSI_IO_CDB_UNION CDB; /* 0x40 */ 101 MPI2_SCSI_IO_CDB_UNION CDB; /* 0x40 */
102
103#ifdef MPI2_SCSI_IO_VENDOR_UNIQUE_REGION /* typically this is left undefined */
104 MPI2_SCSI_IO_VENDOR_UNIQUE VendorRegion;
105#endif
106
110 MPI2_SGE_IO_UNION SGL; /* 0x60 */ 107 MPI2_SGE_IO_UNION SGL; /* 0x60 */
108
111} MPI2_SCSI_IO_REQUEST, MPI2_POINTER PTR_MPI2_SCSI_IO_REQUEST, 109} MPI2_SCSI_IO_REQUEST, MPI2_POINTER PTR_MPI2_SCSI_IO_REQUEST,
112 Mpi2SCSIIORequest_t, MPI2_POINTER pMpi2SCSIIORequest_t; 110 Mpi2SCSIIORequest_t, MPI2_POINTER pMpi2SCSIIORequest_t;
113 111
@@ -254,6 +252,11 @@ typedef struct _MPI2_SCSI_IO_REPLY
254#define MPI2_SCSI_STATE_AUTOSENSE_FAILED (0x02) 252#define MPI2_SCSI_STATE_AUTOSENSE_FAILED (0x02)
255#define MPI2_SCSI_STATE_AUTOSENSE_VALID (0x01) 253#define MPI2_SCSI_STATE_AUTOSENSE_VALID (0x01)
256 254
255/* masks and shifts for the ResponseInfo field */
256
257#define MPI2_SCSI_RI_MASK_REASONCODE (0x000000FF)
258#define MPI2_SCSI_RI_SHIFT_REASONCODE (0)
259
257#define MPI2_SCSI_TASKTAG_UNKNOWN (0xFFFF) 260#define MPI2_SCSI_TASKTAG_UNKNOWN (0xFFFF)
258 261
259 262
@@ -327,6 +330,7 @@ typedef struct _MPI2_SCSI_TASK_MANAGE_REPLY
327 U16 IOCStatus; /* 0x0E */ 330 U16 IOCStatus; /* 0x0E */
328 U32 IOCLogInfo; /* 0x10 */ 331 U32 IOCLogInfo; /* 0x10 */
329 U32 TerminationCount; /* 0x14 */ 332 U32 TerminationCount; /* 0x14 */
333 U32 ResponseInfo; /* 0x18 */
330} MPI2_SCSI_TASK_MANAGE_REPLY, 334} MPI2_SCSI_TASK_MANAGE_REPLY,
331 MPI2_POINTER PTR_MPI2_SCSI_TASK_MANAGE_REPLY, 335 MPI2_POINTER PTR_MPI2_SCSI_TASK_MANAGE_REPLY,
332 Mpi2SCSITaskManagementReply_t, MPI2_POINTER pMpi2SCSIManagementReply_t; 336 Mpi2SCSITaskManagementReply_t, MPI2_POINTER pMpi2SCSIManagementReply_t;
@@ -339,8 +343,20 @@ typedef struct _MPI2_SCSI_TASK_MANAGE_REPLY
339#define MPI2_SCSITASKMGMT_RSP_TM_FAILED (0x05) 343#define MPI2_SCSITASKMGMT_RSP_TM_FAILED (0x05)
340#define MPI2_SCSITASKMGMT_RSP_TM_SUCCEEDED (0x08) 344#define MPI2_SCSITASKMGMT_RSP_TM_SUCCEEDED (0x08)
341#define MPI2_SCSITASKMGMT_RSP_TM_INVALID_LUN (0x09) 345#define MPI2_SCSITASKMGMT_RSP_TM_INVALID_LUN (0x09)
346#define MPI2_SCSITASKMGMT_RSP_TM_OVERLAPPED_TAG (0x0A)
342#define MPI2_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC (0x80) 347#define MPI2_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC (0x80)
343 348
349/* masks and shifts for the ResponseInfo field */
350
351#define MPI2_SCSITASKMGMT_RI_MASK_REASONCODE (0x000000FF)
352#define MPI2_SCSITASKMGMT_RI_SHIFT_REASONCODE (0)
353#define MPI2_SCSITASKMGMT_RI_MASK_ARI2 (0x0000FF00)
354#define MPI2_SCSITASKMGMT_RI_SHIFT_ARI2 (8)
355#define MPI2_SCSITASKMGMT_RI_MASK_ARI1 (0x00FF0000)
356#define MPI2_SCSITASKMGMT_RI_SHIFT_ARI1 (16)
357#define MPI2_SCSITASKMGMT_RI_MASK_ARI0 (0xFF000000)
358#define MPI2_SCSITASKMGMT_RI_SHIFT_ARI0 (24)
359
344 360
345/**************************************************************************** 361/****************************************************************************
346* SCSI Enclosure Processor messages 362* SCSI Enclosure Processor messages