1 /*****************************************************************************/
2 /* srp.h -- SCSI RDMA Protocol definitions */
4 /* Written By: Colin Devilbis, IBM Corporation */
6 /* Copyright (C) 2003 IBM Corporation */
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. */
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. */
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 */
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. */
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 /*****************************************************************************/
38 enum viosrp_crq_formats
{
39 VIOSRP_SRP_FORMAT
= 0x01,
40 VIOSRP_MAD_FORMAT
= 0x02,
41 VIOSRP_OS400_FORMAT
= 0x03,
42 VIOSRP_AIX_FORMAT
= 0x04,
43 VIOSRP_LINUX_FORMAT
= 0x06,
44 VIOSRP_INLINE_FORMAT
= 0x07
48 u8 valid
; /* used by RPA */
49 u8 format
; /* SCSI vs out-of-band */
51 u8 status
; /* non-scsi failure? (e.g. DMA failure) */
52 u16 timeout
; /* in seconds */
53 u16 IU_length
; /* in bytes */
54 u64 IU_data_ptr
; /* the TCE for transferring data */
57 /* MADs are Management requests above and beyond the IUs defined in the SRP
60 enum viosrp_mad_types
{
61 VIOSRP_EMPTY_IU_TYPE
= 0x01,
62 VIOSRP_ERROR_LOG_TYPE
= 0x02,
63 VIOSRP_ADAPTER_INFO_TYPE
= 0x03,
64 VIOSRP_HOST_CONFIG_TYPE
= 0x04
78 * All SRP (and MAD) requests normally flow from the
79 * client to the server. There is no way for the server to send
80 * an asynchronous message back to the client. The Empty IU is used
81 * to hang out a meaningless request to the server so that it can respond
82 * asynchrouously with something like a SCSI AER
84 struct viosrp_empty_iu
{
85 struct mad_common common
;
90 struct viosrp_error_log
{
91 struct mad_common common
;
95 struct viosrp_adapter_info
{
96 struct mad_common common
;
100 struct viosrp_host_config
{
101 struct mad_common common
;
106 struct viosrp_empty_iu empty_iu
;
107 struct viosrp_error_log error_log
;
108 struct viosrp_adapter_info adapter_info
;
109 struct viosrp_host_config host_config
;
117 struct mad_adapter_info_data
{
119 char partition_name
[96];
120 u32 partition_number
;
123 u32 port_max_txu
[8]; /* per-port maximum transfer */