162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2000-2008 LSI Corporation. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Name: mpi_lan.h 762306a36Sopenharmony_ci * Title: MPI LAN messages and structures 862306a36Sopenharmony_ci * Creation Date: June 30, 2000 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * mpi_lan.h Version: 01.05.01 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * Version History 1362306a36Sopenharmony_ci * --------------- 1462306a36Sopenharmony_ci * 1562306a36Sopenharmony_ci * Date Version Description 1662306a36Sopenharmony_ci * -------- -------- ------------------------------------------------------ 1762306a36Sopenharmony_ci * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 1862306a36Sopenharmony_ci * 05-24-00 00.10.02 Added LANStatus field to _MSG_LAN_SEND_REPLY. 1962306a36Sopenharmony_ci * Added LANStatus field to _MSG_LAN_RECEIVE_POST_REPLY. 2062306a36Sopenharmony_ci * Moved ListCount field in _MSG_LAN_RECEIVE_POST_REPLY. 2162306a36Sopenharmony_ci * 06-06-00 01.00.01 Update version number for 1.0 release. 2262306a36Sopenharmony_ci * 06-12-00 01.00.02 Added MPI_ to BUCKETSTATUS_ definitions. 2362306a36Sopenharmony_ci * 06-22-00 01.00.03 Major changes to match new LAN definition in 1.0 spec. 2462306a36Sopenharmony_ci * 06-30-00 01.00.04 Added Context Reply definitions per revised proposal. 2562306a36Sopenharmony_ci * Changed transaction context usage to bucket/buffer. 2662306a36Sopenharmony_ci * 07-05-00 01.00.05 Removed LAN_RECEIVE_POST_BUCKET_CONTEXT_MASK definition 2762306a36Sopenharmony_ci * to lan private header file 2862306a36Sopenharmony_ci * 11-02-00 01.01.01 Original release for post 1.0 work 2962306a36Sopenharmony_ci * 02-20-01 01.01.02 Started using MPI_POINTER. 3062306a36Sopenharmony_ci * 03-27-01 01.01.03 Added structure offset comments. 3162306a36Sopenharmony_ci * 08-08-01 01.02.01 Original release for v1.2 work. 3262306a36Sopenharmony_ci * 05-11-04 01.03.01 Original release for MPI v1.3. 3362306a36Sopenharmony_ci * 08-19-04 01.05.01 Original release for MPI v1.5. 3462306a36Sopenharmony_ci * -------------------------------------------------------------------------- 3562306a36Sopenharmony_ci */ 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#ifndef MPI_LAN_H 3862306a36Sopenharmony_ci#define MPI_LAN_H 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci/****************************************************************************** 4262306a36Sopenharmony_ci* 4362306a36Sopenharmony_ci* L A N M e s s a g e s 4462306a36Sopenharmony_ci* 4562306a36Sopenharmony_ci*******************************************************************************/ 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* LANSend messages */ 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_citypedef struct _MSG_LAN_SEND_REQUEST 5062306a36Sopenharmony_ci{ 5162306a36Sopenharmony_ci U16 Reserved; /* 00h */ 5262306a36Sopenharmony_ci U8 ChainOffset; /* 02h */ 5362306a36Sopenharmony_ci U8 Function; /* 03h */ 5462306a36Sopenharmony_ci U16 Reserved2; /* 04h */ 5562306a36Sopenharmony_ci U8 PortNumber; /* 06h */ 5662306a36Sopenharmony_ci U8 MsgFlags; /* 07h */ 5762306a36Sopenharmony_ci U32 MsgContext; /* 08h */ 5862306a36Sopenharmony_ci SGE_MPI_UNION SG_List[1]; /* 0Ch */ 5962306a36Sopenharmony_ci} MSG_LAN_SEND_REQUEST, MPI_POINTER PTR_MSG_LAN_SEND_REQUEST, 6062306a36Sopenharmony_ci LANSendRequest_t, MPI_POINTER pLANSendRequest_t; 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_citypedef struct _MSG_LAN_SEND_REPLY 6462306a36Sopenharmony_ci{ 6562306a36Sopenharmony_ci U16 Reserved; /* 00h */ 6662306a36Sopenharmony_ci U8 MsgLength; /* 02h */ 6762306a36Sopenharmony_ci U8 Function; /* 03h */ 6862306a36Sopenharmony_ci U8 Reserved2; /* 04h */ 6962306a36Sopenharmony_ci U8 NumberOfContexts; /* 05h */ 7062306a36Sopenharmony_ci U8 PortNumber; /* 06h */ 7162306a36Sopenharmony_ci U8 MsgFlags; /* 07h */ 7262306a36Sopenharmony_ci U32 MsgContext; /* 08h */ 7362306a36Sopenharmony_ci U16 Reserved3; /* 0Ch */ 7462306a36Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 7562306a36Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 7662306a36Sopenharmony_ci U32 BufferContext; /* 14h */ 7762306a36Sopenharmony_ci} MSG_LAN_SEND_REPLY, MPI_POINTER PTR_MSG_LAN_SEND_REPLY, 7862306a36Sopenharmony_ci LANSendReply_t, MPI_POINTER pLANSendReply_t; 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci/* LANReceivePost */ 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_citypedef struct _MSG_LAN_RECEIVE_POST_REQUEST 8462306a36Sopenharmony_ci{ 8562306a36Sopenharmony_ci U16 Reserved; /* 00h */ 8662306a36Sopenharmony_ci U8 ChainOffset; /* 02h */ 8762306a36Sopenharmony_ci U8 Function; /* 03h */ 8862306a36Sopenharmony_ci U16 Reserved2; /* 04h */ 8962306a36Sopenharmony_ci U8 PortNumber; /* 06h */ 9062306a36Sopenharmony_ci U8 MsgFlags; /* 07h */ 9162306a36Sopenharmony_ci U32 MsgContext; /* 08h */ 9262306a36Sopenharmony_ci U32 BucketCount; /* 0Ch */ 9362306a36Sopenharmony_ci SGE_MPI_UNION SG_List[1]; /* 10h */ 9462306a36Sopenharmony_ci} MSG_LAN_RECEIVE_POST_REQUEST, MPI_POINTER PTR_MSG_LAN_RECEIVE_POST_REQUEST, 9562306a36Sopenharmony_ci LANReceivePostRequest_t, MPI_POINTER pLANReceivePostRequest_t; 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_citypedef struct _MSG_LAN_RECEIVE_POST_REPLY 9962306a36Sopenharmony_ci{ 10062306a36Sopenharmony_ci U16 Reserved; /* 00h */ 10162306a36Sopenharmony_ci U8 MsgLength; /* 02h */ 10262306a36Sopenharmony_ci U8 Function; /* 03h */ 10362306a36Sopenharmony_ci U8 Reserved2; /* 04h */ 10462306a36Sopenharmony_ci U8 NumberOfContexts; /* 05h */ 10562306a36Sopenharmony_ci U8 PortNumber; /* 06h */ 10662306a36Sopenharmony_ci U8 MsgFlags; /* 07h */ 10762306a36Sopenharmony_ci U32 MsgContext; /* 08h */ 10862306a36Sopenharmony_ci U16 Reserved3; /* 0Ch */ 10962306a36Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 11062306a36Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 11162306a36Sopenharmony_ci U32 BucketsRemaining; /* 14h */ 11262306a36Sopenharmony_ci U32 PacketOffset; /* 18h */ 11362306a36Sopenharmony_ci U32 PacketLength; /* 1Ch */ 11462306a36Sopenharmony_ci U32 BucketContext[1]; /* 20h */ 11562306a36Sopenharmony_ci} MSG_LAN_RECEIVE_POST_REPLY, MPI_POINTER PTR_MSG_LAN_RECEIVE_POST_REPLY, 11662306a36Sopenharmony_ci LANReceivePostReply_t, MPI_POINTER pLANReceivePostReply_t; 11762306a36Sopenharmony_ci 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci/* LANReset */ 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_citypedef struct _MSG_LAN_RESET_REQUEST 12262306a36Sopenharmony_ci{ 12362306a36Sopenharmony_ci U16 Reserved; /* 00h */ 12462306a36Sopenharmony_ci U8 ChainOffset; /* 02h */ 12562306a36Sopenharmony_ci U8 Function; /* 03h */ 12662306a36Sopenharmony_ci U16 Reserved2; /* 04h */ 12762306a36Sopenharmony_ci U8 PortNumber; /* 05h */ 12862306a36Sopenharmony_ci U8 MsgFlags; /* 07h */ 12962306a36Sopenharmony_ci U32 MsgContext; /* 08h */ 13062306a36Sopenharmony_ci} MSG_LAN_RESET_REQUEST, MPI_POINTER PTR_MSG_LAN_RESET_REQUEST, 13162306a36Sopenharmony_ci LANResetRequest_t, MPI_POINTER pLANResetRequest_t; 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci 13462306a36Sopenharmony_citypedef struct _MSG_LAN_RESET_REPLY 13562306a36Sopenharmony_ci{ 13662306a36Sopenharmony_ci U16 Reserved; /* 00h */ 13762306a36Sopenharmony_ci U8 MsgLength; /* 02h */ 13862306a36Sopenharmony_ci U8 Function; /* 03h */ 13962306a36Sopenharmony_ci U16 Reserved2; /* 04h */ 14062306a36Sopenharmony_ci U8 PortNumber; /* 06h */ 14162306a36Sopenharmony_ci U8 MsgFlags; /* 07h */ 14262306a36Sopenharmony_ci U32 MsgContext; /* 08h */ 14362306a36Sopenharmony_ci U16 Reserved3; /* 0Ch */ 14462306a36Sopenharmony_ci U16 IOCStatus; /* 0Eh */ 14562306a36Sopenharmony_ci U32 IOCLogInfo; /* 10h */ 14662306a36Sopenharmony_ci} MSG_LAN_RESET_REPLY, MPI_POINTER PTR_MSG_LAN_RESET_REPLY, 14762306a36Sopenharmony_ci LANResetReply_t, MPI_POINTER pLANResetReply_t; 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ci/****************************************************************************/ 15162306a36Sopenharmony_ci/* LAN Context Reply defines and macros */ 15262306a36Sopenharmony_ci/****************************************************************************/ 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci#define LAN_REPLY_PACKET_LENGTH_MASK (0x0000FFFF) 15562306a36Sopenharmony_ci#define LAN_REPLY_PACKET_LENGTH_SHIFT (0) 15662306a36Sopenharmony_ci#define LAN_REPLY_BUCKET_CONTEXT_MASK (0x07FF0000) 15762306a36Sopenharmony_ci#define LAN_REPLY_BUCKET_CONTEXT_SHIFT (16) 15862306a36Sopenharmony_ci#define LAN_REPLY_BUFFER_CONTEXT_MASK (0x07FFFFFF) 15962306a36Sopenharmony_ci#define LAN_REPLY_BUFFER_CONTEXT_SHIFT (0) 16062306a36Sopenharmony_ci#define LAN_REPLY_FORM_MASK (0x18000000) 16162306a36Sopenharmony_ci#define LAN_REPLY_FORM_RECEIVE_SINGLE (0x00) 16262306a36Sopenharmony_ci#define LAN_REPLY_FORM_RECEIVE_MULTIPLE (0x01) 16362306a36Sopenharmony_ci#define LAN_REPLY_FORM_SEND_SINGLE (0x02) 16462306a36Sopenharmony_ci#define LAN_REPLY_FORM_MESSAGE_CONTEXT (0x03) 16562306a36Sopenharmony_ci#define LAN_REPLY_FORM_SHIFT (27) 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci#define GET_LAN_PACKET_LENGTH(x) (((x) & LAN_REPLY_PACKET_LENGTH_MASK) \ 16862306a36Sopenharmony_ci >> LAN_REPLY_PACKET_LENGTH_SHIFT) 16962306a36Sopenharmony_ci 17062306a36Sopenharmony_ci#define SET_LAN_PACKET_LENGTH(x, lth) \ 17162306a36Sopenharmony_ci ((x) = ((x) & ~LAN_REPLY_PACKET_LENGTH_MASK) | \ 17262306a36Sopenharmony_ci (((lth) << LAN_REPLY_PACKET_LENGTH_SHIFT) & \ 17362306a36Sopenharmony_ci LAN_REPLY_PACKET_LENGTH_MASK)) 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci#define GET_LAN_BUCKET_CONTEXT(x) (((x) & LAN_REPLY_BUCKET_CONTEXT_MASK) \ 17662306a36Sopenharmony_ci >> LAN_REPLY_BUCKET_CONTEXT_SHIFT) 17762306a36Sopenharmony_ci 17862306a36Sopenharmony_ci#define SET_LAN_BUCKET_CONTEXT(x, ctx) \ 17962306a36Sopenharmony_ci ((x) = ((x) & ~LAN_REPLY_BUCKET_CONTEXT_MASK) | \ 18062306a36Sopenharmony_ci (((ctx) << LAN_REPLY_BUCKET_CONTEXT_SHIFT) & \ 18162306a36Sopenharmony_ci LAN_REPLY_BUCKET_CONTEXT_MASK)) 18262306a36Sopenharmony_ci 18362306a36Sopenharmony_ci#define GET_LAN_BUFFER_CONTEXT(x) (((x) & LAN_REPLY_BUFFER_CONTEXT_MASK) \ 18462306a36Sopenharmony_ci >> LAN_REPLY_BUFFER_CONTEXT_SHIFT) 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ci#define SET_LAN_BUFFER_CONTEXT(x, ctx) \ 18762306a36Sopenharmony_ci ((x) = ((x) & ~LAN_REPLY_BUFFER_CONTEXT_MASK) | \ 18862306a36Sopenharmony_ci (((ctx) << LAN_REPLY_BUFFER_CONTEXT_SHIFT) & \ 18962306a36Sopenharmony_ci LAN_REPLY_BUFFER_CONTEXT_MASK)) 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ci#define GET_LAN_FORM(x) (((x) & LAN_REPLY_FORM_MASK) \ 19262306a36Sopenharmony_ci >> LAN_REPLY_FORM_SHIFT) 19362306a36Sopenharmony_ci 19462306a36Sopenharmony_ci#define SET_LAN_FORM(x, frm) \ 19562306a36Sopenharmony_ci ((x) = ((x) & ~LAN_REPLY_FORM_MASK) | \ 19662306a36Sopenharmony_ci (((frm) << LAN_REPLY_FORM_SHIFT) & \ 19762306a36Sopenharmony_ci LAN_REPLY_FORM_MASK)) 19862306a36Sopenharmony_ci 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci/****************************************************************************/ 20162306a36Sopenharmony_ci/* LAN Current Device State defines */ 20262306a36Sopenharmony_ci/****************************************************************************/ 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ci#define MPI_LAN_DEVICE_STATE_RESET (0x00) 20562306a36Sopenharmony_ci#define MPI_LAN_DEVICE_STATE_OPERATIONAL (0x01) 20662306a36Sopenharmony_ci 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci/****************************************************************************/ 20962306a36Sopenharmony_ci/* LAN Loopback defines */ 21062306a36Sopenharmony_ci/****************************************************************************/ 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci#define MPI_LAN_TX_MODES_ENABLE_LOOPBACK_SUPPRESSION (0x01) 21362306a36Sopenharmony_ci 21462306a36Sopenharmony_ci#endif 21562306a36Sopenharmony_ci 216