Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
viosrp.h
Go to the documentation of this file.
1 /*****************************************************************************/
2 /* srp.h -- SCSI RDMA Protocol definitions */
3 /* */
4 /* Written By: Colin Devilbis, IBM Corporation */
5 /* */
6 /* Copyright (C) 2003 IBM Corporation */
7 /* */
8 /* This program is free software; you can redistribute it and/or modify */
9 /* it under the terms of the GNU General Public License as published by */
10 /* the Free Software Foundation; either version 2 of the License, or */
11 /* (at your option) any later version. */
12 /* */
13 /* This program is distributed in the hope that it will be useful, */
14 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* GNU General Public License for more details. */
17 /* */
18 /* You should have received a copy of the GNU General Public License */
19 /* along with this program; if not, write to the Free Software */
20 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
21 /* */
22 /* */
23 /* This file contains structures and definitions for IBM RPA (RS/6000 */
24 /* platform architecture) implementation of the SRP (SCSI RDMA Protocol) */
25 /* standard. SRP is used on IBM iSeries and pSeries platforms to send SCSI */
26 /* commands between logical partitions. */
27 /* */
28 /* SRP Information Units (IUs) are sent on a "Command/Response Queue" (CRQ) */
29 /* between partitions. The definitions in this file are architected, */
30 /* and cannot be changed without breaking compatibility with other versions */
31 /* of Linux and other operating systems (AIX, OS/400) that talk this protocol*/
32 /* between logical partitions */
33 /*****************************************************************************/
34 #ifndef VIOSRP_H
35 #define VIOSRP_H
36 #include <scsi/srp.h>
37 
38 #define SRP_VERSION "16.a"
39 #define SRP_MAX_IU_LEN 256
40 #define SRP_MAX_LOC_LEN 32
41 
42 union srp_iu {
49  struct srp_cmd cmd;
50  struct srp_rsp rsp;
52 };
53 
61 };
62 
64  VIOSRP_OK = 0x0,
70  VIOSRP_OK2 = 0x99,
71 };
72 
73 struct viosrp_crq {
74  u8 valid; /* used by RPA */
75  u8 format; /* SCSI vs out-of-band */
77  u8 status; /* non-scsi failure? (e.g. DMA failure) */
78  u16 timeout; /* in seconds */
79  u16 IU_length; /* in bytes */
80  u64 IU_data_ptr; /* the TCE for transferring data */
81 };
82 
83 /* MADs are Management requests above and beyond the IUs defined in the SRP
84  * standard.
85  */
93 };
94 
99 };
100 
104 };
105 
110 };
111 
114 };
115 
121 };
122 
123 /*
124  * Common MAD header
125  */
126 struct mad_common {
131 };
132 
133 /*
134  * All SRP (and MAD) requests normally flow from the
135  * client to the server. There is no way for the server to send
136  * an asynchronous message back to the client. The Empty IU is used
137  * to hang out a meaningless request to the server so that it can respond
138  * asynchrouously with something like a SCSI AER
139  */
144 };
145 
149 };
150 
154 };
155 
159 };
160 
163 };
164 
168 };
169 
174 };
175 
179 };
180 
184 };
185 
192 };
193 
194 union mad_iu {
201 };
202 
203 union viosrp_iu {
204  union srp_iu srp;
205  union mad_iu mad;
206 };
207 
209  char srp_version[8];
210  char partition_name[96];
214  u32 port_max_txu[8]; /* per-port maximum transfer */
215 };
216 
217 #endif