diff options
Diffstat (limited to 'drivers/scsi/bfa/include/bfi/bfi_pport.h')
| -rw-r--r-- | drivers/scsi/bfa/include/bfi/bfi_pport.h | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/include/bfi/bfi_pport.h b/drivers/scsi/bfa/include/bfi/bfi_pport.h new file mode 100644 index 000000000000..c96d246851af --- /dev/null +++ b/drivers/scsi/bfa/include/bfi/bfi_pport.h | |||
| @@ -0,0 +1,184 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
| 3 | * All rights reserved | ||
| 4 | * www.brocade.com | ||
| 5 | * | ||
| 6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
| 10 | * published by the Free Software Foundation | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | */ | ||
| 17 | #ifndef __BFI_PPORT_H__ | ||
| 18 | #define __BFI_PPORT_H__ | ||
| 19 | |||
| 20 | #include <bfi/bfi.h> | ||
| 21 | #include <defs/bfa_defs_pport.h> | ||
| 22 | |||
| 23 | #pragma pack(1) | ||
| 24 | |||
| 25 | enum bfi_pport_h2i { | ||
| 26 | BFI_PPORT_H2I_ENABLE_REQ = (1), | ||
| 27 | BFI_PPORT_H2I_DISABLE_REQ = (2), | ||
| 28 | BFI_PPORT_H2I_GET_STATS_REQ = (3), | ||
| 29 | BFI_PPORT_H2I_CLEAR_STATS_REQ = (4), | ||
| 30 | BFI_PPORT_H2I_SET_SVC_PARAMS_REQ = (5), | ||
| 31 | BFI_PPORT_H2I_ENABLE_RX_VF_TAG_REQ = (6), | ||
| 32 | BFI_PPORT_H2I_ENABLE_TX_VF_TAG_REQ = (7), | ||
| 33 | BFI_PPORT_H2I_GET_QOS_STATS_REQ = (8), | ||
| 34 | BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ = (9), | ||
| 35 | }; | ||
| 36 | |||
| 37 | enum bfi_pport_i2h { | ||
| 38 | BFI_PPORT_I2H_ENABLE_RSP = BFA_I2HM(1), | ||
| 39 | BFI_PPORT_I2H_DISABLE_RSP = BFA_I2HM(2), | ||
| 40 | BFI_PPORT_I2H_GET_STATS_RSP = BFA_I2HM(3), | ||
| 41 | BFI_PPORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4), | ||
| 42 | BFI_PPORT_I2H_SET_SVC_PARAMS_RSP = BFA_I2HM(5), | ||
| 43 | BFI_PPORT_I2H_ENABLE_RX_VF_TAG_RSP = BFA_I2HM(6), | ||
| 44 | BFI_PPORT_I2H_ENABLE_TX_VF_TAG_RSP = BFA_I2HM(7), | ||
| 45 | BFI_PPORT_I2H_EVENT = BFA_I2HM(8), | ||
| 46 | BFI_PPORT_I2H_GET_QOS_STATS_RSP = BFA_I2HM(9), | ||
| 47 | BFI_PPORT_I2H_CLEAR_QOS_STATS_RSP = BFA_I2HM(10), | ||
| 48 | }; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * Generic REQ type | ||
| 52 | */ | ||
| 53 | struct bfi_pport_generic_req_s { | ||
| 54 | struct bfi_mhdr_s mh; /* msg header */ | ||
| 55 | u32 msgtag; /* msgtag for reply */ | ||
| 56 | }; | ||
| 57 | |||
| 58 | /** | ||
| 59 | * Generic RSP type | ||
| 60 | */ | ||
| 61 | struct bfi_pport_generic_rsp_s { | ||
| 62 | struct bfi_mhdr_s mh; /* common msg header */ | ||
| 63 | u8 status; /* port enable status */ | ||
| 64 | u8 rsvd[3]; | ||
| 65 | u32 msgtag; /* msgtag for reply */ | ||
| 66 | }; | ||
| 67 | |||
| 68 | /** | ||
| 69 | * BFI_PPORT_H2I_ENABLE_REQ | ||
| 70 | */ | ||
| 71 | struct bfi_pport_enable_req_s { | ||
| 72 | struct bfi_mhdr_s mh; /* msg header */ | ||
| 73 | u32 rsvd1; | ||
| 74 | wwn_t nwwn; /* node wwn of physical port */ | ||
| 75 | wwn_t pwwn; /* port wwn of physical port */ | ||
| 76 | struct bfa_pport_cfg_s port_cfg; /* port configuration */ | ||
| 77 | union bfi_addr_u stats_dma_addr; /* DMA address for stats */ | ||
| 78 | u32 msgtag; /* msgtag for reply */ | ||
| 79 | u32 rsvd2; | ||
| 80 | }; | ||
| 81 | |||
| 82 | /** | ||
| 83 | * BFI_PPORT_I2H_ENABLE_RSP | ||
| 84 | */ | ||
| 85 | #define bfi_pport_enable_rsp_t struct bfi_pport_generic_rsp_s | ||
| 86 | |||
| 87 | /** | ||
| 88 | * BFI_PPORT_H2I_DISABLE_REQ | ||
| 89 | */ | ||
| 90 | #define bfi_pport_disable_req_t struct bfi_pport_generic_req_s | ||
| 91 | |||
| 92 | /** | ||
| 93 | * BFI_PPORT_I2H_DISABLE_RSP | ||
| 94 | */ | ||
| 95 | #define bfi_pport_disable_rsp_t struct bfi_pport_generic_rsp_s | ||
| 96 | |||
| 97 | /** | ||
| 98 | * BFI_PPORT_H2I_GET_STATS_REQ | ||
| 99 | */ | ||
| 100 | #define bfi_pport_get_stats_req_t struct bfi_pport_generic_req_s | ||
| 101 | |||
| 102 | /** | ||
| 103 | * BFI_PPORT_I2H_GET_STATS_RSP | ||
| 104 | */ | ||
| 105 | #define bfi_pport_get_stats_rsp_t struct bfi_pport_generic_rsp_s | ||
| 106 | |||
| 107 | /** | ||
| 108 | * BFI_PPORT_H2I_CLEAR_STATS_REQ | ||
| 109 | */ | ||
| 110 | #define bfi_pport_clear_stats_req_t struct bfi_pport_generic_req_s | ||
| 111 | |||
| 112 | /** | ||
| 113 | * BFI_PPORT_I2H_CLEAR_STATS_RSP | ||
| 114 | */ | ||
| 115 | #define bfi_pport_clear_stats_rsp_t struct bfi_pport_generic_rsp_s | ||
| 116 | |||
| 117 | /** | ||
| 118 | * BFI_PPORT_H2I_GET_QOS_STATS_REQ | ||
| 119 | */ | ||
| 120 | #define bfi_pport_get_qos_stats_req_t struct bfi_pport_generic_req_s | ||
| 121 | |||
| 122 | /** | ||
| 123 | * BFI_PPORT_H2I_GET_QOS_STATS_RSP | ||
| 124 | */ | ||
| 125 | #define bfi_pport_get_qos_stats_rsp_t struct bfi_pport_generic_rsp_s | ||
| 126 | |||
| 127 | /** | ||
| 128 | * BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ | ||
| 129 | */ | ||
| 130 | #define bfi_pport_clear_qos_stats_req_t struct bfi_pport_generic_req_s | ||
| 131 | |||
| 132 | /** | ||
| 133 | * BFI_PPORT_H2I_CLEAR_QOS_STATS_RSP | ||
| 134 | */ | ||
| 135 | #define bfi_pport_clear_qos_stats_rsp_t struct bfi_pport_generic_rsp_s | ||
| 136 | |||
| 137 | /** | ||
| 138 | * BFI_PPORT_H2I_SET_SVC_PARAMS_REQ | ||
| 139 | */ | ||
| 140 | struct bfi_pport_set_svc_params_req_s { | ||
| 141 | struct bfi_mhdr_s mh; /* msg header */ | ||
| 142 | u16 tx_bbcredit; /* Tx credits */ | ||
| 143 | u16 rsvd; | ||
| 144 | }; | ||
| 145 | |||
| 146 | /** | ||
| 147 | * BFI_PPORT_I2H_SET_SVC_PARAMS_RSP | ||
| 148 | */ | ||
| 149 | |||
| 150 | /** | ||
| 151 | * BFI_PPORT_I2H_EVENT | ||
| 152 | */ | ||
| 153 | struct bfi_pport_event_s { | ||
| 154 | struct bfi_mhdr_s mh; /* common msg header */ | ||
| 155 | struct bfa_pport_link_s link_state; | ||
| 156 | }; | ||
| 157 | |||
| 158 | union bfi_pport_h2i_msg_u { | ||
| 159 | struct bfi_mhdr_s *mhdr; | ||
| 160 | struct bfi_pport_enable_req_s *penable; | ||
| 161 | struct bfi_pport_generic_req_s *pdisable; | ||
| 162 | struct bfi_pport_generic_req_s *pgetstats; | ||
| 163 | struct bfi_pport_generic_req_s *pclearstats; | ||
| 164 | struct bfi_pport_set_svc_params_req_s *psetsvcparams; | ||
| 165 | struct bfi_pport_get_qos_stats_req_s *pgetqosstats; | ||
| 166 | struct bfi_pport_generic_req_s *pclearqosstats; | ||
| 167 | }; | ||
| 168 | |||
| 169 | union bfi_pport_i2h_msg_u { | ||
| 170 | struct bfi_msg_s *msg; | ||
| 171 | struct bfi_pport_generic_rsp_s *enable_rsp; | ||
| 172 | struct bfi_pport_disable_rsp_s *disable_rsp; | ||
| 173 | struct bfi_pport_generic_rsp_s *getstats_rsp; | ||
| 174 | struct bfi_pport_clear_stats_rsp_s *clearstats_rsp; | ||
| 175 | struct bfi_pport_set_svc_params_rsp_s *setsvcparasm_rsp; | ||
| 176 | struct bfi_pport_get_qos_stats_rsp_s *getqosstats_rsp; | ||
| 177 | struct bfi_pport_clear_qos_stats_rsp_s *clearqosstats_rsp; | ||
| 178 | struct bfi_pport_event_s *event; | ||
| 179 | }; | ||
| 180 | |||
| 181 | #pragma pack() | ||
| 182 | |||
| 183 | #endif /* __BFI_PPORT_H__ */ | ||
| 184 | |||
