Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2005-2010 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 | |
| 18 | #ifndef __BFI_MS_H__ |
| 19 | #define __BFI_MS_H__ |
| 20 | |
| 21 | #include "bfi.h" |
| 22 | #include "bfa_fc.h" |
| 23 | #include "bfa_defs_svc.h" |
| 24 | |
| 25 | #pragma pack(1) |
| 26 | |
| 27 | enum bfi_iocfc_h2i_msgs { |
| 28 | BFI_IOCFC_H2I_CFG_REQ = 1, |
| 29 | BFI_IOCFC_H2I_SET_INTR_REQ = 2, |
| 30 | BFI_IOCFC_H2I_UPDATEQ_REQ = 3, |
| 31 | }; |
| 32 | |
| 33 | enum bfi_iocfc_i2h_msgs { |
| 34 | BFI_IOCFC_I2H_CFG_REPLY = BFA_I2HM(1), |
| 35 | BFI_IOCFC_I2H_UPDATEQ_RSP = BFA_I2HM(3), |
| 36 | }; |
| 37 | |
| 38 | struct bfi_iocfc_cfg_s { |
| 39 | u8 num_cqs; /* Number of CQs to be used */ |
| 40 | u8 sense_buf_len; /* SCSI sense length */ |
| 41 | u16 rsvd_1; |
| 42 | u32 endian_sig; /* endian signature of host */ |
| 43 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 44 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 45 | * Request and response circular queue base addresses, size and |
| 46 | * shadow index pointers. |
| 47 | */ |
| 48 | union bfi_addr_u req_cq_ba[BFI_IOC_MAX_CQS]; |
| 49 | union bfi_addr_u req_shadow_ci[BFI_IOC_MAX_CQS]; |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 50 | __be16 req_cq_elems[BFI_IOC_MAX_CQS]; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 51 | union bfi_addr_u rsp_cq_ba[BFI_IOC_MAX_CQS]; |
| 52 | union bfi_addr_u rsp_shadow_pi[BFI_IOC_MAX_CQS]; |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 53 | __be16 rsp_cq_elems[BFI_IOC_MAX_CQS]; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 54 | |
| 55 | union bfi_addr_u stats_addr; /* DMA-able address for stats */ |
| 56 | union bfi_addr_u cfgrsp_addr; /* config response dma address */ |
| 57 | union bfi_addr_u ioim_snsbase; /* IO sense buffer base address */ |
| 58 | struct bfa_iocfc_intr_attr_s intr_attr; /* IOC interrupt attributes */ |
| 59 | }; |
| 60 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 61 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 62 | * Boot target wwn information for this port. This contains either the stored |
| 63 | * or discovered boot target port wwns for the port. |
| 64 | */ |
| 65 | struct bfi_iocfc_bootwwns { |
| 66 | wwn_t wwn[BFA_BOOT_BOOTLUN_MAX]; |
| 67 | u8 nwwns; |
| 68 | u8 rsvd[7]; |
| 69 | }; |
| 70 | |
Krishna Gudipati | 1118920 | 2011-06-13 15:50:35 -0700 | [diff] [blame^] | 71 | /** |
| 72 | * Queue configuration response from firmware |
| 73 | */ |
| 74 | struct bfi_iocfc_qreg_s { |
| 75 | u32 cpe_q_ci_off[BFI_IOC_MAX_CQS]; |
| 76 | u32 cpe_q_pi_off[BFI_IOC_MAX_CQS]; |
| 77 | u32 cpe_qctl_off[BFI_IOC_MAX_CQS]; |
| 78 | u32 rme_q_ci_off[BFI_IOC_MAX_CQS]; |
| 79 | u32 rme_q_pi_off[BFI_IOC_MAX_CQS]; |
| 80 | u32 rme_qctl_off[BFI_IOC_MAX_CQS]; |
| 81 | }; |
| 82 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 83 | struct bfi_iocfc_cfgrsp_s { |
| 84 | struct bfa_iocfc_fwcfg_s fwcfg; |
| 85 | struct bfa_iocfc_intr_attr_s intr_attr; |
| 86 | struct bfi_iocfc_bootwwns bootwwns; |
| 87 | struct bfi_pbc_s pbc_cfg; |
Krishna Gudipati | 1118920 | 2011-06-13 15:50:35 -0700 | [diff] [blame^] | 88 | struct bfi_iocfc_qreg_s qreg; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 89 | }; |
| 90 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 91 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 92 | * BFI_IOCFC_H2I_CFG_REQ message |
| 93 | */ |
| 94 | struct bfi_iocfc_cfg_req_s { |
| 95 | struct bfi_mhdr_s mh; |
| 96 | union bfi_addr_u ioc_cfg_dma_addr; |
| 97 | }; |
| 98 | |
| 99 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 100 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 101 | * BFI_IOCFC_I2H_CFG_REPLY message |
| 102 | */ |
| 103 | struct bfi_iocfc_cfg_reply_s { |
| 104 | struct bfi_mhdr_s mh; /* Common msg header */ |
| 105 | u8 cfg_success; /* cfg reply status */ |
| 106 | u8 lpu_bm; /* LPUs assigned for this IOC */ |
| 107 | u8 rsvd[2]; |
| 108 | }; |
| 109 | |
| 110 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 111 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 112 | * BFI_IOCFC_H2I_SET_INTR_REQ message |
| 113 | */ |
| 114 | struct bfi_iocfc_set_intr_req_s { |
| 115 | struct bfi_mhdr_s mh; /* common msg header */ |
| 116 | u8 coalesce; /* enable intr coalescing */ |
| 117 | u8 rsvd[3]; |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 118 | __be16 delay; /* delay timer 0..1125us */ |
| 119 | __be16 latency; /* latency timer 0..225us */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 120 | }; |
| 121 | |
| 122 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 123 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 124 | * BFI_IOCFC_H2I_UPDATEQ_REQ message |
| 125 | */ |
| 126 | struct bfi_iocfc_updateq_req_s { |
| 127 | struct bfi_mhdr_s mh; /* common msg header */ |
| 128 | u32 reqq_ba; /* reqq base addr */ |
| 129 | u32 rspq_ba; /* rspq base addr */ |
| 130 | u32 reqq_sci; /* reqq shadow ci */ |
| 131 | u32 rspq_spi; /* rspq shadow pi */ |
| 132 | }; |
| 133 | |
| 134 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 135 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 136 | * BFI_IOCFC_I2H_UPDATEQ_RSP message |
| 137 | */ |
| 138 | struct bfi_iocfc_updateq_rsp_s { |
| 139 | struct bfi_mhdr_s mh; /* common msg header */ |
| 140 | u8 status; /* updateq status */ |
| 141 | u8 rsvd[3]; |
| 142 | }; |
| 143 | |
| 144 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 145 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 146 | * H2I Messages |
| 147 | */ |
| 148 | union bfi_iocfc_h2i_msg_u { |
| 149 | struct bfi_mhdr_s mh; |
| 150 | struct bfi_iocfc_cfg_req_s cfg_req; |
| 151 | struct bfi_iocfc_updateq_req_s updateq_req; |
| 152 | u32 mboxmsg[BFI_IOC_MSGSZ]; |
| 153 | }; |
| 154 | |
| 155 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 156 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 157 | * I2H Messages |
| 158 | */ |
| 159 | union bfi_iocfc_i2h_msg_u { |
| 160 | struct bfi_mhdr_s mh; |
| 161 | struct bfi_iocfc_cfg_reply_s cfg_reply; |
| 162 | struct bfi_iocfc_updateq_rsp_s updateq_rsp; |
| 163 | u32 mboxmsg[BFI_IOC_MSGSZ]; |
| 164 | }; |
| 165 | |
| 166 | |
| 167 | enum bfi_fcport_h2i { |
| 168 | BFI_FCPORT_H2I_ENABLE_REQ = (1), |
| 169 | BFI_FCPORT_H2I_DISABLE_REQ = (2), |
| 170 | BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ = (3), |
| 171 | BFI_FCPORT_H2I_STATS_GET_REQ = (4), |
| 172 | BFI_FCPORT_H2I_STATS_CLEAR_REQ = (5), |
| 173 | }; |
| 174 | |
| 175 | |
| 176 | enum bfi_fcport_i2h { |
| 177 | BFI_FCPORT_I2H_ENABLE_RSP = BFA_I2HM(1), |
| 178 | BFI_FCPORT_I2H_DISABLE_RSP = BFA_I2HM(2), |
| 179 | BFI_FCPORT_I2H_SET_SVC_PARAMS_RSP = BFA_I2HM(3), |
| 180 | BFI_FCPORT_I2H_STATS_GET_RSP = BFA_I2HM(4), |
| 181 | BFI_FCPORT_I2H_STATS_CLEAR_RSP = BFA_I2HM(5), |
| 182 | BFI_FCPORT_I2H_EVENT = BFA_I2HM(6), |
| 183 | BFI_FCPORT_I2H_TRUNK_SCN = BFA_I2HM(7), |
| 184 | BFI_FCPORT_I2H_ENABLE_AEN = BFA_I2HM(8), |
| 185 | BFI_FCPORT_I2H_DISABLE_AEN = BFA_I2HM(9), |
| 186 | }; |
| 187 | |
| 188 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 189 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 190 | * Generic REQ type |
| 191 | */ |
| 192 | struct bfi_fcport_req_s { |
| 193 | struct bfi_mhdr_s mh; /* msg header */ |
| 194 | u32 msgtag; /* msgtag for reply */ |
| 195 | }; |
| 196 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 197 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 198 | * Generic RSP type |
| 199 | */ |
| 200 | struct bfi_fcport_rsp_s { |
| 201 | struct bfi_mhdr_s mh; /* common msg header */ |
| 202 | u8 status; /* port enable status */ |
| 203 | u8 rsvd[3]; |
Krishna Gudipati | f3a060c | 2010-12-13 16:16:50 -0800 | [diff] [blame] | 204 | struct bfa_port_cfg_s port_cfg;/* port configuration */ |
| 205 | u32 msgtag; /* msgtag for reply */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 206 | }; |
| 207 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 208 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 209 | * BFI_FCPORT_H2I_ENABLE_REQ |
| 210 | */ |
| 211 | struct bfi_fcport_enable_req_s { |
| 212 | struct bfi_mhdr_s mh; /* msg header */ |
| 213 | u32 rsvd1; |
| 214 | wwn_t nwwn; /* node wwn of physical port */ |
| 215 | wwn_t pwwn; /* port wwn of physical port */ |
| 216 | struct bfa_port_cfg_s port_cfg; /* port configuration */ |
| 217 | union bfi_addr_u stats_dma_addr; /* DMA address for stats */ |
| 218 | u32 msgtag; /* msgtag for reply */ |
Krishna Gudipati | f3a060c | 2010-12-13 16:16:50 -0800 | [diff] [blame] | 219 | u8 use_flash_cfg; /* get prot cfg from flash */ |
| 220 | u8 rsvd2[3]; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 221 | }; |
| 222 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 223 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 224 | * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ |
| 225 | */ |
| 226 | struct bfi_fcport_set_svc_params_req_s { |
| 227 | struct bfi_mhdr_s mh; /* msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 228 | __be16 tx_bbcredit; /* Tx credits */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 229 | u16 rsvd; |
| 230 | }; |
| 231 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 232 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 233 | * BFI_FCPORT_I2H_EVENT |
| 234 | */ |
| 235 | struct bfi_fcport_event_s { |
| 236 | struct bfi_mhdr_s mh; /* common msg header */ |
| 237 | struct bfa_port_link_s link_state; |
| 238 | }; |
| 239 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 240 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 241 | * BFI_FCPORT_I2H_TRUNK_SCN |
| 242 | */ |
| 243 | struct bfi_fcport_trunk_link_s { |
| 244 | wwn_t trunk_wwn; |
| 245 | u8 fctl; /* bfa_trunk_link_fctl_t */ |
| 246 | u8 state; /* bfa_trunk_link_state_t */ |
| 247 | u8 speed; /* bfa_port_speed_t */ |
| 248 | u8 rsvd; |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 249 | __be32 deskew; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 250 | }; |
| 251 | |
| 252 | #define BFI_FCPORT_MAX_LINKS 2 |
| 253 | struct bfi_fcport_trunk_scn_s { |
| 254 | struct bfi_mhdr_s mh; |
| 255 | u8 trunk_state; /* bfa_trunk_state_t */ |
| 256 | u8 trunk_speed; /* bfa_port_speed_t */ |
| 257 | u8 rsvd_a[2]; |
| 258 | struct bfi_fcport_trunk_link_s tlink[BFI_FCPORT_MAX_LINKS]; |
| 259 | }; |
| 260 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 261 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 262 | * fcport H2I message |
| 263 | */ |
| 264 | union bfi_fcport_h2i_msg_u { |
| 265 | struct bfi_mhdr_s *mhdr; |
| 266 | struct bfi_fcport_enable_req_s *penable; |
| 267 | struct bfi_fcport_req_s *pdisable; |
| 268 | struct bfi_fcport_set_svc_params_req_s *psetsvcparams; |
| 269 | struct bfi_fcport_req_s *pstatsget; |
| 270 | struct bfi_fcport_req_s *pstatsclear; |
| 271 | }; |
| 272 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 273 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 274 | * fcport I2H message |
| 275 | */ |
| 276 | union bfi_fcport_i2h_msg_u { |
| 277 | struct bfi_msg_s *msg; |
| 278 | struct bfi_fcport_rsp_s *penable_rsp; |
| 279 | struct bfi_fcport_rsp_s *pdisable_rsp; |
| 280 | struct bfi_fcport_rsp_s *psetsvcparams_rsp; |
| 281 | struct bfi_fcport_rsp_s *pstatsget_rsp; |
| 282 | struct bfi_fcport_rsp_s *pstatsclear_rsp; |
| 283 | struct bfi_fcport_event_s *event; |
| 284 | struct bfi_fcport_trunk_scn_s *trunk_scn; |
| 285 | }; |
| 286 | |
| 287 | enum bfi_fcxp_h2i { |
| 288 | BFI_FCXP_H2I_SEND_REQ = 1, |
| 289 | }; |
| 290 | |
| 291 | enum bfi_fcxp_i2h { |
| 292 | BFI_FCXP_I2H_SEND_RSP = BFA_I2HM(1), |
| 293 | }; |
| 294 | |
| 295 | #define BFA_FCXP_MAX_SGES 2 |
| 296 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 297 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 298 | * FCXP send request structure |
| 299 | */ |
| 300 | struct bfi_fcxp_send_req_s { |
| 301 | struct bfi_mhdr_s mh; /* Common msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 302 | __be16 fcxp_tag; /* driver request tag */ |
| 303 | __be16 max_frmsz; /* max send frame size */ |
| 304 | __be16 vf_id; /* vsan tag if applicable */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 305 | u16 rport_fw_hndl; /* FW Handle for the remote port */ |
| 306 | u8 class; /* FC class used for req/rsp */ |
| 307 | u8 rsp_timeout; /* timeout in secs, 0-no response */ |
| 308 | u8 cts; /* continue sequence */ |
| 309 | u8 lp_tag; /* lport tag */ |
| 310 | struct fchs_s fchs; /* request FC header structure */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 311 | __be32 req_len; /* request payload length */ |
| 312 | __be32 rsp_maxlen; /* max response length expected */ |
Krishna Gudipati | 85ce928 | 2011-06-13 15:39:36 -0700 | [diff] [blame] | 313 | struct bfi_alen_s req_alen; /* request buffer */ |
| 314 | struct bfi_alen_s rsp_alen; /* response buffer */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 315 | }; |
| 316 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 317 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 318 | * FCXP send response structure |
| 319 | */ |
| 320 | struct bfi_fcxp_send_rsp_s { |
| 321 | struct bfi_mhdr_s mh; /* Common msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 322 | __be16 fcxp_tag; /* send request tag */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 323 | u8 req_status; /* request status */ |
| 324 | u8 rsvd; |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 325 | __be32 rsp_len; /* actual response length */ |
| 326 | __be32 residue_len; /* residual response length */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 327 | struct fchs_s fchs; /* response FC header structure */ |
| 328 | }; |
| 329 | |
| 330 | enum bfi_uf_h2i { |
| 331 | BFI_UF_H2I_BUF_POST = 1, |
| 332 | }; |
| 333 | |
| 334 | enum bfi_uf_i2h { |
| 335 | BFI_UF_I2H_FRM_RCVD = BFA_I2HM(1), |
| 336 | }; |
| 337 | |
| 338 | #define BFA_UF_MAX_SGES 2 |
| 339 | |
| 340 | struct bfi_uf_buf_post_s { |
| 341 | struct bfi_mhdr_s mh; /* Common msg header */ |
| 342 | u16 buf_tag; /* buffer tag */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 343 | __be16 buf_len; /* total buffer length */ |
Krishna Gudipati | 85ce928 | 2011-06-13 15:39:36 -0700 | [diff] [blame] | 344 | struct bfi_alen_s alen; /* buffer address/len pair */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 345 | }; |
| 346 | |
| 347 | struct bfi_uf_frm_rcvd_s { |
| 348 | struct bfi_mhdr_s mh; /* Common msg header */ |
| 349 | u16 buf_tag; /* buffer tag */ |
| 350 | u16 rsvd; |
| 351 | u16 frm_len; /* received frame length */ |
| 352 | u16 xfr_len; /* tranferred length */ |
| 353 | }; |
| 354 | |
| 355 | enum bfi_lps_h2i_msgs { |
| 356 | BFI_LPS_H2I_LOGIN_REQ = 1, |
| 357 | BFI_LPS_H2I_LOGOUT_REQ = 2, |
Krishna Gudipati | b704495 | 2010-12-13 16:17:42 -0800 | [diff] [blame] | 358 | BFI_LPS_H2I_N2N_PID_REQ = 3, |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 359 | }; |
| 360 | |
| 361 | enum bfi_lps_i2h_msgs { |
Krishna Gudipati | 43ffdf4 | 2011-06-13 15:46:21 -0700 | [diff] [blame] | 362 | BFI_LPS_I2H_LOGIN_RSP = BFA_I2HM(1), |
| 363 | BFI_LPS_I2H_LOGOUT_RSP = BFA_I2HM(2), |
| 364 | BFI_LPS_I2H_CVL_EVENT = BFA_I2HM(3), |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 365 | }; |
| 366 | |
| 367 | struct bfi_lps_login_req_s { |
| 368 | struct bfi_mhdr_s mh; /* common msg header */ |
| 369 | u8 lp_tag; |
| 370 | u8 alpa; |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 371 | __be16 pdu_size; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 372 | wwn_t pwwn; |
| 373 | wwn_t nwwn; |
| 374 | u8 fdisc; |
| 375 | u8 auth_en; |
| 376 | u8 rsvd[2]; |
| 377 | }; |
| 378 | |
| 379 | struct bfi_lps_login_rsp_s { |
| 380 | struct bfi_mhdr_s mh; /* common msg header */ |
| 381 | u8 lp_tag; |
| 382 | u8 status; |
| 383 | u8 lsrjt_rsn; |
| 384 | u8 lsrjt_expl; |
| 385 | wwn_t port_name; |
| 386 | wwn_t node_name; |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 387 | __be16 bb_credit; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 388 | u8 f_port; |
| 389 | u8 npiv_en; |
| 390 | u32 lp_pid:24; |
| 391 | u32 auth_req:8; |
| 392 | mac_t lp_mac; |
| 393 | mac_t fcf_mac; |
| 394 | u8 ext_status; |
| 395 | u8 brcd_switch; /* attached peer is brcd switch */ |
| 396 | }; |
| 397 | |
| 398 | struct bfi_lps_logout_req_s { |
| 399 | struct bfi_mhdr_s mh; /* common msg header */ |
| 400 | u8 lp_tag; |
| 401 | u8 rsvd[3]; |
| 402 | wwn_t port_name; |
| 403 | }; |
| 404 | |
| 405 | struct bfi_lps_logout_rsp_s { |
| 406 | struct bfi_mhdr_s mh; /* common msg header */ |
| 407 | u8 lp_tag; |
| 408 | u8 status; |
| 409 | u8 rsvd[2]; |
| 410 | }; |
| 411 | |
| 412 | struct bfi_lps_cvl_event_s { |
| 413 | struct bfi_mhdr_s mh; /* common msg header */ |
| 414 | u8 lp_tag; |
| 415 | u8 rsvd[3]; |
| 416 | }; |
| 417 | |
Krishna Gudipati | b704495 | 2010-12-13 16:17:42 -0800 | [diff] [blame] | 418 | struct bfi_lps_n2n_pid_req_s { |
| 419 | struct bfi_mhdr_s mh; /* common msg header */ |
| 420 | u8 lp_tag; |
| 421 | u32 lp_pid:24; |
| 422 | }; |
| 423 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 424 | union bfi_lps_h2i_msg_u { |
| 425 | struct bfi_mhdr_s *msg; |
| 426 | struct bfi_lps_login_req_s *login_req; |
| 427 | struct bfi_lps_logout_req_s *logout_req; |
Krishna Gudipati | b704495 | 2010-12-13 16:17:42 -0800 | [diff] [blame] | 428 | struct bfi_lps_n2n_pid_req_s *n2n_pid_req; |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 429 | }; |
| 430 | |
| 431 | union bfi_lps_i2h_msg_u { |
| 432 | struct bfi_msg_s *msg; |
| 433 | struct bfi_lps_login_rsp_s *login_rsp; |
| 434 | struct bfi_lps_logout_rsp_s *logout_rsp; |
| 435 | struct bfi_lps_cvl_event_s *cvl_event; |
| 436 | }; |
| 437 | |
| 438 | enum bfi_rport_h2i_msgs { |
| 439 | BFI_RPORT_H2I_CREATE_REQ = 1, |
| 440 | BFI_RPORT_H2I_DELETE_REQ = 2, |
| 441 | BFI_RPORT_H2I_SET_SPEED_REQ = 3, |
| 442 | }; |
| 443 | |
| 444 | enum bfi_rport_i2h_msgs { |
| 445 | BFI_RPORT_I2H_CREATE_RSP = BFA_I2HM(1), |
| 446 | BFI_RPORT_I2H_DELETE_RSP = BFA_I2HM(2), |
| 447 | BFI_RPORT_I2H_QOS_SCN = BFA_I2HM(3), |
| 448 | }; |
| 449 | |
| 450 | struct bfi_rport_create_req_s { |
| 451 | struct bfi_mhdr_s mh; /* common msg header */ |
| 452 | u16 bfa_handle; /* host rport handle */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 453 | __be16 max_frmsz; /* max rcv pdu size */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 454 | u32 pid:24, /* remote port ID */ |
| 455 | lp_tag:8; /* local port tag */ |
| 456 | u32 local_pid:24, /* local port ID */ |
| 457 | cisc:8; |
| 458 | u8 fc_class; /* supported FC classes */ |
| 459 | u8 vf_en; /* virtual fabric enable */ |
| 460 | u16 vf_id; /* virtual fabric ID */ |
| 461 | }; |
| 462 | |
| 463 | struct bfi_rport_create_rsp_s { |
| 464 | struct bfi_mhdr_s mh; /* common msg header */ |
| 465 | u8 status; /* rport creation status */ |
| 466 | u8 rsvd[3]; |
| 467 | u16 bfa_handle; /* host rport handle */ |
| 468 | u16 fw_handle; /* firmware rport handle */ |
| 469 | struct bfa_rport_qos_attr_s qos_attr; /* QoS Attributes */ |
| 470 | }; |
| 471 | |
| 472 | struct bfa_rport_speed_req_s { |
| 473 | struct bfi_mhdr_s mh; /* common msg header */ |
| 474 | u16 fw_handle; /* firmware rport handle */ |
| 475 | u8 speed; /* rport's speed via RPSC */ |
| 476 | u8 rsvd; |
| 477 | }; |
| 478 | |
| 479 | struct bfi_rport_delete_req_s { |
| 480 | struct bfi_mhdr_s mh; /* common msg header */ |
| 481 | u16 fw_handle; /* firmware rport handle */ |
| 482 | u16 rsvd; |
| 483 | }; |
| 484 | |
| 485 | struct bfi_rport_delete_rsp_s { |
| 486 | struct bfi_mhdr_s mh; /* common msg header */ |
| 487 | u16 bfa_handle; /* host rport handle */ |
| 488 | u8 status; /* rport deletion status */ |
| 489 | u8 rsvd; |
| 490 | }; |
| 491 | |
| 492 | struct bfi_rport_qos_scn_s { |
| 493 | struct bfi_mhdr_s mh; /* common msg header */ |
| 494 | u16 bfa_handle; /* host rport handle */ |
| 495 | u16 rsvd; |
| 496 | struct bfa_rport_qos_attr_s old_qos_attr; /* Old QoS Attributes */ |
| 497 | struct bfa_rport_qos_attr_s new_qos_attr; /* New QoS Attributes */ |
| 498 | }; |
| 499 | |
| 500 | union bfi_rport_h2i_msg_u { |
| 501 | struct bfi_msg_s *msg; |
| 502 | struct bfi_rport_create_req_s *create_req; |
| 503 | struct bfi_rport_delete_req_s *delete_req; |
| 504 | struct bfi_rport_speed_req_s *speed_req; |
| 505 | }; |
| 506 | |
| 507 | union bfi_rport_i2h_msg_u { |
| 508 | struct bfi_msg_s *msg; |
| 509 | struct bfi_rport_create_rsp_s *create_rsp; |
| 510 | struct bfi_rport_delete_rsp_s *delete_rsp; |
| 511 | struct bfi_rport_qos_scn_s *qos_scn_evt; |
| 512 | }; |
| 513 | |
| 514 | /* |
| 515 | * Initiator mode I-T nexus interface defines. |
| 516 | */ |
| 517 | |
| 518 | enum bfi_itnim_h2i { |
| 519 | BFI_ITNIM_H2I_CREATE_REQ = 1, /* i-t nexus creation */ |
| 520 | BFI_ITNIM_H2I_DELETE_REQ = 2, /* i-t nexus deletion */ |
| 521 | }; |
| 522 | |
| 523 | enum bfi_itnim_i2h { |
| 524 | BFI_ITNIM_I2H_CREATE_RSP = BFA_I2HM(1), |
| 525 | BFI_ITNIM_I2H_DELETE_RSP = BFA_I2HM(2), |
| 526 | BFI_ITNIM_I2H_SLER_EVENT = BFA_I2HM(3), |
| 527 | }; |
| 528 | |
| 529 | struct bfi_itnim_create_req_s { |
| 530 | struct bfi_mhdr_s mh; /* common msg header */ |
| 531 | u16 fw_handle; /* f/w handle for itnim */ |
| 532 | u8 class; /* FC class for IO */ |
| 533 | u8 seq_rec; /* sequence recovery support */ |
| 534 | u8 msg_no; /* seq id of the msg */ |
| 535 | }; |
| 536 | |
| 537 | struct bfi_itnim_create_rsp_s { |
| 538 | struct bfi_mhdr_s mh; /* common msg header */ |
| 539 | u16 bfa_handle; /* bfa handle for itnim */ |
| 540 | u8 status; /* fcp request status */ |
| 541 | u8 seq_id; /* seq id of the msg */ |
| 542 | }; |
| 543 | |
| 544 | struct bfi_itnim_delete_req_s { |
| 545 | struct bfi_mhdr_s mh; /* common msg header */ |
| 546 | u16 fw_handle; /* f/w itnim handle */ |
| 547 | u8 seq_id; /* seq id of the msg */ |
| 548 | u8 rsvd; |
| 549 | }; |
| 550 | |
| 551 | struct bfi_itnim_delete_rsp_s { |
| 552 | struct bfi_mhdr_s mh; /* common msg header */ |
| 553 | u16 bfa_handle; /* bfa handle for itnim */ |
| 554 | u8 status; /* fcp request status */ |
| 555 | u8 seq_id; /* seq id of the msg */ |
| 556 | }; |
| 557 | |
| 558 | struct bfi_itnim_sler_event_s { |
| 559 | struct bfi_mhdr_s mh; /* common msg header */ |
| 560 | u16 bfa_handle; /* bfa handle for itnim */ |
| 561 | u16 rsvd; |
| 562 | }; |
| 563 | |
| 564 | union bfi_itnim_h2i_msg_u { |
| 565 | struct bfi_itnim_create_req_s *create_req; |
| 566 | struct bfi_itnim_delete_req_s *delete_req; |
| 567 | struct bfi_msg_s *msg; |
| 568 | }; |
| 569 | |
| 570 | union bfi_itnim_i2h_msg_u { |
| 571 | struct bfi_itnim_create_rsp_s *create_rsp; |
| 572 | struct bfi_itnim_delete_rsp_s *delete_rsp; |
| 573 | struct bfi_itnim_sler_event_s *sler_event; |
| 574 | struct bfi_msg_s *msg; |
| 575 | }; |
| 576 | |
| 577 | /* |
| 578 | * Initiator mode IO interface defines. |
| 579 | */ |
| 580 | |
| 581 | enum bfi_ioim_h2i { |
| 582 | BFI_IOIM_H2I_IOABORT_REQ = 1, /* IO abort request */ |
| 583 | BFI_IOIM_H2I_IOCLEANUP_REQ = 2, /* IO cleanup request */ |
| 584 | }; |
| 585 | |
| 586 | enum bfi_ioim_i2h { |
| 587 | BFI_IOIM_I2H_IO_RSP = BFA_I2HM(1), /* non-fp IO response */ |
| 588 | BFI_IOIM_I2H_IOABORT_RSP = BFA_I2HM(2), /* ABORT rsp */ |
| 589 | }; |
| 590 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 591 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 592 | * IO command DIF info |
| 593 | */ |
| 594 | struct bfi_ioim_dif_s { |
| 595 | u32 dif_info[4]; |
| 596 | }; |
| 597 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 598 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 599 | * FCP IO messages overview |
| 600 | * |
| 601 | * @note |
| 602 | * - Max CDB length supported is 64 bytes. |
| 603 | * - SCSI Linked commands and SCSI bi-directional Commands not |
| 604 | * supported. |
| 605 | * |
| 606 | */ |
| 607 | struct bfi_ioim_req_s { |
| 608 | struct bfi_mhdr_s mh; /* Common msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 609 | __be16 io_tag; /* I/O tag */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 610 | u16 rport_hdl; /* itnim/rport firmware handle */ |
| 611 | struct fcp_cmnd_s cmnd; /* IO request info */ |
| 612 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 613 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 614 | * SG elements array within the IO request must be double word |
| 615 | * aligned. This aligment is required to optimize SGM setup for the IO. |
| 616 | */ |
| 617 | struct bfi_sge_s sges[BFI_SGE_INLINE_MAX]; |
| 618 | u8 io_timeout; |
| 619 | u8 dif_en; |
| 620 | u8 rsvd_a[2]; |
| 621 | struct bfi_ioim_dif_s dif; |
| 622 | }; |
| 623 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 624 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 625 | * This table shows various IO status codes from firmware and their |
| 626 | * meaning. Host driver can use these status codes to further process |
| 627 | * IO completions. |
| 628 | * |
| 629 | * BFI_IOIM_STS_OK : IO completed with error free SCSI & |
| 630 | * transport status. |
| 631 | * io-tag can be reused. |
| 632 | * |
| 633 | * BFA_IOIM_STS_SCSI_ERR : IO completed with scsi error. |
| 634 | * - io-tag can be reused. |
| 635 | * |
| 636 | * BFI_IOIM_STS_HOST_ABORTED : IO was aborted successfully due to |
| 637 | * host request. |
| 638 | * - io-tag cannot be reused yet. |
| 639 | * |
| 640 | * BFI_IOIM_STS_ABORTED : IO was aborted successfully |
| 641 | * internally by f/w. |
| 642 | * - io-tag cannot be reused yet. |
| 643 | * |
| 644 | * BFI_IOIM_STS_TIMEDOUT : IO timedout and ABTS/RRQ is happening |
| 645 | * in the firmware and |
| 646 | * - io-tag cannot be reused yet. |
| 647 | * |
| 648 | * BFI_IOIM_STS_SQER_NEEDED : Firmware could not recover the IO |
| 649 | * with sequence level error |
| 650 | * logic and hence host needs to retry |
| 651 | * this IO with a different IO tag |
| 652 | * - io-tag cannot be used yet. |
| 653 | * |
| 654 | * BFI_IOIM_STS_NEXUS_ABORT : Second Level Error Recovery from host |
| 655 | * is required because 2 consecutive ABTS |
| 656 | * timedout and host needs logout and |
| 657 | * re-login with the target |
| 658 | * - io-tag cannot be used yet. |
| 659 | * |
| 660 | * BFI_IOIM_STS_UNDERRUN : IO completed with SCSI status good, |
| 661 | * but the data tranferred is less than |
| 662 | * the fcp data length in the command. |
| 663 | * ex. SCSI INQUIRY where transferred |
| 664 | * data length and residue count in FCP |
| 665 | * response accounts for total fcp-dl |
| 666 | * - io-tag can be reused. |
| 667 | * |
| 668 | * BFI_IOIM_STS_OVERRUN : IO completed with SCSI status good, |
| 669 | * but the data transerred is more than |
| 670 | * fcp data length in the command. ex. |
| 671 | * TAPE IOs where blocks can of unequal |
| 672 | * lengths. |
| 673 | * - io-tag can be reused. |
| 674 | * |
| 675 | * BFI_IOIM_STS_RES_FREE : Firmware has completed using io-tag |
| 676 | * during abort process |
| 677 | * - io-tag can be reused. |
| 678 | * |
| 679 | * BFI_IOIM_STS_PROTO_ERR : Firmware detected a protocol error. |
| 680 | * ex target sent more data than |
| 681 | * requested, or there was data frame |
| 682 | * loss and other reasons |
| 683 | * - io-tag cannot be used yet. |
| 684 | * |
| 685 | * BFI_IOIM_STS_DIF_ERR : Firwmare detected DIF error. ex: DIF |
| 686 | * CRC err or Ref Tag err or App tag err. |
| 687 | * - io-tag can be reused. |
| 688 | * |
| 689 | * BFA_IOIM_STS_TSK_MGT_ABORT : IO was aborted because of Task |
| 690 | * Management command from the host |
| 691 | * - io-tag can be reused. |
| 692 | * |
| 693 | * BFI_IOIM_STS_UTAG : Firmware does not know about this |
| 694 | * io_tag. |
| 695 | * - io-tag can be reused. |
| 696 | */ |
| 697 | enum bfi_ioim_status { |
| 698 | BFI_IOIM_STS_OK = 0, |
| 699 | BFI_IOIM_STS_HOST_ABORTED = 1, |
| 700 | BFI_IOIM_STS_ABORTED = 2, |
| 701 | BFI_IOIM_STS_TIMEDOUT = 3, |
| 702 | BFI_IOIM_STS_RES_FREE = 4, |
| 703 | BFI_IOIM_STS_SQER_NEEDED = 5, |
| 704 | BFI_IOIM_STS_PROTO_ERR = 6, |
| 705 | BFI_IOIM_STS_UTAG = 7, |
| 706 | BFI_IOIM_STS_PATHTOV = 8, |
| 707 | }; |
| 708 | |
| 709 | #define BFI_IOIM_SNSLEN (256) |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 710 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 711 | * I/O response message |
| 712 | */ |
| 713 | struct bfi_ioim_rsp_s { |
| 714 | struct bfi_mhdr_s mh; /* common msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 715 | __be16 io_tag; /* completed IO tag */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 716 | u16 bfa_rport_hndl; /* releated rport handle */ |
| 717 | u8 io_status; /* IO completion status */ |
| 718 | u8 reuse_io_tag; /* IO tag can be reused */ |
| 719 | u16 abort_tag; /* host abort request tag */ |
| 720 | u8 scsi_status; /* scsi status from target */ |
| 721 | u8 sns_len; /* scsi sense length */ |
| 722 | u8 resid_flags; /* IO residue flags */ |
| 723 | u8 rsvd_a; |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 724 | __be32 residue; /* IO residual length in bytes */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 725 | u32 rsvd_b[3]; |
| 726 | }; |
| 727 | |
| 728 | struct bfi_ioim_abort_req_s { |
| 729 | struct bfi_mhdr_s mh; /* Common msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 730 | __be16 io_tag; /* I/O tag */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 731 | u16 abort_tag; /* unique request tag */ |
| 732 | }; |
| 733 | |
| 734 | /* |
| 735 | * Initiator mode task management command interface defines. |
| 736 | */ |
| 737 | |
| 738 | enum bfi_tskim_h2i { |
| 739 | BFI_TSKIM_H2I_TM_REQ = 1, /* task-mgmt command */ |
| 740 | BFI_TSKIM_H2I_ABORT_REQ = 2, /* task-mgmt command */ |
| 741 | }; |
| 742 | |
| 743 | enum bfi_tskim_i2h { |
| 744 | BFI_TSKIM_I2H_TM_RSP = BFA_I2HM(1), |
| 745 | }; |
| 746 | |
| 747 | struct bfi_tskim_req_s { |
| 748 | struct bfi_mhdr_s mh; /* Common msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 749 | __be16 tsk_tag; /* task management tag */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 750 | u16 itn_fhdl; /* itn firmware handle */ |
Maggie Zhang | f314878 | 2010-12-09 19:11:39 -0800 | [diff] [blame] | 751 | struct scsi_lun lun; /* LU number */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 752 | u8 tm_flags; /* see enum fcp_tm_cmnd */ |
| 753 | u8 t_secs; /* Timeout value in seconds */ |
| 754 | u8 rsvd[2]; |
| 755 | }; |
| 756 | |
| 757 | struct bfi_tskim_abortreq_s { |
| 758 | struct bfi_mhdr_s mh; /* Common msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 759 | __be16 tsk_tag; /* task management tag */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 760 | u16 rsvd; |
| 761 | }; |
| 762 | |
| 763 | enum bfi_tskim_status { |
| 764 | /* |
| 765 | * Following are FCP-4 spec defined status codes, |
| 766 | * **DO NOT CHANGE THEM ** |
| 767 | */ |
| 768 | BFI_TSKIM_STS_OK = 0, |
| 769 | BFI_TSKIM_STS_NOT_SUPP = 4, |
| 770 | BFI_TSKIM_STS_FAILED = 5, |
| 771 | |
Jing Huang | acdc79a | 2010-10-18 17:15:55 -0700 | [diff] [blame] | 772 | /* |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 773 | * Defined by BFA |
| 774 | */ |
| 775 | BFI_TSKIM_STS_TIMEOUT = 10, /* TM request timedout */ |
| 776 | BFI_TSKIM_STS_ABORTED = 11, /* Aborted on host request */ |
| 777 | }; |
| 778 | |
| 779 | struct bfi_tskim_rsp_s { |
| 780 | struct bfi_mhdr_s mh; /* Common msg header */ |
Maggie | 50444a3 | 2010-11-29 18:26:32 -0800 | [diff] [blame] | 781 | __be16 tsk_tag; /* task mgmt cmnd tag */ |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 782 | u8 tsk_status; /* @ref bfi_tskim_status */ |
| 783 | u8 rsvd; |
| 784 | }; |
| 785 | |
| 786 | #pragma pack() |
| 787 | |
Krishna Gudipati | 1118920 | 2011-06-13 15:50:35 -0700 | [diff] [blame^] | 788 | /* |
| 789 | * Crossbow PCI MSI-X vector defines |
| 790 | */ |
| 791 | enum { |
| 792 | BFI_MSIX_CPE_QMIN_CB = 0, |
| 793 | BFI_MSIX_CPE_QMAX_CB = 7, |
| 794 | BFI_MSIX_RME_QMIN_CB = 8, |
| 795 | BFI_MSIX_RME_QMAX_CB = 15, |
| 796 | BFI_MSIX_CB_MAX = 22, |
| 797 | }; |
| 798 | |
| 799 | /* |
| 800 | * Catapult FC PCI MSI-X vector defines |
| 801 | */ |
| 802 | enum { |
| 803 | BFI_MSIX_LPU_ERR_CT = 0, |
| 804 | BFI_MSIX_CPE_QMIN_CT = 1, |
| 805 | BFI_MSIX_CPE_QMAX_CT = 4, |
| 806 | BFI_MSIX_RME_QMIN_CT = 5, |
| 807 | BFI_MSIX_RME_QMAX_CT = 8, |
| 808 | BFI_MSIX_CT_MAX = 9, |
| 809 | }; |
| 810 | |
Krishna Gudipati | a36c61f | 2010-09-15 11:50:55 -0700 | [diff] [blame] | 811 | #endif /* __BFI_MS_H__ */ |