Path: blob/master/drivers/message/fusion/lsi/mpi_lan.h
15111 views
/*1* Copyright (c) 2000-2008 LSI Corporation.2*3*4* Name: mpi_lan.h5* Title: MPI LAN messages and structures6* Creation Date: June 30, 20007*8* mpi_lan.h Version: 01.05.019*10* Version History11* ---------------12*13* Date Version Description14* -------- -------- ------------------------------------------------------15* 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.16* 05-24-00 00.10.02 Added LANStatus field to _MSG_LAN_SEND_REPLY.17* Added LANStatus field to _MSG_LAN_RECEIVE_POST_REPLY.18* Moved ListCount field in _MSG_LAN_RECEIVE_POST_REPLY.19* 06-06-00 01.00.01 Update version number for 1.0 release.20* 06-12-00 01.00.02 Added MPI_ to BUCKETSTATUS_ definitions.21* 06-22-00 01.00.03 Major changes to match new LAN definition in 1.0 spec.22* 06-30-00 01.00.04 Added Context Reply definitions per revised proposal.23* Changed transaction context usage to bucket/buffer.24* 07-05-00 01.00.05 Removed LAN_RECEIVE_POST_BUCKET_CONTEXT_MASK definition25* to lan private header file26* 11-02-00 01.01.01 Original release for post 1.0 work27* 02-20-01 01.01.02 Started using MPI_POINTER.28* 03-27-01 01.01.03 Added structure offset comments.29* 08-08-01 01.02.01 Original release for v1.2 work.30* 05-11-04 01.03.01 Original release for MPI v1.3.31* 08-19-04 01.05.01 Original release for MPI v1.5.32* --------------------------------------------------------------------------33*/3435#ifndef MPI_LAN_H36#define MPI_LAN_H373839/******************************************************************************40*41* L A N M e s s a g e s42*43*******************************************************************************/4445/* LANSend messages */4647typedef struct _MSG_LAN_SEND_REQUEST48{49U16 Reserved; /* 00h */50U8 ChainOffset; /* 02h */51U8 Function; /* 03h */52U16 Reserved2; /* 04h */53U8 PortNumber; /* 06h */54U8 MsgFlags; /* 07h */55U32 MsgContext; /* 08h */56SGE_MPI_UNION SG_List[1]; /* 0Ch */57} MSG_LAN_SEND_REQUEST, MPI_POINTER PTR_MSG_LAN_SEND_REQUEST,58LANSendRequest_t, MPI_POINTER pLANSendRequest_t;596061typedef struct _MSG_LAN_SEND_REPLY62{63U16 Reserved; /* 00h */64U8 MsgLength; /* 02h */65U8 Function; /* 03h */66U8 Reserved2; /* 04h */67U8 NumberOfContexts; /* 05h */68U8 PortNumber; /* 06h */69U8 MsgFlags; /* 07h */70U32 MsgContext; /* 08h */71U16 Reserved3; /* 0Ch */72U16 IOCStatus; /* 0Eh */73U32 IOCLogInfo; /* 10h */74U32 BufferContext; /* 14h */75} MSG_LAN_SEND_REPLY, MPI_POINTER PTR_MSG_LAN_SEND_REPLY,76LANSendReply_t, MPI_POINTER pLANSendReply_t;777879/* LANReceivePost */8081typedef struct _MSG_LAN_RECEIVE_POST_REQUEST82{83U16 Reserved; /* 00h */84U8 ChainOffset; /* 02h */85U8 Function; /* 03h */86U16 Reserved2; /* 04h */87U8 PortNumber; /* 06h */88U8 MsgFlags; /* 07h */89U32 MsgContext; /* 08h */90U32 BucketCount; /* 0Ch */91SGE_MPI_UNION SG_List[1]; /* 10h */92} MSG_LAN_RECEIVE_POST_REQUEST, MPI_POINTER PTR_MSG_LAN_RECEIVE_POST_REQUEST,93LANReceivePostRequest_t, MPI_POINTER pLANReceivePostRequest_t;949596typedef struct _MSG_LAN_RECEIVE_POST_REPLY97{98U16 Reserved; /* 00h */99U8 MsgLength; /* 02h */100U8 Function; /* 03h */101U8 Reserved2; /* 04h */102U8 NumberOfContexts; /* 05h */103U8 PortNumber; /* 06h */104U8 MsgFlags; /* 07h */105U32 MsgContext; /* 08h */106U16 Reserved3; /* 0Ch */107U16 IOCStatus; /* 0Eh */108U32 IOCLogInfo; /* 10h */109U32 BucketsRemaining; /* 14h */110U32 PacketOffset; /* 18h */111U32 PacketLength; /* 1Ch */112U32 BucketContext[1]; /* 20h */113} MSG_LAN_RECEIVE_POST_REPLY, MPI_POINTER PTR_MSG_LAN_RECEIVE_POST_REPLY,114LANReceivePostReply_t, MPI_POINTER pLANReceivePostReply_t;115116117/* LANReset */118119typedef struct _MSG_LAN_RESET_REQUEST120{121U16 Reserved; /* 00h */122U8 ChainOffset; /* 02h */123U8 Function; /* 03h */124U16 Reserved2; /* 04h */125U8 PortNumber; /* 05h */126U8 MsgFlags; /* 07h */127U32 MsgContext; /* 08h */128} MSG_LAN_RESET_REQUEST, MPI_POINTER PTR_MSG_LAN_RESET_REQUEST,129LANResetRequest_t, MPI_POINTER pLANResetRequest_t;130131132typedef struct _MSG_LAN_RESET_REPLY133{134U16 Reserved; /* 00h */135U8 MsgLength; /* 02h */136U8 Function; /* 03h */137U16 Reserved2; /* 04h */138U8 PortNumber; /* 06h */139U8 MsgFlags; /* 07h */140U32 MsgContext; /* 08h */141U16 Reserved3; /* 0Ch */142U16 IOCStatus; /* 0Eh */143U32 IOCLogInfo; /* 10h */144} MSG_LAN_RESET_REPLY, MPI_POINTER PTR_MSG_LAN_RESET_REPLY,145LANResetReply_t, MPI_POINTER pLANResetReply_t;146147148/****************************************************************************/149/* LAN Context Reply defines and macros */150/****************************************************************************/151152#define LAN_REPLY_PACKET_LENGTH_MASK (0x0000FFFF)153#define LAN_REPLY_PACKET_LENGTH_SHIFT (0)154#define LAN_REPLY_BUCKET_CONTEXT_MASK (0x07FF0000)155#define LAN_REPLY_BUCKET_CONTEXT_SHIFT (16)156#define LAN_REPLY_BUFFER_CONTEXT_MASK (0x07FFFFFF)157#define LAN_REPLY_BUFFER_CONTEXT_SHIFT (0)158#define LAN_REPLY_FORM_MASK (0x18000000)159#define LAN_REPLY_FORM_RECEIVE_SINGLE (0x00)160#define LAN_REPLY_FORM_RECEIVE_MULTIPLE (0x01)161#define LAN_REPLY_FORM_SEND_SINGLE (0x02)162#define LAN_REPLY_FORM_MESSAGE_CONTEXT (0x03)163#define LAN_REPLY_FORM_SHIFT (27)164165#define GET_LAN_PACKET_LENGTH(x) (((x) & LAN_REPLY_PACKET_LENGTH_MASK) \166>> LAN_REPLY_PACKET_LENGTH_SHIFT)167168#define SET_LAN_PACKET_LENGTH(x, lth) \169((x) = ((x) & ~LAN_REPLY_PACKET_LENGTH_MASK) | \170(((lth) << LAN_REPLY_PACKET_LENGTH_SHIFT) & \171LAN_REPLY_PACKET_LENGTH_MASK))172173#define GET_LAN_BUCKET_CONTEXT(x) (((x) & LAN_REPLY_BUCKET_CONTEXT_MASK) \174>> LAN_REPLY_BUCKET_CONTEXT_SHIFT)175176#define SET_LAN_BUCKET_CONTEXT(x, ctx) \177((x) = ((x) & ~LAN_REPLY_BUCKET_CONTEXT_MASK) | \178(((ctx) << LAN_REPLY_BUCKET_CONTEXT_SHIFT) & \179LAN_REPLY_BUCKET_CONTEXT_MASK))180181#define GET_LAN_BUFFER_CONTEXT(x) (((x) & LAN_REPLY_BUFFER_CONTEXT_MASK) \182>> LAN_REPLY_BUFFER_CONTEXT_SHIFT)183184#define SET_LAN_BUFFER_CONTEXT(x, ctx) \185((x) = ((x) & ~LAN_REPLY_BUFFER_CONTEXT_MASK) | \186(((ctx) << LAN_REPLY_BUFFER_CONTEXT_SHIFT) & \187LAN_REPLY_BUFFER_CONTEXT_MASK))188189#define GET_LAN_FORM(x) (((x) & LAN_REPLY_FORM_MASK) \190>> LAN_REPLY_FORM_SHIFT)191192#define SET_LAN_FORM(x, frm) \193((x) = ((x) & ~LAN_REPLY_FORM_MASK) | \194(((frm) << LAN_REPLY_FORM_SHIFT) & \195LAN_REPLY_FORM_MASK))196197198/****************************************************************************/199/* LAN Current Device State defines */200/****************************************************************************/201202#define MPI_LAN_DEVICE_STATE_RESET (0x00)203#define MPI_LAN_DEVICE_STATE_OPERATIONAL (0x01)204205206/****************************************************************************/207/* LAN Loopback defines */208/****************************************************************************/209210#define MPI_LAN_TX_MODES_ENABLE_LOOPBACK_SUPPRESSION (0x01)211212#endif213214215216