[SCSI] bfa: fix comments for header files

This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com)
regarding comment blocks that begining with "/**". bfa driver comments
currently do not follow kernel-doc convention, we hence replace all
/** with /* and **/ with */.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Jing Huang and committed by
James Bottomley
acdc79a6 e0a08a30

+266 -267
+14 -14
drivers/scsi/bfa/bfa.h
··· 29 typedef void (*bfa_isr_func_t) (struct bfa_s *bfa, struct bfi_msg_s *m); 30 typedef void (*bfa_cb_cbfn_t) (void *cbarg, bfa_boolean_t complete); 31 32 - /** 33 * Interrupt message handlers 34 */ 35 void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m); 36 void bfa_isr_bind(enum bfi_mclass mc, bfa_isr_func_t isr_func); 37 38 - /** 39 * Request and response queue related defines 40 */ 41 #define BFA_REQQ_NELEMS_MIN (4) ··· 58 #define bfa_reqq_produce(__bfa, __reqq) do { \ 59 (__bfa)->iocfc.req_cq_pi[__reqq]++; \ 60 (__bfa)->iocfc.req_cq_pi[__reqq] &= \ 61 - ((__bfa)->iocfc.cfg.drvcfg.num_reqq_elems - 1); \ 62 - writel((__bfa)->iocfc.req_cq_pi[__reqq], \ 63 (__bfa)->iocfc.bfa_regs.cpe_q_pi[__reqq]); \ 64 mmiowb(); \ 65 } while (0) ··· 76 (__index) &= ((__size) - 1); \ 77 } while (0) 78 79 - /** 80 * Queue element to wait for room in request queue. FIFO order is 81 * maintained when fullfilling requests. 82 */ ··· 86 void *cbarg; 87 }; 88 89 - /** 90 * Circular queue usage assignments 91 */ 92 enum { ··· 113 114 #define bfa_reqq(__bfa, __reqq) (&(__bfa)->reqq_waitq[__reqq]) 115 116 - /** 117 * static inline void 118 * bfa_reqq_wait(struct bfa_s *bfa, int reqq, struct bfa_reqq_wait_s *wqe) 119 */ ··· 130 #define bfa_reqq_wcancel(__wqe) list_del(&(__wqe)->qe) 131 132 133 - /** 134 * Generic BFA callback element. 135 */ 136 struct bfa_cb_qe_s { ··· 163 } while (0) 164 165 166 - /** 167 * PCI devices supported by the current BFA 168 */ 169 struct bfa_pciid_s { ··· 173 174 extern char bfa_version[]; 175 176 - /** 177 * BFA memory resources 178 */ 179 enum bfa_mem_type { ··· 203 204 struct bfa_iocfc_regs_s { 205 void __iomem *intr_status; 206 - void __iomem *intr_mask; 207 void __iomem *cpe_q_pi[BFI_IOC_MAX_CQS]; 208 void __iomem *cpe_q_ci[BFI_IOC_MAX_CQS]; 209 void __iomem *cpe_q_depth[BFI_IOC_MAX_CQS]; ··· 214 void __iomem *rme_q_ctrl[BFI_IOC_MAX_CQS]; 215 }; 216 217 - /** 218 * MSIX vector handlers 219 */ 220 #define BFA_MSIX_MAX_VECTORS 22 ··· 224 bfa_msix_handler_t handler[BFA_MSIX_MAX_VECTORS]; 225 }; 226 227 - /** 228 * Chip specific interfaces 229 */ 230 struct bfa_hwif_s { ··· 343 struct bfi_pbc_vport_s *pbc_vport); 344 345 346 - /** 347 *---------------------------------------------------------------------- 348 * BFA public interfaces 349 *----------------------------------------------------------------------
··· 29 typedef void (*bfa_isr_func_t) (struct bfa_s *bfa, struct bfi_msg_s *m); 30 typedef void (*bfa_cb_cbfn_t) (void *cbarg, bfa_boolean_t complete); 31 32 + /* 33 * Interrupt message handlers 34 */ 35 void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m); 36 void bfa_isr_bind(enum bfi_mclass mc, bfa_isr_func_t isr_func); 37 38 + /* 39 * Request and response queue related defines 40 */ 41 #define BFA_REQQ_NELEMS_MIN (4) ··· 58 #define bfa_reqq_produce(__bfa, __reqq) do { \ 59 (__bfa)->iocfc.req_cq_pi[__reqq]++; \ 60 (__bfa)->iocfc.req_cq_pi[__reqq] &= \ 61 + ((__bfa)->iocfc.cfg.drvcfg.num_reqq_elems - 1); \ 62 + writel((__bfa)->iocfc.req_cq_pi[__reqq], \ 63 (__bfa)->iocfc.bfa_regs.cpe_q_pi[__reqq]); \ 64 mmiowb(); \ 65 } while (0) ··· 76 (__index) &= ((__size) - 1); \ 77 } while (0) 78 79 + /* 80 * Queue element to wait for room in request queue. FIFO order is 81 * maintained when fullfilling requests. 82 */ ··· 86 void *cbarg; 87 }; 88 89 + /* 90 * Circular queue usage assignments 91 */ 92 enum { ··· 113 114 #define bfa_reqq(__bfa, __reqq) (&(__bfa)->reqq_waitq[__reqq]) 115 116 + /* 117 * static inline void 118 * bfa_reqq_wait(struct bfa_s *bfa, int reqq, struct bfa_reqq_wait_s *wqe) 119 */ ··· 130 #define bfa_reqq_wcancel(__wqe) list_del(&(__wqe)->qe) 131 132 133 + /* 134 * Generic BFA callback element. 135 */ 136 struct bfa_cb_qe_s { ··· 163 } while (0) 164 165 166 + /* 167 * PCI devices supported by the current BFA 168 */ 169 struct bfa_pciid_s { ··· 173 174 extern char bfa_version[]; 175 176 + /* 177 * BFA memory resources 178 */ 179 enum bfa_mem_type { ··· 203 204 struct bfa_iocfc_regs_s { 205 void __iomem *intr_status; 206 + void __iomem *intr_mask; 207 void __iomem *cpe_q_pi[BFI_IOC_MAX_CQS]; 208 void __iomem *cpe_q_ci[BFI_IOC_MAX_CQS]; 209 void __iomem *cpe_q_depth[BFI_IOC_MAX_CQS]; ··· 214 void __iomem *rme_q_ctrl[BFI_IOC_MAX_CQS]; 215 }; 216 217 + /* 218 * MSIX vector handlers 219 */ 220 #define BFA_MSIX_MAX_VECTORS 22 ··· 224 bfa_msix_handler_t handler[BFA_MSIX_MAX_VECTORS]; 225 }; 226 227 + /* 228 * Chip specific interfaces 229 */ 230 struct bfa_hwif_s { ··· 343 struct bfi_pbc_vport_s *pbc_vport); 344 345 346 + /* 347 *---------------------------------------------------------------------- 348 * BFA public interfaces 349 *----------------------------------------------------------------------
+10 -10
drivers/scsi/bfa/bfa_cb_ioim.h
··· 42 return lun.bfa_lun; 43 } 44 45 - /** 46 * Get LUN for the I/O request 47 */ 48 #define bfa_cb_ioim_get_lun(__dio) \ 49 bfad_int_to_lun(((struct scsi_cmnd *)__dio)->device->lun) 50 51 - /** 52 * Get CDB for the I/O request 53 */ 54 static inline u8 * ··· 59 return (u8 *) cmnd->cmnd; 60 } 61 62 - /** 63 * Get I/O direction (read/write) for the I/O request 64 */ 65 static inline enum fcp_iodir ··· 77 return FCP_IODIR_NONE; 78 } 79 80 - /** 81 * Get IO size in bytes for the I/O request 82 */ 83 static inline u32 ··· 88 return scsi_bufflen(cmnd); 89 } 90 91 - /** 92 * Get timeout for the I/O request 93 */ 94 static inline u8 ··· 104 return 0; 105 } 106 107 - /** 108 * Get Command Reference Number for the I/O request. 0 if none. 109 */ 110 static inline u8 ··· 113 return 0; 114 } 115 116 - /** 117 * Get SAM-3 priority for the I/O request. 0 is default. 118 */ 119 static inline u8 ··· 122 return 0; 123 } 124 125 - /** 126 * Get task attributes for the I/O request. Default is FCP_TASK_ATTR_SIMPLE(0). 127 */ 128 static inline u8 ··· 148 return task_attr; 149 } 150 151 - /** 152 * Get CDB length in bytes for the I/O request. Default is FCP_CMND_CDB_LEN(16). 153 */ 154 static inline u8 ··· 159 return cmnd->cmd_len; 160 } 161 162 - /** 163 * Assign queue to be used for the I/O request. This value depends on whether 164 * the driver wants to use the queues via any specific algorithm. Currently, 165 * this is not supported.
··· 42 return lun.bfa_lun; 43 } 44 45 + /* 46 * Get LUN for the I/O request 47 */ 48 #define bfa_cb_ioim_get_lun(__dio) \ 49 bfad_int_to_lun(((struct scsi_cmnd *)__dio)->device->lun) 50 51 + /* 52 * Get CDB for the I/O request 53 */ 54 static inline u8 * ··· 59 return (u8 *) cmnd->cmnd; 60 } 61 62 + /* 63 * Get I/O direction (read/write) for the I/O request 64 */ 65 static inline enum fcp_iodir ··· 77 return FCP_IODIR_NONE; 78 } 79 80 + /* 81 * Get IO size in bytes for the I/O request 82 */ 83 static inline u32 ··· 88 return scsi_bufflen(cmnd); 89 } 90 91 + /* 92 * Get timeout for the I/O request 93 */ 94 static inline u8 ··· 104 return 0; 105 } 106 107 + /* 108 * Get Command Reference Number for the I/O request. 0 if none. 109 */ 110 static inline u8 ··· 113 return 0; 114 } 115 116 + /* 117 * Get SAM-3 priority for the I/O request. 0 is default. 118 */ 119 static inline u8 ··· 122 return 0; 123 } 124 125 + /* 126 * Get task attributes for the I/O request. Default is FCP_TASK_ATTR_SIMPLE(0). 127 */ 128 static inline u8 ··· 148 return task_attr; 149 } 150 151 + /* 152 * Get CDB length in bytes for the I/O request. Default is FCP_CMND_CDB_LEN(16). 153 */ 154 static inline u8 ··· 159 return cmnd->cmd_len; 160 } 161 162 + /* 163 * Assign queue to be used for the I/O request. This value depends on whether 164 * the driver wants to use the queues via any specific algorithm. Currently, 165 * this is not supported.
+12 -12
drivers/scsi/bfa/bfa_cs.h
··· 15 * General Public License for more details. 16 */ 17 18 - /** 19 * bfa_cs.h BFA common services 20 */ 21 ··· 24 25 #include "bfa_os_inc.h" 26 27 - /** 28 * BFA TRC 29 */ 30 ··· 73 #define BFA_TRC_MOD_SH 10 74 #define BFA_TRC_MOD(__mod) ((BFA_TRC_ ## __mod) << BFA_TRC_MOD_SH) 75 76 - /** 77 * Define a new tracing file (module). Module should match one defined above. 78 */ 79 #define BFA_TRC_FILE(__mod, __submod) \ ··· 155 #define bfa_trc_fp(_trcp, _data) 156 #endif 157 158 - /** 159 * @ BFA LOG interfaces 160 */ 161 #define bfa_assert(__cond) do { \ ··· 249 #define bfa_q_is_on_q(_q, _qe) \ 250 bfa_q_is_on_q_func(_q, (struct list_head *)(_qe)) 251 252 - /** 253 * @ BFA state machine interfaces 254 */ 255 256 typedef void (*bfa_sm_t)(void *sm, int event); 257 258 - /** 259 * oc - object class eg. bfa_ioc 260 * st - state, eg. reset 261 * otype - object type, eg. struct bfa_ioc_s ··· 269 #define bfa_sm_get_state(_sm) ((_sm)->sm) 270 #define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (bfa_sm_t)(_state)) 271 272 - /** 273 * For converting from state machine function to state encoding. 274 */ 275 struct bfa_sm_table_s { ··· 279 }; 280 #define BFA_SM(_sm) ((bfa_sm_t)(_sm)) 281 282 - /** 283 * State machine with entry actions. 284 */ 285 typedef void (*bfa_fsm_t)(void *fsm, int event); 286 287 - /** 288 * oc - object class eg. bfa_ioc 289 * st - state, eg. reset 290 * otype - object type, eg. struct bfa_ioc_s ··· 314 return smt[i].state; 315 } 316 317 - /** 318 * @ Generic wait counter. 319 */ 320 ··· 340 wc->wc_resume(wc->wc_cbarg); 341 } 342 343 - /** 344 * Initialize a waiting counter. 345 */ 346 static inline void ··· 352 bfa_wc_up(wc); 353 } 354 355 - /** 356 * Wait for counter to reach zero 357 */ 358 static inline void
··· 15 * General Public License for more details. 16 */ 17 18 + /* 19 * bfa_cs.h BFA common services 20 */ 21 ··· 24 25 #include "bfa_os_inc.h" 26 27 + /* 28 * BFA TRC 29 */ 30 ··· 73 #define BFA_TRC_MOD_SH 10 74 #define BFA_TRC_MOD(__mod) ((BFA_TRC_ ## __mod) << BFA_TRC_MOD_SH) 75 76 + /* 77 * Define a new tracing file (module). Module should match one defined above. 78 */ 79 #define BFA_TRC_FILE(__mod, __submod) \ ··· 155 #define bfa_trc_fp(_trcp, _data) 156 #endif 157 158 + /* 159 * @ BFA LOG interfaces 160 */ 161 #define bfa_assert(__cond) do { \ ··· 249 #define bfa_q_is_on_q(_q, _qe) \ 250 bfa_q_is_on_q_func(_q, (struct list_head *)(_qe)) 251 252 + /* 253 * @ BFA state machine interfaces 254 */ 255 256 typedef void (*bfa_sm_t)(void *sm, int event); 257 258 + /* 259 * oc - object class eg. bfa_ioc 260 * st - state, eg. reset 261 * otype - object type, eg. struct bfa_ioc_s ··· 269 #define bfa_sm_get_state(_sm) ((_sm)->sm) 270 #define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (bfa_sm_t)(_state)) 271 272 + /* 273 * For converting from state machine function to state encoding. 274 */ 275 struct bfa_sm_table_s { ··· 279 }; 280 #define BFA_SM(_sm) ((bfa_sm_t)(_sm)) 281 282 + /* 283 * State machine with entry actions. 284 */ 285 typedef void (*bfa_fsm_t)(void *fsm, int event); 286 287 + /* 288 * oc - object class eg. bfa_ioc 289 * st - state, eg. reset 290 * otype - object type, eg. struct bfa_ioc_s ··· 314 return smt[i].state; 315 } 316 317 + /* 318 * @ Generic wait counter. 319 */ 320 ··· 340 wc->wc_resume(wc->wc_cbarg); 341 } 342 343 + /* 344 * Initialize a waiting counter. 345 */ 346 static inline void ··· 352 bfa_wc_up(wc); 353 } 354 355 + /* 356 * Wait for counter to reach zero 357 */ 358 static inline void
+27 -27
drivers/scsi/bfa/bfa_defs.h
··· 24 #define BFA_MFG_SERIALNUM_SIZE 11 25 #define STRSZ(_n) (((_n) + 4) & ~3) 26 27 - /** 28 * Manufacturing card type 29 */ 30 enum { ··· 45 46 #pragma pack(1) 47 48 - /** 49 * Check if Mezz card 50 */ 51 #define bfa_mfg_is_mezz(type) (( \ ··· 55 (type) == BFA_MFG_TYPE_LIGHTNING_P0 || \ 56 (type) == BFA_MFG_TYPE_LIGHTNING)) 57 58 - /** 59 * Check if the card having old wwn/mac handling 60 */ 61 #define bfa_mfg_is_old_wwn_mac_model(type) (( \ ··· 78 (m)[2] = t & 0xFF; \ 79 } while (0) 80 81 - /** 82 * VPD data length 83 */ 84 #define BFA_MFG_VPD_LEN 512 85 86 - /** 87 * VPD vendor tag 88 */ 89 enum { ··· 97 BFA_MFG_VPD_PCI_BRCD = 0xf8, /* PCI VPD Brocade */ 98 }; 99 100 - /** 101 * All numerical fields are in big-endian format. 102 */ 103 struct bfa_mfg_vpd_s { ··· 112 113 #pragma pack() 114 115 - /** 116 * Status return values 117 */ 118 enum bfa_status { ··· 167 #define BFA_STRING_32 32 168 #define BFA_VERSION_LEN 64 169 170 - /** 171 * ---------------------- adapter definitions ------------ 172 */ 173 174 - /** 175 * BFA adapter level attributes. 176 */ 177 enum { ··· 215 u8 trunk_capable; 216 }; 217 218 - /** 219 * ---------------------- IOC definitions ------------ 220 */ 221 ··· 224 BFA_IOC_CHIP_REV_LEN = 8, 225 }; 226 227 - /** 228 * Driver and firmware versions. 229 */ 230 struct bfa_ioc_driver_attr_s { ··· 236 char ob_ver[BFA_VERSION_LEN]; /* openboot version */ 237 }; 238 239 - /** 240 * IOC PCI device attributes 241 */ 242 struct bfa_ioc_pci_attr_s { ··· 249 char chip_rev[BFA_IOC_CHIP_REV_LEN]; /* chip revision */ 250 }; 251 252 - /** 253 * IOC states 254 */ 255 enum bfa_ioc_state { ··· 267 BFA_IOC_ENABLING = 12, /* IOC is being enabled */ 268 }; 269 270 - /** 271 * IOC firmware stats 272 */ 273 struct bfa_fw_ioc_stats_s { ··· 279 u32 unknown_reqs; 280 }; 281 282 - /** 283 * IOC driver stats 284 */ 285 struct bfa_ioc_drv_stats_s { ··· 296 u32 enable_replies; 297 }; 298 299 - /** 300 * IOC statistics 301 */ 302 struct bfa_ioc_stats_s { ··· 310 BFA_IOC_TYPE_LL = 3, 311 }; 312 313 - /** 314 * IOC attributes returned in queries 315 */ 316 struct bfa_ioc_attr_s { ··· 323 u8 rsvd[7]; /* 64bit align */ 324 }; 325 326 - /** 327 * ---------------------- mfg definitions ------------ 328 */ 329 330 - /** 331 * Checksum size 332 */ 333 #define BFA_MFG_CHKSUM_SIZE 16 ··· 340 341 #pragma pack(1) 342 343 - /** 344 * All numerical fields are in big-endian format. 345 */ 346 struct bfa_mfg_block_s { ··· 373 374 #pragma pack() 375 376 - /** 377 * ---------------------- pci definitions ------------ 378 */ 379 380 - /** 381 * PCI device and vendor ID information 382 */ 383 enum { ··· 392 ((devid) == BFA_PCI_DEVICE_ID_CT || \ 393 (devid) == BFA_PCI_DEVICE_ID_CT_FC) 394 395 - /** 396 * PCI sub-system device and vendor ID information 397 */ 398 enum { 399 BFA_PCI_FCOE_SSDEVICE_ID = 0x14, 400 }; 401 402 - /** 403 * Maximum number of device address ranges mapped through different BAR(s) 404 */ 405 #define BFA_PCI_ACCESS_RANGES 1 ··· 430 #define BOOT_CFG_REV1 1 431 #define BOOT_CFG_VLAN 1 432 433 - /** 434 * Boot options setting. Boot options setting determines from where 435 * to get the boot lun information 436 */ ··· 442 }; 443 444 #pragma pack(1) 445 - /** 446 * Boot lun information. 447 */ 448 struct bfa_boot_bootlun_s { ··· 451 }; 452 #pragma pack() 453 454 - /** 455 * BOOT boot configuraton 456 */ 457 struct bfa_boot_pbc_s {
··· 24 #define BFA_MFG_SERIALNUM_SIZE 11 25 #define STRSZ(_n) (((_n) + 4) & ~3) 26 27 + /* 28 * Manufacturing card type 29 */ 30 enum { ··· 45 46 #pragma pack(1) 47 48 + /* 49 * Check if Mezz card 50 */ 51 #define bfa_mfg_is_mezz(type) (( \ ··· 55 (type) == BFA_MFG_TYPE_LIGHTNING_P0 || \ 56 (type) == BFA_MFG_TYPE_LIGHTNING)) 57 58 + /* 59 * Check if the card having old wwn/mac handling 60 */ 61 #define bfa_mfg_is_old_wwn_mac_model(type) (( \ ··· 78 (m)[2] = t & 0xFF; \ 79 } while (0) 80 81 + /* 82 * VPD data length 83 */ 84 #define BFA_MFG_VPD_LEN 512 85 86 + /* 87 * VPD vendor tag 88 */ 89 enum { ··· 97 BFA_MFG_VPD_PCI_BRCD = 0xf8, /* PCI VPD Brocade */ 98 }; 99 100 + /* 101 * All numerical fields are in big-endian format. 102 */ 103 struct bfa_mfg_vpd_s { ··· 112 113 #pragma pack() 114 115 + /* 116 * Status return values 117 */ 118 enum bfa_status { ··· 167 #define BFA_STRING_32 32 168 #define BFA_VERSION_LEN 64 169 170 + /* 171 * ---------------------- adapter definitions ------------ 172 */ 173 174 + /* 175 * BFA adapter level attributes. 176 */ 177 enum { ··· 215 u8 trunk_capable; 216 }; 217 218 + /* 219 * ---------------------- IOC definitions ------------ 220 */ 221 ··· 224 BFA_IOC_CHIP_REV_LEN = 8, 225 }; 226 227 + /* 228 * Driver and firmware versions. 229 */ 230 struct bfa_ioc_driver_attr_s { ··· 236 char ob_ver[BFA_VERSION_LEN]; /* openboot version */ 237 }; 238 239 + /* 240 * IOC PCI device attributes 241 */ 242 struct bfa_ioc_pci_attr_s { ··· 249 char chip_rev[BFA_IOC_CHIP_REV_LEN]; /* chip revision */ 250 }; 251 252 + /* 253 * IOC states 254 */ 255 enum bfa_ioc_state { ··· 267 BFA_IOC_ENABLING = 12, /* IOC is being enabled */ 268 }; 269 270 + /* 271 * IOC firmware stats 272 */ 273 struct bfa_fw_ioc_stats_s { ··· 279 u32 unknown_reqs; 280 }; 281 282 + /* 283 * IOC driver stats 284 */ 285 struct bfa_ioc_drv_stats_s { ··· 296 u32 enable_replies; 297 }; 298 299 + /* 300 * IOC statistics 301 */ 302 struct bfa_ioc_stats_s { ··· 310 BFA_IOC_TYPE_LL = 3, 311 }; 312 313 + /* 314 * IOC attributes returned in queries 315 */ 316 struct bfa_ioc_attr_s { ··· 323 u8 rsvd[7]; /* 64bit align */ 324 }; 325 326 + /* 327 * ---------------------- mfg definitions ------------ 328 */ 329 330 + /* 331 * Checksum size 332 */ 333 #define BFA_MFG_CHKSUM_SIZE 16 ··· 340 341 #pragma pack(1) 342 343 + /* 344 * All numerical fields are in big-endian format. 345 */ 346 struct bfa_mfg_block_s { ··· 373 374 #pragma pack() 375 376 + /* 377 * ---------------------- pci definitions ------------ 378 */ 379 380 + /* 381 * PCI device and vendor ID information 382 */ 383 enum { ··· 392 ((devid) == BFA_PCI_DEVICE_ID_CT || \ 393 (devid) == BFA_PCI_DEVICE_ID_CT_FC) 394 395 + /* 396 * PCI sub-system device and vendor ID information 397 */ 398 enum { 399 BFA_PCI_FCOE_SSDEVICE_ID = 0x14, 400 }; 401 402 + /* 403 * Maximum number of device address ranges mapped through different BAR(s) 404 */ 405 #define BFA_PCI_ACCESS_RANGES 1 ··· 430 #define BOOT_CFG_REV1 1 431 #define BOOT_CFG_VLAN 1 432 433 + /* 434 * Boot options setting. Boot options setting determines from where 435 * to get the boot lun information 436 */ ··· 442 }; 443 444 #pragma pack(1) 445 + /* 446 * Boot lun information. 447 */ 448 struct bfa_boot_bootlun_s { ··· 451 }; 452 #pragma pack() 453 454 + /* 455 * BOOT boot configuraton 456 */ 457 struct bfa_boot_pbc_s {
+23 -23
drivers/scsi/bfa/bfa_defs_fcs.h
··· 21 #include "bfa_fc.h" 22 #include "bfa_defs_svc.h" 23 24 - /** 25 * VF states 26 */ 27 enum bfa_vf_state { ··· 35 BFA_VF_ISOLATED = 7, /* port isolated due to vf_id mismatch */ 36 }; 37 38 - /** 39 * VF statistics 40 */ 41 struct bfa_vf_stats_s { ··· 55 u32 resvd; /* padding for 64 bit alignment */ 56 }; 57 58 - /** 59 * VF attributes returned in queries 60 */ 61 struct bfa_vf_attr_s { ··· 67 #define BFA_FCS_MAX_LPORTS 256 68 #define BFA_FCS_FABRIC_IPADDR_SZ 16 69 70 - /** 71 * symbolic names for base port/virtual port 72 */ 73 #define BFA_SYMNAME_MAXLEN 128 /* 128 bytes */ ··· 75 char symname[BFA_SYMNAME_MAXLEN]; 76 }; 77 78 - /** 79 * Roles of FCS port: 80 * - FCP IM and FCP TM roles cannot be enabled together for a FCS port 81 * - Create multiple ports if both IM and TM functions required. ··· 86 BFA_LPORT_ROLE_FCP_MAX = BFA_LPORT_ROLE_FCP_IM, 87 }; 88 89 - /** 90 * FCS port configuration. 91 */ 92 struct bfa_lport_cfg_s { ··· 98 u8 tag[16]; /* opaque tag from application */ 99 }; 100 101 - /** 102 * FCS port states 103 */ 104 enum bfa_lport_state { ··· 108 BFA_LPORT_OFFLINE = 3, /* No login to fabric */ 109 }; 110 111 - /** 112 * FCS port type. 113 */ 114 enum bfa_lport_type { ··· 116 BFA_LPORT_TYPE_VIRTUAL, 117 }; 118 119 - /** 120 * FCS port offline reason. 121 */ 122 enum bfa_lport_offline_reason { ··· 128 BFA_LPORT_OFFLINE_FAB_LOGOUT, 129 }; 130 131 - /** 132 * FCS lport info. 133 */ 134 struct bfa_lport_info_s { ··· 150 151 }; 152 153 - /** 154 * FCS port statistics 155 */ 156 struct bfa_lport_stats_s { ··· 222 * (max retry of plogi) */ 223 }; 224 225 - /** 226 * BFA port attribute returned in queries 227 */ 228 struct bfa_lport_attr_s { ··· 239 }; 240 241 242 - /** 243 * VPORT states 244 */ 245 enum bfa_vport_state { ··· 258 BFA_FCS_VPORT_MAX_STATE, 259 }; 260 261 - /** 262 * vport statistics 263 */ 264 struct bfa_vport_stats_s { ··· 296 u32 rsvd; 297 }; 298 299 - /** 300 * BFA vport attribute returned in queries 301 */ 302 struct bfa_vport_attr_s { ··· 305 u32 rsvd; 306 }; 307 308 - /** 309 * FCS remote port states 310 */ 311 enum bfa_rport_state { ··· 321 BFA_RPORT_NSDISC = 9, /* re-discover rport */ 322 }; 323 324 - /** 325 * Rport Scsi Function : Initiator/Target. 326 */ 327 enum bfa_rport_function { ··· 329 BFA_RPORT_TARGET = 0x02, /* SCSI Target */ 330 }; 331 332 - /** 333 * port/node symbolic names for rport 334 */ 335 #define BFA_RPORT_SYMNAME_MAXLEN 255 ··· 337 char symname[BFA_RPORT_SYMNAME_MAXLEN]; 338 }; 339 340 - /** 341 * FCS remote port statistics 342 */ 343 struct bfa_rport_stats_s { ··· 374 struct bfa_rport_hal_stats_s hal_stats; /* BFA rport stats */ 375 }; 376 377 - /** 378 * FCS remote port attributes returned in queries 379 */ 380 struct bfa_rport_attr_s { ··· 411 #define BFA_MAX_IO_INDEX 7 412 #define BFA_NO_IO_INDEX 9 413 414 - /** 415 * FCS itnim states 416 */ 417 enum bfa_itnim_state { ··· 425 BFA_ITNIM_INITIATIOR = 7, /* initiator */ 426 }; 427 428 - /** 429 * FCS remote port statistics 430 */ 431 struct bfa_itnim_stats_s { ··· 443 u32 rsvd; /* padding for 64 bit alignment */ 444 }; 445 446 - /** 447 * FCS itnim attributes returned in queries 448 */ 449 struct bfa_itnim_attr_s {
··· 21 #include "bfa_fc.h" 22 #include "bfa_defs_svc.h" 23 24 + /* 25 * VF states 26 */ 27 enum bfa_vf_state { ··· 35 BFA_VF_ISOLATED = 7, /* port isolated due to vf_id mismatch */ 36 }; 37 38 + /* 39 * VF statistics 40 */ 41 struct bfa_vf_stats_s { ··· 55 u32 resvd; /* padding for 64 bit alignment */ 56 }; 57 58 + /* 59 * VF attributes returned in queries 60 */ 61 struct bfa_vf_attr_s { ··· 67 #define BFA_FCS_MAX_LPORTS 256 68 #define BFA_FCS_FABRIC_IPADDR_SZ 16 69 70 + /* 71 * symbolic names for base port/virtual port 72 */ 73 #define BFA_SYMNAME_MAXLEN 128 /* 128 bytes */ ··· 75 char symname[BFA_SYMNAME_MAXLEN]; 76 }; 77 78 + /* 79 * Roles of FCS port: 80 * - FCP IM and FCP TM roles cannot be enabled together for a FCS port 81 * - Create multiple ports if both IM and TM functions required. ··· 86 BFA_LPORT_ROLE_FCP_MAX = BFA_LPORT_ROLE_FCP_IM, 87 }; 88 89 + /* 90 * FCS port configuration. 91 */ 92 struct bfa_lport_cfg_s { ··· 98 u8 tag[16]; /* opaque tag from application */ 99 }; 100 101 + /* 102 * FCS port states 103 */ 104 enum bfa_lport_state { ··· 108 BFA_LPORT_OFFLINE = 3, /* No login to fabric */ 109 }; 110 111 + /* 112 * FCS port type. 113 */ 114 enum bfa_lport_type { ··· 116 BFA_LPORT_TYPE_VIRTUAL, 117 }; 118 119 + /* 120 * FCS port offline reason. 121 */ 122 enum bfa_lport_offline_reason { ··· 128 BFA_LPORT_OFFLINE_FAB_LOGOUT, 129 }; 130 131 + /* 132 * FCS lport info. 133 */ 134 struct bfa_lport_info_s { ··· 150 151 }; 152 153 + /* 154 * FCS port statistics 155 */ 156 struct bfa_lport_stats_s { ··· 222 * (max retry of plogi) */ 223 }; 224 225 + /* 226 * BFA port attribute returned in queries 227 */ 228 struct bfa_lport_attr_s { ··· 239 }; 240 241 242 + /* 243 * VPORT states 244 */ 245 enum bfa_vport_state { ··· 258 BFA_FCS_VPORT_MAX_STATE, 259 }; 260 261 + /* 262 * vport statistics 263 */ 264 struct bfa_vport_stats_s { ··· 296 u32 rsvd; 297 }; 298 299 + /* 300 * BFA vport attribute returned in queries 301 */ 302 struct bfa_vport_attr_s { ··· 305 u32 rsvd; 306 }; 307 308 + /* 309 * FCS remote port states 310 */ 311 enum bfa_rport_state { ··· 321 BFA_RPORT_NSDISC = 9, /* re-discover rport */ 322 }; 323 324 + /* 325 * Rport Scsi Function : Initiator/Target. 326 */ 327 enum bfa_rport_function { ··· 329 BFA_RPORT_TARGET = 0x02, /* SCSI Target */ 330 }; 331 332 + /* 333 * port/node symbolic names for rport 334 */ 335 #define BFA_RPORT_SYMNAME_MAXLEN 255 ··· 337 char symname[BFA_RPORT_SYMNAME_MAXLEN]; 338 }; 339 340 + /* 341 * FCS remote port statistics 342 */ 343 struct bfa_rport_stats_s { ··· 374 struct bfa_rport_hal_stats_s hal_stats; /* BFA rport stats */ 375 }; 376 377 + /* 378 * FCS remote port attributes returned in queries 379 */ 380 struct bfa_rport_attr_s { ··· 411 #define BFA_MAX_IO_INDEX 7 412 #define BFA_NO_IO_INDEX 9 413 414 + /* 415 * FCS itnim states 416 */ 417 enum bfa_itnim_state { ··· 425 BFA_ITNIM_INITIATIOR = 7, /* initiator */ 426 }; 427 428 + /* 429 * FCS remote port statistics 430 */ 431 struct bfa_itnim_stats_s { ··· 443 u32 rsvd; /* padding for 64 bit alignment */ 444 }; 445 446 + /* 447 * FCS itnim attributes returned in queries 448 */ 449 struct bfa_itnim_attr_s {
+41 -41
drivers/scsi/bfa/bfa_defs_svc.h
··· 27 #define BFA_IOCFCOE_INTR_DELAY 25 28 #define BFA_IOCFCOE_INTR_LATENCY 5 29 30 - /** 31 * Interrupt coalescing configuration. 32 */ 33 #pragma pack(1) ··· 38 u16 delay; /* delay in microseconds */ 39 }; 40 41 - /** 42 * IOC firmware configuraton 43 */ 44 struct bfa_iocfc_fwcfg_s { ··· 71 u32 rsvd; 72 }; 73 74 - /** 75 * IOC configuration 76 */ 77 struct bfa_iocfc_cfg_s { ··· 79 struct bfa_iocfc_drvcfg_s drvcfg; /* driver side config */ 80 }; 81 82 - /** 83 * IOC firmware IO stats 84 */ 85 struct bfa_fw_io_stats_s { ··· 152 */ 153 }; 154 155 - /** 156 * IOC port firmware stats 157 */ 158 ··· 262 u32 mac_invalids; /* Invalid mac assigned */ 263 }; 264 265 - /** 266 * IOC firmware FCoE port stats 267 */ 268 struct bfa_fw_fcoe_port_stats_s { ··· 270 struct bfa_fw_fip_stats_s fip_stats; 271 }; 272 273 - /** 274 * IOC firmware FC uport stats 275 */ 276 struct bfa_fw_fc_uport_stats_s { ··· 278 struct bfa_fw_port_lksm_stats_s lksm_stats; 279 }; 280 281 - /** 282 * IOC firmware FC port stats 283 */ 284 union bfa_fw_fc_port_stats_s { ··· 286 struct bfa_fw_fcoe_port_stats_s fcoe_stats; 287 }; 288 289 - /** 290 * IOC firmware port stats 291 */ 292 struct bfa_fw_port_stats_s { ··· 295 union bfa_fw_fc_port_stats_s fc_port; 296 }; 297 298 - /** 299 * fcxchg module statistics 300 */ 301 struct bfa_fw_fcxchg_stats_s { ··· 308 u32 cls_tx; 309 }; 310 311 - /** 312 * Trunk statistics 313 */ 314 struct bfa_fw_trunk_stats_s { ··· 334 u32 elp_dropped; /* ELP dropped */ 335 }; 336 337 - /** 338 * IOCFC firmware stats 339 */ 340 struct bfa_fw_iocfc_stats_s { ··· 345 u32 set_intr_reqs; /* set interrupt reqs */ 346 }; 347 348 - /** 349 * IOC attributes returned in queries 350 */ 351 struct bfa_iocfc_attr_s { ··· 353 struct bfa_iocfc_intr_attr_s intr_attr; /* interrupt attr */ 354 }; 355 356 - /** 357 * Eth_sndrcv mod stats 358 */ 359 struct bfa_fw_eth_sndrcv_stats_s { ··· 361 u32 rsvd; /* 64bit align */ 362 }; 363 364 - /** 365 * CT MAC mod stats 366 */ 367 struct bfa_fw_mac_mod_stats_s { ··· 379 u32 rsvd; /* 64bit align */ 380 }; 381 382 - /** 383 * CT MOD stats 384 */ 385 struct bfa_fw_ct_mod_stats_s { ··· 391 u32 rsvd; /* 64bit align */ 392 }; 393 394 - /** 395 * IOC firmware stats 396 */ 397 struct bfa_fw_stats_s { ··· 412 #define BFA_IOCFC_PATHTOV_MAX 60 413 #define BFA_IOCFC_QDEPTH_MAX 2000 414 415 - /** 416 * QoS states 417 */ 418 enum bfa_qos_state { ··· 420 BFA_QOS_OFFLINE = 2, /* QoS is offline */ 421 }; 422 423 - /** 424 * QoS Priority levels. 425 */ 426 enum bfa_qos_priority { ··· 430 BFA_QOS_LOW = 3, /* QoS Priority Level Low */ 431 }; 432 433 - /** 434 * QoS bandwidth allocation for each priority level 435 */ 436 enum bfa_qos_bw_alloc { ··· 439 BFA_QOS_BW_LOW = 10, /* bandwidth allocation for Low */ 440 }; 441 #pragma pack(1) 442 - /** 443 * QoS attribute returned in QoS Query 444 */ 445 struct bfa_qos_attr_s { ··· 448 u32 total_bb_cr; /* Total BB Credits */ 449 }; 450 451 - /** 452 * These fields should be displayed only from the CLI. 453 * There will be a separate BFAL API (get_qos_vc_attr ?) 454 * to retrieve this. ··· 471 * total_vc_count */ 472 }; 473 474 - /** 475 * QoS statistics 476 */ 477 struct bfa_qos_stats_s { ··· 489 u32 rsvd; /* padding for 64 bit alignment */ 490 }; 491 492 - /** 493 * FCoE statistics 494 */ 495 struct bfa_fcoe_stats_s { ··· 540 u64 rxf_bcast_vlan; /* Rx FCoE broadcast vlan frames */ 541 }; 542 543 - /** 544 * QoS or FCoE stats (fcport stats excluding physical FC port stats) 545 */ 546 union bfa_fcport_stats_u { ··· 639 BFA_PORT_ST_MAX_STATE, 640 }; 641 642 - /** 643 * Port operational type (in sync with SNIA port type). 644 */ 645 enum bfa_port_type { ··· 651 BFA_PORT_TYPE_VPORT = 22, /* NPIV - virtual port */ 652 }; 653 654 - /** 655 * Port topology setting. A port's topology and fabric login status 656 * determine its operational type. 657 */ ··· 662 BFA_PORT_TOPOLOGY_AUTO = 3, /* auto topology selection */ 663 }; 664 665 - /** 666 * Physical port loopback types. 667 */ 668 enum bfa_port_opmode { ··· 679 (_mode == BFA_PORT_OPMODE_LB_SLW) || \ 680 (_mode == BFA_PORT_OPMODE_LB_EXT)) 681 682 - /** 683 * Port link state 684 */ 685 enum bfa_port_linkstate { ··· 687 BFA_PORT_LINKDOWN = 2, /* Physical port/Trunk link down */ 688 }; 689 690 - /** 691 * Port link state reason code 692 */ 693 enum bfa_port_linkstate_rsn { ··· 733 CEE_ISCSI_PRI_OVERLAP_FCOE_PRI = 43 734 }; 735 #pragma pack(1) 736 - /** 737 * Physical port configuration 738 */ 739 struct bfa_port_cfg_s { ··· 753 }; 754 #pragma pack() 755 756 - /** 757 * Port attribute values. 758 */ 759 struct bfa_port_attr_s { ··· 800 u8 rsvd1[6]; 801 }; 802 803 - /** 804 * Port FCP mappings. 805 */ 806 struct bfa_port_fcpmap_s { ··· 815 char luid[256]; 816 }; 817 818 - /** 819 * Port RNID info. 820 */ 821 struct bfa_port_rnid_s { ··· 848 mac_t mac; /* FCF mac */ 849 }; 850 851 - /** 852 * Trunk states for BCU/BFAL 853 */ 854 enum bfa_trunk_state { ··· 857 BFA_TRUNK_OFFLINE = 2, /* Trunk is offline */ 858 }; 859 860 - /** 861 * VC attributes for trunked link 862 */ 863 struct bfa_trunk_vc_attr_s { ··· 867 u16 vc_credits[8]; 868 }; 869 870 - /** 871 * Link state information 872 */ 873 struct bfa_port_link_s { ··· 959 u32 rsvd; 960 }; 961 #pragma pack(1) 962 - /** 963 * Rport's QoS attributes 964 */ 965 struct bfa_rport_qos_attr_s { ··· 987 struct bfa_itnim_latency_s io_latency; 988 }; 989 990 - /** 991 * FC physical port statistics. 992 */ 993 struct bfa_port_fc_stats_s { ··· 1022 u64 err_enc; /* Encoding err frame_8b10b */ 1023 }; 1024 1025 - /** 1026 * Eth Physical Port statistics. 1027 */ 1028 struct bfa_port_eth_stats_s { ··· 1070 u64 tx_iscsi_zero_pause; /* Tx iSCSI zero pause */ 1071 }; 1072 1073 - /** 1074 * Port statistics. 1075 */ 1076 union bfa_port_stats_u {
··· 27 #define BFA_IOCFCOE_INTR_DELAY 25 28 #define BFA_IOCFCOE_INTR_LATENCY 5 29 30 + /* 31 * Interrupt coalescing configuration. 32 */ 33 #pragma pack(1) ··· 38 u16 delay; /* delay in microseconds */ 39 }; 40 41 + /* 42 * IOC firmware configuraton 43 */ 44 struct bfa_iocfc_fwcfg_s { ··· 71 u32 rsvd; 72 }; 73 74 + /* 75 * IOC configuration 76 */ 77 struct bfa_iocfc_cfg_s { ··· 79 struct bfa_iocfc_drvcfg_s drvcfg; /* driver side config */ 80 }; 81 82 + /* 83 * IOC firmware IO stats 84 */ 85 struct bfa_fw_io_stats_s { ··· 152 */ 153 }; 154 155 + /* 156 * IOC port firmware stats 157 */ 158 ··· 262 u32 mac_invalids; /* Invalid mac assigned */ 263 }; 264 265 + /* 266 * IOC firmware FCoE port stats 267 */ 268 struct bfa_fw_fcoe_port_stats_s { ··· 270 struct bfa_fw_fip_stats_s fip_stats; 271 }; 272 273 + /* 274 * IOC firmware FC uport stats 275 */ 276 struct bfa_fw_fc_uport_stats_s { ··· 278 struct bfa_fw_port_lksm_stats_s lksm_stats; 279 }; 280 281 + /* 282 * IOC firmware FC port stats 283 */ 284 union bfa_fw_fc_port_stats_s { ··· 286 struct bfa_fw_fcoe_port_stats_s fcoe_stats; 287 }; 288 289 + /* 290 * IOC firmware port stats 291 */ 292 struct bfa_fw_port_stats_s { ··· 295 union bfa_fw_fc_port_stats_s fc_port; 296 }; 297 298 + /* 299 * fcxchg module statistics 300 */ 301 struct bfa_fw_fcxchg_stats_s { ··· 308 u32 cls_tx; 309 }; 310 311 + /* 312 * Trunk statistics 313 */ 314 struct bfa_fw_trunk_stats_s { ··· 334 u32 elp_dropped; /* ELP dropped */ 335 }; 336 337 + /* 338 * IOCFC firmware stats 339 */ 340 struct bfa_fw_iocfc_stats_s { ··· 345 u32 set_intr_reqs; /* set interrupt reqs */ 346 }; 347 348 + /* 349 * IOC attributes returned in queries 350 */ 351 struct bfa_iocfc_attr_s { ··· 353 struct bfa_iocfc_intr_attr_s intr_attr; /* interrupt attr */ 354 }; 355 356 + /* 357 * Eth_sndrcv mod stats 358 */ 359 struct bfa_fw_eth_sndrcv_stats_s { ··· 361 u32 rsvd; /* 64bit align */ 362 }; 363 364 + /* 365 * CT MAC mod stats 366 */ 367 struct bfa_fw_mac_mod_stats_s { ··· 379 u32 rsvd; /* 64bit align */ 380 }; 381 382 + /* 383 * CT MOD stats 384 */ 385 struct bfa_fw_ct_mod_stats_s { ··· 391 u32 rsvd; /* 64bit align */ 392 }; 393 394 + /* 395 * IOC firmware stats 396 */ 397 struct bfa_fw_stats_s { ··· 412 #define BFA_IOCFC_PATHTOV_MAX 60 413 #define BFA_IOCFC_QDEPTH_MAX 2000 414 415 + /* 416 * QoS states 417 */ 418 enum bfa_qos_state { ··· 420 BFA_QOS_OFFLINE = 2, /* QoS is offline */ 421 }; 422 423 + /* 424 * QoS Priority levels. 425 */ 426 enum bfa_qos_priority { ··· 430 BFA_QOS_LOW = 3, /* QoS Priority Level Low */ 431 }; 432 433 + /* 434 * QoS bandwidth allocation for each priority level 435 */ 436 enum bfa_qos_bw_alloc { ··· 439 BFA_QOS_BW_LOW = 10, /* bandwidth allocation for Low */ 440 }; 441 #pragma pack(1) 442 + /* 443 * QoS attribute returned in QoS Query 444 */ 445 struct bfa_qos_attr_s { ··· 448 u32 total_bb_cr; /* Total BB Credits */ 449 }; 450 451 + /* 452 * These fields should be displayed only from the CLI. 453 * There will be a separate BFAL API (get_qos_vc_attr ?) 454 * to retrieve this. ··· 471 * total_vc_count */ 472 }; 473 474 + /* 475 * QoS statistics 476 */ 477 struct bfa_qos_stats_s { ··· 489 u32 rsvd; /* padding for 64 bit alignment */ 490 }; 491 492 + /* 493 * FCoE statistics 494 */ 495 struct bfa_fcoe_stats_s { ··· 540 u64 rxf_bcast_vlan; /* Rx FCoE broadcast vlan frames */ 541 }; 542 543 + /* 544 * QoS or FCoE stats (fcport stats excluding physical FC port stats) 545 */ 546 union bfa_fcport_stats_u { ··· 639 BFA_PORT_ST_MAX_STATE, 640 }; 641 642 + /* 643 * Port operational type (in sync with SNIA port type). 644 */ 645 enum bfa_port_type { ··· 651 BFA_PORT_TYPE_VPORT = 22, /* NPIV - virtual port */ 652 }; 653 654 + /* 655 * Port topology setting. A port's topology and fabric login status 656 * determine its operational type. 657 */ ··· 662 BFA_PORT_TOPOLOGY_AUTO = 3, /* auto topology selection */ 663 }; 664 665 + /* 666 * Physical port loopback types. 667 */ 668 enum bfa_port_opmode { ··· 679 (_mode == BFA_PORT_OPMODE_LB_SLW) || \ 680 (_mode == BFA_PORT_OPMODE_LB_EXT)) 681 682 + /* 683 * Port link state 684 */ 685 enum bfa_port_linkstate { ··· 687 BFA_PORT_LINKDOWN = 2, /* Physical port/Trunk link down */ 688 }; 689 690 + /* 691 * Port link state reason code 692 */ 693 enum bfa_port_linkstate_rsn { ··· 733 CEE_ISCSI_PRI_OVERLAP_FCOE_PRI = 43 734 }; 735 #pragma pack(1) 736 + /* 737 * Physical port configuration 738 */ 739 struct bfa_port_cfg_s { ··· 753 }; 754 #pragma pack() 755 756 + /* 757 * Port attribute values. 758 */ 759 struct bfa_port_attr_s { ··· 800 u8 rsvd1[6]; 801 }; 802 803 + /* 804 * Port FCP mappings. 805 */ 806 struct bfa_port_fcpmap_s { ··· 815 char luid[256]; 816 }; 817 818 + /* 819 * Port RNID info. 820 */ 821 struct bfa_port_rnid_s { ··· 848 mac_t mac; /* FCF mac */ 849 }; 850 851 + /* 852 * Trunk states for BCU/BFAL 853 */ 854 enum bfa_trunk_state { ··· 857 BFA_TRUNK_OFFLINE = 2, /* Trunk is offline */ 858 }; 859 860 + /* 861 * VC attributes for trunked link 862 */ 863 struct bfa_trunk_vc_attr_s { ··· 867 u16 vc_credits[8]; 868 }; 869 870 + /* 871 * Link state information 872 */ 873 struct bfa_port_link_s { ··· 959 u32 rsvd; 960 }; 961 #pragma pack(1) 962 + /* 963 * Rport's QoS attributes 964 */ 965 struct bfa_rport_qos_attr_s { ··· 987 struct bfa_itnim_latency_s io_latency; 988 }; 989 990 + /* 991 * FC physical port statistics. 992 */ 993 struct bfa_port_fc_stats_s { ··· 1022 u64 err_enc; /* Encoding err frame_8b10b */ 1023 }; 1024 1025 + /* 1026 * Eth Physical Port statistics. 1027 */ 1028 struct bfa_port_eth_stats_s { ··· 1070 u64 tx_iscsi_zero_pause; /* Tx iSCSI zero pause */ 1071 }; 1072 1073 + /* 1074 * Port statistics. 1075 */ 1076 union bfa_port_stats_u {
+15 -15
drivers/scsi/bfa/bfa_fc.h
··· 1029 struct link_e2e_beacon_param_s beacon_parm; 1030 }; 1031 1032 - /** 1033 * If RPSC request is sent to the Domain Controller, the request is for 1034 * all the ports within that domain (TODO - I don't think FOS implements 1035 * this...). ··· 1049 struct fc_rpsc_speed_info_s speed_info[1]; 1050 }; 1051 1052 - /** 1053 * If RPSC2 request is sent to the Domain Controller, 1054 */ 1055 #define FC_BRCD_TOKEN 0x42524344 ··· 1094 struct fc_rpsc2_port_info_s port_info[1]; /* port information */ 1095 }; 1096 1097 - /** 1098 * bit fields so that multiple classes can be specified 1099 */ 1100 enum fc_cos { ··· 1131 #define FC_VF_ID_MAX 0xEFF 1132 #define FC_VF_ID_CTL 0xFEF /* control VF_ID */ 1133 1134 - /** 1135 * Virtual Fabric Tagging header format 1136 * @caution This is defined only in BIG ENDIAN format. 1137 */ ··· 1463 u32 dap:24; /* port identifier */ 1464 }; 1465 1466 - /** 1467 * RFT_ID 1468 */ 1469 struct fcgs_rftid_req_s { ··· 1472 u32 fc4_type[8]; /* fc4 types */ 1473 }; 1474 1475 - /** 1476 * RFF_ID : Register FC4 features. 1477 */ 1478 ··· 1487 u32 fc4_type:8; /* corresponding FC4 Type */ 1488 }; 1489 1490 - /** 1491 * GID_FT Request 1492 */ 1493 struct fcgs_gidft_req_s { ··· 1497 u8 fc4_type; /* FC_TYPE_FCP for SCSI devices */ 1498 }; /* GID_FT Request */ 1499 1500 - /** 1501 * GID_FT Response 1502 */ 1503 struct fcgs_gidft_resp_s { ··· 1506 u32 pid:24; /* port identifier */ 1507 }; /* GID_FT Response */ 1508 1509 - /** 1510 * RSPN_ID 1511 */ 1512 struct fcgs_rspnid_req_s { ··· 1516 u8 spn[256]; /* symbolic port name */ 1517 }; 1518 1519 - /** 1520 * RPN_ID 1521 */ 1522 struct fcgs_rpnid_req_s { ··· 1525 wwn_t port_name; 1526 }; 1527 1528 - /** 1529 * RNN_ID 1530 */ 1531 struct fcgs_rnnid_req_s { ··· 1534 wwn_t node_name; 1535 }; 1536 1537 - /** 1538 * RCS_ID 1539 */ 1540 struct fcgs_rcsid_req_s { ··· 1543 u32 cos; 1544 }; 1545 1546 - /** 1547 * RPT_ID 1548 */ 1549 struct fcgs_rptid_req_s { ··· 1553 u32 rsvd1:24; 1554 }; 1555 1556 - /** 1557 * GA_NXT Request 1558 */ 1559 struct fcgs_ganxt_req_s { ··· 1561 u32 port_id:24; 1562 }; 1563 1564 - /** 1565 * GA_NXT Response 1566 */ 1567 struct fcgs_ganxt_rsp_s {
··· 1029 struct link_e2e_beacon_param_s beacon_parm; 1030 }; 1031 1032 + /* 1033 * If RPSC request is sent to the Domain Controller, the request is for 1034 * all the ports within that domain (TODO - I don't think FOS implements 1035 * this...). ··· 1049 struct fc_rpsc_speed_info_s speed_info[1]; 1050 }; 1051 1052 + /* 1053 * If RPSC2 request is sent to the Domain Controller, 1054 */ 1055 #define FC_BRCD_TOKEN 0x42524344 ··· 1094 struct fc_rpsc2_port_info_s port_info[1]; /* port information */ 1095 }; 1096 1097 + /* 1098 * bit fields so that multiple classes can be specified 1099 */ 1100 enum fc_cos { ··· 1131 #define FC_VF_ID_MAX 0xEFF 1132 #define FC_VF_ID_CTL 0xFEF /* control VF_ID */ 1133 1134 + /* 1135 * Virtual Fabric Tagging header format 1136 * @caution This is defined only in BIG ENDIAN format. 1137 */ ··· 1463 u32 dap:24; /* port identifier */ 1464 }; 1465 1466 + /* 1467 * RFT_ID 1468 */ 1469 struct fcgs_rftid_req_s { ··· 1472 u32 fc4_type[8]; /* fc4 types */ 1473 }; 1474 1475 + /* 1476 * RFF_ID : Register FC4 features. 1477 */ 1478 ··· 1487 u32 fc4_type:8; /* corresponding FC4 Type */ 1488 }; 1489 1490 + /* 1491 * GID_FT Request 1492 */ 1493 struct fcgs_gidft_req_s { ··· 1497 u8 fc4_type; /* FC_TYPE_FCP for SCSI devices */ 1498 }; /* GID_FT Request */ 1499 1500 + /* 1501 * GID_FT Response 1502 */ 1503 struct fcgs_gidft_resp_s { ··· 1506 u32 pid:24; /* port identifier */ 1507 }; /* GID_FT Response */ 1508 1509 + /* 1510 * RSPN_ID 1511 */ 1512 struct fcgs_rspnid_req_s { ··· 1516 u8 spn[256]; /* symbolic port name */ 1517 }; 1518 1519 + /* 1520 * RPN_ID 1521 */ 1522 struct fcgs_rpnid_req_s { ··· 1525 wwn_t port_name; 1526 }; 1527 1528 + /* 1529 * RNN_ID 1530 */ 1531 struct fcgs_rnnid_req_s { ··· 1534 wwn_t node_name; 1535 }; 1536 1537 + /* 1538 * RCS_ID 1539 */ 1540 struct fcgs_rcsid_req_s { ··· 1543 u32 cos; 1544 }; 1545 1546 + /* 1547 * RPT_ID 1548 */ 1549 struct fcgs_rptid_req_s { ··· 1553 u32 rsvd1:24; 1554 }; 1555 1556 + /* 1557 * GA_NXT Request 1558 */ 1559 struct fcgs_ganxt_req_s { ··· 1561 u32 port_id:24; 1562 }; 1563 1564 + /* 1565 * GA_NXT Response 1566 */ 1567 struct fcgs_ganxt_rsp_s {
+9 -9
drivers/scsi/bfa/bfa_fcpim.h
··· 104 bfa_fcpim_profile_t profile_start; 105 }; 106 107 - /** 108 * BFA IO (initiator mode) 109 */ 110 struct bfa_ioim_s { ··· 137 struct bfa_tskim_s *tskim; /* Relevant TM cmd */ 138 }; 139 140 - /** 141 * BFA Task management command (initiator mode) 142 */ 143 struct bfa_tskim_s { ··· 160 }; 161 162 163 - /** 164 * BFA i-t-n (initiator mode) 165 */ 166 struct bfa_itnim_s { ··· 303 struct bfa_itnim_ioprofile_s *ioprofile); 304 #define bfa_itnim_get_reqq(__ioim) (((struct bfa_ioim_s *)__ioim)->itnim->reqq) 305 306 - /** 307 * BFA completion callback for bfa_itnim_online(). 308 * 309 * @param[in] itnim FCS or driver itnim instance ··· 312 */ 313 void bfa_cb_itnim_online(void *itnim); 314 315 - /** 316 * BFA completion callback for bfa_itnim_offline(). 317 * 318 * @param[in] itnim FCS or driver itnim instance ··· 323 void bfa_cb_itnim_tov_begin(void *itnim); 324 void bfa_cb_itnim_tov(void *itnim); 325 326 - /** 327 * BFA notification to FCS/driver for second level error recovery. 328 * 329 * Atleast one I/O request has timedout and target is unresponsive to ··· 351 bfa_boolean_t iotov); 352 353 354 - /** 355 * I/O completion notification. 356 * 357 * @param[in] dio driver IO structure ··· 368 u8 scsi_status, int sns_len, 369 u8 *sns_info, s32 residue); 370 371 - /** 372 * I/O good completion notification. 373 * 374 * @param[in] dio driver IO structure ··· 377 */ 378 void bfa_cb_ioim_good_comp(void *bfad, struct bfad_ioim_s *dio); 379 380 - /** 381 * I/O abort completion notification 382 * 383 * @param[in] dio driver IO that was aborted
··· 104 bfa_fcpim_profile_t profile_start; 105 }; 106 107 + /* 108 * BFA IO (initiator mode) 109 */ 110 struct bfa_ioim_s { ··· 137 struct bfa_tskim_s *tskim; /* Relevant TM cmd */ 138 }; 139 140 + /* 141 * BFA Task management command (initiator mode) 142 */ 143 struct bfa_tskim_s { ··· 160 }; 161 162 163 + /* 164 * BFA i-t-n (initiator mode) 165 */ 166 struct bfa_itnim_s { ··· 303 struct bfa_itnim_ioprofile_s *ioprofile); 304 #define bfa_itnim_get_reqq(__ioim) (((struct bfa_ioim_s *)__ioim)->itnim->reqq) 305 306 + /* 307 * BFA completion callback for bfa_itnim_online(). 308 * 309 * @param[in] itnim FCS or driver itnim instance ··· 312 */ 313 void bfa_cb_itnim_online(void *itnim); 314 315 + /* 316 * BFA completion callback for bfa_itnim_offline(). 317 * 318 * @param[in] itnim FCS or driver itnim instance ··· 323 void bfa_cb_itnim_tov_begin(void *itnim); 324 void bfa_cb_itnim_tov(void *itnim); 325 326 + /* 327 * BFA notification to FCS/driver for second level error recovery. 328 * 329 * Atleast one I/O request has timedout and target is unresponsive to ··· 351 bfa_boolean_t iotov); 352 353 354 + /* 355 * I/O completion notification. 356 * 357 * @param[in] dio driver IO structure ··· 368 u8 scsi_status, int sns_len, 369 u8 *sns_info, s32 residue); 370 371 + /* 372 * I/O good completion notification. 373 * 374 * @param[in] dio driver IO structure ··· 377 */ 378 void bfa_cb_ioim_good_comp(void *bfad, struct bfad_ioim_s *dio); 379 380 + /* 381 * I/O abort completion notification 382 * 383 * @param[in] dio driver IO that was aborted
+15 -15
drivers/scsi/bfa/bfa_fcs.h
··· 196 #define bfa_fcs_fabric_is_switched(__f) \ 197 ((__f)->fab_type == BFA_FCS_FABRIC_SWITCHED) 198 199 - /** 200 * The design calls for a single implementation of base fabric and vf. 201 */ 202 #define bfa_fcs_vf_t struct bfa_fcs_fabric_s ··· 216 217 #define bfa_fcs_lport_t struct bfa_fcs_lport_s 218 219 - /** 220 * Symbolic Name related defines 221 * Total bytes 255. 222 * Physical Port's symbolic name 128 bytes. ··· 239 #define BFA_FCS_PORT_SYMBNAME_OSINFO_SZ 48 240 #define BFA_FCS_PORT_SYMBNAME_OSPATCH_SZ 16 241 242 - /** 243 * Get FC port ID for a logical port. 244 */ 245 #define bfa_fcs_lport_get_fcid(_lport) ((_lport)->pid) ··· 262 #define bfa_fcs_lport_get_fabric_ipaddr(_lport) \ 263 ((_lport)->fabric->fabric_ip_addr) 264 265 - /** 266 * bfa fcs port public functions 267 */ 268 ··· 342 #define bfa_fcs_vport_get_port(vport) \ 343 ((struct bfa_fcs_lport_s *)(&vport->port)) 344 345 - /** 346 * bfa fcs vport public functions 347 */ 348 bfa_status_t bfa_fcs_vport_create(struct bfa_fcs_vport_s *vport, ··· 393 enum bfa_port_speed rpsc_speed; 394 /* Current Speed from RPSC. O if RPSC fails */ 395 enum bfa_port_speed assigned_speed; 396 - /** 397 * Speed assigned by the user. will be used if RPSC is 398 * not supported by the rport. 399 */ ··· 434 return rport->bfa_rport; 435 } 436 437 - /** 438 * bfa fcs rport API functions 439 */ 440 bfa_status_t bfa_fcs_rport_add(struct bfa_fcs_lport_s *port, wwn_t *pwwn, ··· 573 return itnim->bfa_itnim; 574 } 575 576 - /** 577 * bfa fcs FCP Initiator mode API functions 578 */ 579 void bfa_fcs_itnim_get_attr(struct bfa_fcs_itnim_s *itnim, ··· 677 void bfa_fcs_trc_init(struct bfa_fcs_s *fcs, struct bfa_trc_mod_s *trcmod); 678 void bfa_fcs_start(struct bfa_fcs_s *fcs); 679 680 - /** 681 * bfa fcs vf public functions 682 */ 683 bfa_fcs_vf_t *bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id); ··· 716 void bfa_fcs_uf_attach(struct bfa_fcs_s *fcs); 717 void bfa_fcs_port_attach(struct bfa_fcs_s *fcs); 718 719 - /** 720 * BFA FCS callback interfaces 721 */ 722 723 - /** 724 * fcb Main fcs callbacks 725 */ 726 ··· 729 struct bfad_vport_s; 730 struct bfad_rport_s; 731 732 - /** 733 * lport callbacks 734 */ 735 struct bfad_port_s *bfa_fcb_lport_new(struct bfad_s *bfad, ··· 741 struct bfad_vf_s *vf_drv, 742 struct bfad_vport_s *vp_drv); 743 744 - /** 745 * vport callbacks 746 */ 747 void bfa_fcb_pbc_vport_create(struct bfad_s *bfad, struct bfi_pbc_vport_s); 748 749 - /** 750 * rport callbacks 751 */ 752 bfa_status_t bfa_fcb_rport_alloc(struct bfad_s *bfad, 753 struct bfa_fcs_rport_s **rport, 754 struct bfad_rport_s **rport_drv); 755 756 - /** 757 * itnim callbacks 758 */ 759 void bfa_fcb_itnim_alloc(struct bfad_s *bfad, struct bfa_fcs_itnim_s **itnim,
··· 196 #define bfa_fcs_fabric_is_switched(__f) \ 197 ((__f)->fab_type == BFA_FCS_FABRIC_SWITCHED) 198 199 + /* 200 * The design calls for a single implementation of base fabric and vf. 201 */ 202 #define bfa_fcs_vf_t struct bfa_fcs_fabric_s ··· 216 217 #define bfa_fcs_lport_t struct bfa_fcs_lport_s 218 219 + /* 220 * Symbolic Name related defines 221 * Total bytes 255. 222 * Physical Port's symbolic name 128 bytes. ··· 239 #define BFA_FCS_PORT_SYMBNAME_OSINFO_SZ 48 240 #define BFA_FCS_PORT_SYMBNAME_OSPATCH_SZ 16 241 242 + /* 243 * Get FC port ID for a logical port. 244 */ 245 #define bfa_fcs_lport_get_fcid(_lport) ((_lport)->pid) ··· 262 #define bfa_fcs_lport_get_fabric_ipaddr(_lport) \ 263 ((_lport)->fabric->fabric_ip_addr) 264 265 + /* 266 * bfa fcs port public functions 267 */ 268 ··· 342 #define bfa_fcs_vport_get_port(vport) \ 343 ((struct bfa_fcs_lport_s *)(&vport->port)) 344 345 + /* 346 * bfa fcs vport public functions 347 */ 348 bfa_status_t bfa_fcs_vport_create(struct bfa_fcs_vport_s *vport, ··· 393 enum bfa_port_speed rpsc_speed; 394 /* Current Speed from RPSC. O if RPSC fails */ 395 enum bfa_port_speed assigned_speed; 396 + /* 397 * Speed assigned by the user. will be used if RPSC is 398 * not supported by the rport. 399 */ ··· 434 return rport->bfa_rport; 435 } 436 437 + /* 438 * bfa fcs rport API functions 439 */ 440 bfa_status_t bfa_fcs_rport_add(struct bfa_fcs_lport_s *port, wwn_t *pwwn, ··· 573 return itnim->bfa_itnim; 574 } 575 576 + /* 577 * bfa fcs FCP Initiator mode API functions 578 */ 579 void bfa_fcs_itnim_get_attr(struct bfa_fcs_itnim_s *itnim, ··· 677 void bfa_fcs_trc_init(struct bfa_fcs_s *fcs, struct bfa_trc_mod_s *trcmod); 678 void bfa_fcs_start(struct bfa_fcs_s *fcs); 679 680 + /* 681 * bfa fcs vf public functions 682 */ 683 bfa_fcs_vf_t *bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id); ··· 716 void bfa_fcs_uf_attach(struct bfa_fcs_s *fcs); 717 void bfa_fcs_port_attach(struct bfa_fcs_s *fcs); 718 719 + /* 720 * BFA FCS callback interfaces 721 */ 722 723 + /* 724 * fcb Main fcs callbacks 725 */ 726 ··· 729 struct bfad_vport_s; 730 struct bfad_rport_s; 731 732 + /* 733 * lport callbacks 734 */ 735 struct bfad_port_s *bfa_fcb_lport_new(struct bfad_s *bfad, ··· 741 struct bfad_vf_s *vf_drv, 742 struct bfad_vport_s *vp_drv); 743 744 + /* 745 * vport callbacks 746 */ 747 void bfa_fcb_pbc_vport_create(struct bfad_s *bfad, struct bfi_pbc_vport_s); 748 749 + /* 750 * rport callbacks 751 */ 752 bfa_status_t bfa_fcb_rport_alloc(struct bfad_s *bfad, 753 struct bfa_fcs_rport_s **rport, 754 struct bfad_rport_s **rport_drv); 755 756 + /* 757 * itnim callbacks 758 */ 759 void bfa_fcb_itnim_alloc(struct bfad_s *bfad, struct bfa_fcs_itnim_s **itnim,
+19 -19
drivers/scsi/bfa/bfa_ioc.h
··· 22 #include "bfa_cs.h" 23 #include "bfi.h" 24 25 - /** 26 * BFA timer declarations 27 */ 28 typedef void (*bfa_timer_cbfn_t)(void *); 29 30 - /** 31 * BFA timer data structure 32 */ 33 struct bfa_timer_s { 34 struct list_head qe; 35 bfa_timer_cbfn_t timercb; 36 void *arg; 37 - int timeout; /**< in millisecs. */ 38 }; 39 40 - /** 41 * Timer module structure 42 */ 43 struct bfa_timer_mod_s { 44 struct list_head timer_q; 45 }; 46 47 - #define BFA_TIMER_FREQ 200 /**< specified in millisecs */ 48 49 void bfa_timer_beat(struct bfa_timer_mod_s *mod); 50 void bfa_timer_init(struct bfa_timer_mod_s *mod); ··· 53 unsigned int timeout); 54 void bfa_timer_stop(struct bfa_timer_s *timer); 55 56 - /** 57 * Generic Scatter Gather Element used by driver 58 */ 59 struct bfa_sge_s { ··· 80 #define bfa_sgaddr_le(_x) (_x) 81 #endif 82 83 - /** 84 * PCI device information required by IOC 85 */ 86 struct bfa_pcidev_s { 87 int pci_slot; 88 u8 pci_func; 89 - u16 device_id; 90 - void __iomem *pci_bar_kva; 91 }; 92 93 - /** 94 * Structure used to remember the DMA-able memory block's KVA and Physical 95 * Address 96 */ ··· 102 #define BFA_DMA_ALIGN_SZ 256 103 #define BFA_ROUNDUP(_l, _s) (((_l) + ((_s) - 1)) & ~((_s) - 1)) 104 105 - /** 106 * smem size for Crossbow and Catapult 107 */ 108 #define BFI_SMEM_CB_SIZE 0x200000U /* ! 2MB for crossbow */ ··· 156 #define bfa_mem_read(_raddr, _off) swab32(readl(((_raddr) + (_off)))) 157 #define bfa_mem_write(_raddr, _off, _val) \ 158 writel(swab32((_val)), ((_raddr) + (_off))) 159 - /** 160 * IOC Mailbox structures 161 */ 162 struct bfa_mbox_cmd_s { ··· 164 u32 msg[BFI_IOC_MSGSZ]; 165 }; 166 167 - /** 168 * IOC mailbox module 169 */ 170 typedef void (*bfa_ioc_mbox_mcfunc_t)(void *cbarg, struct bfi_mbmsg_s *m); ··· 177 } mbhdlr[BFI_MC_MAX]; 178 }; 179 180 - /** 181 * IOC callback function interfaces 182 */ 183 typedef void (*bfa_ioc_enable_cbfn_t)(void *bfa, enum bfa_status status); ··· 191 bfa_ioc_reset_cbfn_t reset_cbfn; 192 }; 193 194 - /** 195 * Heartbeat failure notification queue element. 196 */ 197 struct bfa_ioc_hbfail_notify_s { ··· 200 void *cbarg; 201 }; 202 203 - /** 204 * Initialize a heartbeat failure notification structure 205 */ 206 #define bfa_ioc_hbfail_init(__notify, __cbfn, __cbarg) do { \ ··· 285 #define BFA_IOC_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS) 286 #define BFA_IOC_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS) 287 288 - /** 289 * IOC mailbox interface 290 */ 291 void bfa_ioc_mbox_queue(struct bfa_ioc_s *ioc, struct bfa_mbox_cmd_s *cmd); ··· 297 void bfa_ioc_mbox_regisr(struct bfa_ioc_s *ioc, enum bfi_mclass mc, 298 bfa_ioc_mbox_mcfunc_t cbfn, void *cbarg); 299 300 - /** 301 * IOC interfaces 302 */ 303 ··· 439 } 440 } 441 442 - /** 443 * CNA TRCMOD declaration 444 */ 445 /*
··· 22 #include "bfa_cs.h" 23 #include "bfi.h" 24 25 + /* 26 * BFA timer declarations 27 */ 28 typedef void (*bfa_timer_cbfn_t)(void *); 29 30 + /* 31 * BFA timer data structure 32 */ 33 struct bfa_timer_s { 34 struct list_head qe; 35 bfa_timer_cbfn_t timercb; 36 void *arg; 37 + int timeout; /* in millisecs */ 38 }; 39 40 + /* 41 * Timer module structure 42 */ 43 struct bfa_timer_mod_s { 44 struct list_head timer_q; 45 }; 46 47 + #define BFA_TIMER_FREQ 200 /* specified in millisecs */ 48 49 void bfa_timer_beat(struct bfa_timer_mod_s *mod); 50 void bfa_timer_init(struct bfa_timer_mod_s *mod); ··· 53 unsigned int timeout); 54 void bfa_timer_stop(struct bfa_timer_s *timer); 55 56 + /* 57 * Generic Scatter Gather Element used by driver 58 */ 59 struct bfa_sge_s { ··· 80 #define bfa_sgaddr_le(_x) (_x) 81 #endif 82 83 + /* 84 * PCI device information required by IOC 85 */ 86 struct bfa_pcidev_s { 87 int pci_slot; 88 u8 pci_func; 89 + u16 device_id; 90 + void __iomem *pci_bar_kva; 91 }; 92 93 + /* 94 * Structure used to remember the DMA-able memory block's KVA and Physical 95 * Address 96 */ ··· 102 #define BFA_DMA_ALIGN_SZ 256 103 #define BFA_ROUNDUP(_l, _s) (((_l) + ((_s) - 1)) & ~((_s) - 1)) 104 105 + /* 106 * smem size for Crossbow and Catapult 107 */ 108 #define BFI_SMEM_CB_SIZE 0x200000U /* ! 2MB for crossbow */ ··· 156 #define bfa_mem_read(_raddr, _off) swab32(readl(((_raddr) + (_off)))) 157 #define bfa_mem_write(_raddr, _off, _val) \ 158 writel(swab32((_val)), ((_raddr) + (_off))) 159 + /* 160 * IOC Mailbox structures 161 */ 162 struct bfa_mbox_cmd_s { ··· 164 u32 msg[BFI_IOC_MSGSZ]; 165 }; 166 167 + /* 168 * IOC mailbox module 169 */ 170 typedef void (*bfa_ioc_mbox_mcfunc_t)(void *cbarg, struct bfi_mbmsg_s *m); ··· 177 } mbhdlr[BFI_MC_MAX]; 178 }; 179 180 + /* 181 * IOC callback function interfaces 182 */ 183 typedef void (*bfa_ioc_enable_cbfn_t)(void *bfa, enum bfa_status status); ··· 191 bfa_ioc_reset_cbfn_t reset_cbfn; 192 }; 193 194 + /* 195 * Heartbeat failure notification queue element. 196 */ 197 struct bfa_ioc_hbfail_notify_s { ··· 200 void *cbarg; 201 }; 202 203 + /* 204 * Initialize a heartbeat failure notification structure 205 */ 206 #define bfa_ioc_hbfail_init(__notify, __cbfn, __cbarg) do { \ ··· 285 #define BFA_IOC_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS) 286 #define BFA_IOC_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS) 287 288 + /* 289 * IOC mailbox interface 290 */ 291 void bfa_ioc_mbox_queue(struct bfa_ioc_s *ioc, struct bfa_mbox_cmd_s *cmd); ··· 297 void bfa_ioc_mbox_regisr(struct bfa_ioc_s *ioc, enum bfi_mclass mc, 298 bfa_ioc_mbox_mcfunc_t cbfn, void *cbarg); 299 300 + /* 301 * IOC interfaces 302 */ 303 ··· 439 } 440 } 441 442 + /* 443 * CNA TRCMOD declaration 444 */ 445 /*
+3 -3
drivers/scsi/bfa/bfa_modules.h
··· 15 * General Public License for more details. 16 */ 17 18 - /** 19 * bfa_modules.h BFA modules 20 */ 21 ··· 52 }; 53 54 55 - /** 56 * Macro to define a new BFA module 57 */ 58 #define BFA_MODULE(__mod) \ ··· 80 81 #define BFA_CACHELINE_SZ (256) 82 83 - /** 84 * Structure used to interact between different BFA sub modules 85 * 86 * Each sub module needs to implement only the entry points relevant to it (and
··· 15 * General Public License for more details. 16 */ 17 18 + /* 19 * bfa_modules.h BFA modules 20 */ 21 ··· 52 }; 53 54 55 + /* 56 * Macro to define a new BFA module 57 */ 58 #define BFA_MODULE(__mod) \ ··· 80 81 #define BFA_CACHELINE_SZ (256) 82 83 + /* 84 * Structure used to interact between different BFA sub modules 85 * 86 * Each sub module needs to implement only the entry points relevant to it (and
+2 -2
drivers/scsi/bfa/bfa_os_inc.h
··· 90 ({ \ 91 struct timeval tv; \ 92 \ 93 - do_gettimeofday(&tv); \ 94 (tv.tv_sec*1000000+tv.tv_usec); \ 95 }) 96 97 #define boolean_t int 98 99 - /** 100 * For current time stamp, OS API will fill-in 101 */ 102 struct bfa_timeval_s {
··· 90 ({ \ 91 struct timeval tv; \ 92 \ 93 + do_gettimeofday(&tv); \ 94 (tv.tv_sec*1000000+tv.tv_usec); \ 95 }) 96 97 #define boolean_t int 98 99 + /* 100 * For current time stamp, OS API will fill-in 101 */ 102 struct bfa_timeval_s {
+20 -21
drivers/scsi/bfa/bfa_svc.h
··· 22 #include "bfi_ms.h" 23 24 25 - /** 26 * Scatter-gather DMA related defines 27 */ 28 #define BFA_SGPG_MIN (16) 29 30 - /** 31 * Alignment macro for SG page allocation 32 */ 33 #define BFA_SGPG_ROUNDUP(_l) (((_l) + (sizeof(struct bfi_sgpg_s) - 1)) \ ··· 48 union bfi_addr_u sgpg_pa; /* pa of SG page */ 49 }; 50 51 - /** 52 * Given number of SG elements, BFA_SGPG_NPAGE() returns the number of 53 * SG pages required. 54 */ ··· 75 void bfa_sgpg_wcancel(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe); 76 77 78 - /** 79 * FCXP related defines 80 */ 81 #define BFA_FCXP_MIN (1) ··· 115 116 117 118 - /** 119 * Information needed for a FCXP request 120 */ 121 struct bfa_fcxp_req_info_s { 122 struct bfa_rport_s *bfa_rport; 123 - /** Pointer to the bfa rport that was 124 * returned from bfa_rport_create(). 125 * This could be left NULL for WKA or 126 * for FCXP interactions before the ··· 137 138 struct bfa_fcxp_rsp_info_s { 139 struct fchs_s rsp_fchs; 140 - /** !< Response frame's FC header will 141 * be sent back in this field */ 142 u8 rsp_timeout; 143 - /** !< timeout in seconds, 0-no response 144 - */ 145 u8 rsvd2[3]; 146 u32 rsp_maxlen; /* max response length expected */ 147 }; ··· 217 void bfa_fcxp_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 218 219 220 - /** 221 * RPORT related defines 222 */ 223 #define BFA_RPORT_MIN 4 ··· 231 232 #define BFA_RPORT_MOD(__bfa) (&(__bfa)->modules.rport_mod) 233 234 - /** 235 * Convert rport tag to RPORT 236 */ 237 #define BFA_RPORT_FROM_TAG(__bfa, _tag) \ ··· 243 */ 244 void bfa_rport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 245 246 - /** 247 * BFA rport information. 248 */ 249 struct bfa_rport_info_s { ··· 258 enum bfa_port_speed speed; /* Rport's current speed */ 259 }; 260 261 - /** 262 * BFA rport data structure 263 */ 264 struct bfa_rport_s { ··· 281 #define BFA_RPORT_FC_COS(_rport) ((_rport)->rport_info.fc_class) 282 283 284 - /** 285 * UF - unsolicited receive related defines 286 */ 287 ··· 304 struct bfa_sge_s sges[BFI_SGE_INLINE_MAX]; 305 }; 306 307 - /** 308 * Callback prototype for unsolicited frame receive handler. 309 * 310 * @param[in] cbarg callback arg for receive handler ··· 337 338 #define BFA_UF_BUFSZ (2 * 1024 + 256) 339 340 - /** 341 * @todo private 342 */ 343 struct bfa_uf_buf_s { ··· 345 }; 346 347 348 - /** 349 * LPS - bfa lport login/logout service interface 350 */ 351 struct bfa_lps_s { ··· 396 void bfa_lps_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 397 398 399 - /** 400 * FCPORT related defines 401 */ 402 403 #define BFA_FCPORT(_bfa) (&((_bfa)->modules.port)) 404 typedef void (*bfa_cb_port_t) (void *cbarg, enum bfa_status status); 405 406 - /** 407 * Link notification data structure 408 */ 409 struct bfa_fcport_ln_s { ··· 417 struct bfa_trunk_attr_s attr; 418 }; 419 420 - /** 421 * BFA FC port data structure 422 */ 423 struct bfa_fcport_s { ··· 612 void *cbarg); 613 void bfa_uf_free(struct bfa_uf_s *uf); 614 615 - /** 616 * bfa lport service api 617 */ 618
··· 22 #include "bfi_ms.h" 23 24 25 + /* 26 * Scatter-gather DMA related defines 27 */ 28 #define BFA_SGPG_MIN (16) 29 30 + /* 31 * Alignment macro for SG page allocation 32 */ 33 #define BFA_SGPG_ROUNDUP(_l) (((_l) + (sizeof(struct bfi_sgpg_s) - 1)) \ ··· 48 union bfi_addr_u sgpg_pa; /* pa of SG page */ 49 }; 50 51 + /* 52 * Given number of SG elements, BFA_SGPG_NPAGE() returns the number of 53 * SG pages required. 54 */ ··· 75 void bfa_sgpg_wcancel(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe); 76 77 78 + /* 79 * FCXP related defines 80 */ 81 #define BFA_FCXP_MIN (1) ··· 115 116 117 118 + /* 119 * Information needed for a FCXP request 120 */ 121 struct bfa_fcxp_req_info_s { 122 struct bfa_rport_s *bfa_rport; 123 + /* Pointer to the bfa rport that was 124 * returned from bfa_rport_create(). 125 * This could be left NULL for WKA or 126 * for FCXP interactions before the ··· 137 138 struct bfa_fcxp_rsp_info_s { 139 struct fchs_s rsp_fchs; 140 + /* Response frame's FC header will 141 * be sent back in this field */ 142 u8 rsp_timeout; 143 + /* timeout in seconds, 0-no response */ 144 u8 rsvd2[3]; 145 u32 rsp_maxlen; /* max response length expected */ 146 }; ··· 218 void bfa_fcxp_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 219 220 221 + /* 222 * RPORT related defines 223 */ 224 #define BFA_RPORT_MIN 4 ··· 232 233 #define BFA_RPORT_MOD(__bfa) (&(__bfa)->modules.rport_mod) 234 235 + /* 236 * Convert rport tag to RPORT 237 */ 238 #define BFA_RPORT_FROM_TAG(__bfa, _tag) \ ··· 244 */ 245 void bfa_rport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 246 247 + /* 248 * BFA rport information. 249 */ 250 struct bfa_rport_info_s { ··· 259 enum bfa_port_speed speed; /* Rport's current speed */ 260 }; 261 262 + /* 263 * BFA rport data structure 264 */ 265 struct bfa_rport_s { ··· 282 #define BFA_RPORT_FC_COS(_rport) ((_rport)->rport_info.fc_class) 283 284 285 + /* 286 * UF - unsolicited receive related defines 287 */ 288 ··· 305 struct bfa_sge_s sges[BFI_SGE_INLINE_MAX]; 306 }; 307 308 + /* 309 * Callback prototype for unsolicited frame receive handler. 310 * 311 * @param[in] cbarg callback arg for receive handler ··· 338 339 #define BFA_UF_BUFSZ (2 * 1024 + 256) 340 341 + /* 342 * @todo private 343 */ 344 struct bfa_uf_buf_s { ··· 346 }; 347 348 349 + /* 350 * LPS - bfa lport login/logout service interface 351 */ 352 struct bfa_lps_s { ··· 397 void bfa_lps_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); 398 399 400 + /* 401 * FCPORT related defines 402 */ 403 404 #define BFA_FCPORT(_bfa) (&((_bfa)->modules.port)) 405 typedef void (*bfa_cb_port_t) (void *cbarg, enum bfa_status status); 406 407 + /* 408 * Link notification data structure 409 */ 410 struct bfa_fcport_ln_s { ··· 418 struct bfa_trunk_attr_s attr; 419 }; 420 421 + /* 422 * BFA FC port data structure 423 */ 424 struct bfa_fcport_s { ··· 613 void *cbarg); 614 void bfa_uf_free(struct bfa_uf_s *uf); 615 616 + /* 617 * bfa lport service api 618 */ 619
+2 -2
drivers/scsi/bfa/bfad_drv.h
··· 15 * General Public License for more details. 16 */ 17 18 - /** 19 * Contains base driver definitions. 20 */ 21 22 - /** 23 * bfa_drv.h Linux driver data structures. 24 */ 25
··· 15 * General Public License for more details. 16 */ 17 18 + /* 19 * Contains base driver definitions. 20 */ 21 22 + /* 23 * bfa_drv.h Linux driver data structures. 24 */ 25
+29 -29
drivers/scsi/bfa/bfi.h
··· 23 24 #pragma pack(1) 25 26 - /** 27 * BFI FW image type 28 */ 29 #define BFI_FLASH_CHUNK_SZ 256 /* Flash chunk size */ ··· 35 BFI_IMAGE_MAX, 36 }; 37 38 - /** 39 * Msg header common to all msgs 40 */ 41 struct bfi_mhdr_s { ··· 68 #define BFI_I2H_OPCODE_BASE 128 69 #define BFA_I2HM(_x) ((_x) + BFI_I2H_OPCODE_BASE) 70 71 - /** 72 **************************************************************************** 73 * 74 * Scatter Gather Element and Page definition ··· 79 #define BFI_SGE_INLINE 1 80 #define BFI_SGE_INLINE_MAX (BFI_SGE_INLINE + 1) 81 82 - /** 83 * SG Flags 84 */ 85 enum { ··· 90 BFI_SGE_PGDLEN = 2, /* cumulative data length for page */ 91 }; 92 93 - /** 94 * DMA addresses 95 */ 96 union bfi_addr_u { ··· 100 } a32; 101 }; 102 103 - /** 104 * Scatter Gather Element 105 */ 106 struct bfi_sge_s { ··· 116 union bfi_addr_u sga; 117 }; 118 119 - /** 120 * Scatter Gather Page 121 */ 122 #define BFI_SGPG_DATA_SGES 7 ··· 139 u32 pl[BFI_LMSG_PL_WSZ]; 140 }; 141 142 - /** 143 * Mailbox message structure 144 */ 145 #define BFI_MBMSG_SZ 7 ··· 148 u32 pl[BFI_MBMSG_SZ]; 149 }; 150 151 - /** 152 * Message Classes 153 */ 154 enum bfi_mclass { ··· 186 #define BFI_BOOT_LOADER_BIOS 1 187 #define BFI_BOOT_LOADER_UEFI 2 188 189 - /** 190 *---------------------------------------------------------------------- 191 * IOC 192 *---------------------------------------------------------------------- ··· 208 BFI_IOC_I2H_HBEAT = BFA_I2HM(5), 209 }; 210 211 - /** 212 * BFI_IOC_H2I_GETATTR_REQ message 213 */ 214 struct bfi_ioc_getattr_req_s { ··· 242 u32 card_type; /* card type */ 243 }; 244 245 - /** 246 * BFI_IOC_I2H_GETATTR_REPLY message 247 */ 248 struct bfi_ioc_getattr_reply_s { ··· 251 u8 rsvd[3]; 252 }; 253 254 - /** 255 * Firmware memory page offsets 256 */ 257 #define BFI_IOC_SMEM_PG0_CB (0x40) 258 #define BFI_IOC_SMEM_PG0_CT (0x180) 259 260 - /** 261 * Firmware statistic offset 262 */ 263 #define BFI_IOC_FWSTATS_OFF (0x6B40) 264 #define BFI_IOC_FWSTATS_SZ (4096) 265 266 - /** 267 * Firmware trace offset 268 */ 269 #define BFI_IOC_TRC_OFF (0x4b00) ··· 280 u32 md5sum[BFI_IOC_MD5SUM_SZ]; 281 }; 282 283 - /** 284 * BFI_IOC_I2H_READY_EVENT message 285 */ 286 struct bfi_ioc_rdy_event_s { ··· 294 u32 hb_count; /* current heart beat count */ 295 }; 296 297 - /** 298 * IOC hardware/firmware state 299 */ 300 enum bfi_ioc_state { ··· 340 ((__adap_type) & (BFI_ADAPTER_TTV | BFI_ADAPTER_PROTO | \ 341 BFI_ADAPTER_UNSUPP)) 342 343 - /** 344 * BFI_IOC_H2I_ENABLE_REQ & BFI_IOC_H2I_DISABLE_REQ messages 345 */ 346 struct bfi_ioc_ctrl_req_s { ··· 352 #define bfi_ioc_enable_req_t struct bfi_ioc_ctrl_req_s; 353 #define bfi_ioc_disable_req_t struct bfi_ioc_ctrl_req_s; 354 355 - /** 356 * BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages 357 */ 358 struct bfi_ioc_ctrl_reply_s { ··· 364 #define bfi_ioc_disable_reply_t struct bfi_ioc_ctrl_reply_s; 365 366 #define BFI_IOC_MSGSZ 8 367 - /** 368 * H2I Messages 369 */ 370 union bfi_ioc_h2i_msg_u { ··· 375 u32 mboxmsg[BFI_IOC_MSGSZ]; 376 }; 377 378 - /** 379 * I2H Messages 380 */ 381 union bfi_ioc_i2h_msg_u { ··· 385 }; 386 387 388 - /** 389 *---------------------------------------------------------------------- 390 * PBC 391 *---------------------------------------------------------------------- ··· 394 #define BFI_PBC_MAX_BLUNS 8 395 #define BFI_PBC_MAX_VPORTS 16 396 397 - /** 398 * PBC boot lun configuration 399 */ 400 struct bfi_pbc_blun_s { ··· 402 lun_t tgt_lun; 403 }; 404 405 - /** 406 * PBC virtual port configuration 407 */ 408 struct bfi_pbc_vport_s { ··· 410 wwn_t vp_nwwn; 411 }; 412 413 - /** 414 * BFI pre-boot configuration information 415 */ 416 struct bfi_pbc_s { ··· 427 struct bfi_pbc_vport_s vport[BFI_PBC_MAX_VPORTS]; 428 }; 429 430 - /** 431 *---------------------------------------------------------------------- 432 * MSGQ 433 *---------------------------------------------------------------------- ··· 531 BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4), 532 }; 533 534 - /** 535 * Generic REQ type 536 */ 537 struct bfi_port_generic_req_s { ··· 540 u32 rsvd; 541 }; 542 543 - /** 544 * Generic RSP type 545 */ 546 struct bfi_port_generic_rsp_s { ··· 550 u32 msgtag; /* msgtag for reply */ 551 }; 552 553 - /** 554 * BFI_PORT_H2I_GET_STATS_REQ 555 */ 556 struct bfi_port_get_stats_req_s {
··· 23 24 #pragma pack(1) 25 26 + /* 27 * BFI FW image type 28 */ 29 #define BFI_FLASH_CHUNK_SZ 256 /* Flash chunk size */ ··· 35 BFI_IMAGE_MAX, 36 }; 37 38 + /* 39 * Msg header common to all msgs 40 */ 41 struct bfi_mhdr_s { ··· 68 #define BFI_I2H_OPCODE_BASE 128 69 #define BFA_I2HM(_x) ((_x) + BFI_I2H_OPCODE_BASE) 70 71 + /* 72 **************************************************************************** 73 * 74 * Scatter Gather Element and Page definition ··· 79 #define BFI_SGE_INLINE 1 80 #define BFI_SGE_INLINE_MAX (BFI_SGE_INLINE + 1) 81 82 + /* 83 * SG Flags 84 */ 85 enum { ··· 90 BFI_SGE_PGDLEN = 2, /* cumulative data length for page */ 91 }; 92 93 + /* 94 * DMA addresses 95 */ 96 union bfi_addr_u { ··· 100 } a32; 101 }; 102 103 + /* 104 * Scatter Gather Element 105 */ 106 struct bfi_sge_s { ··· 116 union bfi_addr_u sga; 117 }; 118 119 + /* 120 * Scatter Gather Page 121 */ 122 #define BFI_SGPG_DATA_SGES 7 ··· 139 u32 pl[BFI_LMSG_PL_WSZ]; 140 }; 141 142 + /* 143 * Mailbox message structure 144 */ 145 #define BFI_MBMSG_SZ 7 ··· 148 u32 pl[BFI_MBMSG_SZ]; 149 }; 150 151 + /* 152 * Message Classes 153 */ 154 enum bfi_mclass { ··· 186 #define BFI_BOOT_LOADER_BIOS 1 187 #define BFI_BOOT_LOADER_UEFI 2 188 189 + /* 190 *---------------------------------------------------------------------- 191 * IOC 192 *---------------------------------------------------------------------- ··· 208 BFI_IOC_I2H_HBEAT = BFA_I2HM(5), 209 }; 210 211 + /* 212 * BFI_IOC_H2I_GETATTR_REQ message 213 */ 214 struct bfi_ioc_getattr_req_s { ··· 242 u32 card_type; /* card type */ 243 }; 244 245 + /* 246 * BFI_IOC_I2H_GETATTR_REPLY message 247 */ 248 struct bfi_ioc_getattr_reply_s { ··· 251 u8 rsvd[3]; 252 }; 253 254 + /* 255 * Firmware memory page offsets 256 */ 257 #define BFI_IOC_SMEM_PG0_CB (0x40) 258 #define BFI_IOC_SMEM_PG0_CT (0x180) 259 260 + /* 261 * Firmware statistic offset 262 */ 263 #define BFI_IOC_FWSTATS_OFF (0x6B40) 264 #define BFI_IOC_FWSTATS_SZ (4096) 265 266 + /* 267 * Firmware trace offset 268 */ 269 #define BFI_IOC_TRC_OFF (0x4b00) ··· 280 u32 md5sum[BFI_IOC_MD5SUM_SZ]; 281 }; 282 283 + /* 284 * BFI_IOC_I2H_READY_EVENT message 285 */ 286 struct bfi_ioc_rdy_event_s { ··· 294 u32 hb_count; /* current heart beat count */ 295 }; 296 297 + /* 298 * IOC hardware/firmware state 299 */ 300 enum bfi_ioc_state { ··· 340 ((__adap_type) & (BFI_ADAPTER_TTV | BFI_ADAPTER_PROTO | \ 341 BFI_ADAPTER_UNSUPP)) 342 343 + /* 344 * BFI_IOC_H2I_ENABLE_REQ & BFI_IOC_H2I_DISABLE_REQ messages 345 */ 346 struct bfi_ioc_ctrl_req_s { ··· 352 #define bfi_ioc_enable_req_t struct bfi_ioc_ctrl_req_s; 353 #define bfi_ioc_disable_req_t struct bfi_ioc_ctrl_req_s; 354 355 + /* 356 * BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages 357 */ 358 struct bfi_ioc_ctrl_reply_s { ··· 364 #define bfi_ioc_disable_reply_t struct bfi_ioc_ctrl_reply_s; 365 366 #define BFI_IOC_MSGSZ 8 367 + /* 368 * H2I Messages 369 */ 370 union bfi_ioc_h2i_msg_u { ··· 375 u32 mboxmsg[BFI_IOC_MSGSZ]; 376 }; 377 378 + /* 379 * I2H Messages 380 */ 381 union bfi_ioc_i2h_msg_u { ··· 385 }; 386 387 388 + /* 389 *---------------------------------------------------------------------- 390 * PBC 391 *---------------------------------------------------------------------- ··· 394 #define BFI_PBC_MAX_BLUNS 8 395 #define BFI_PBC_MAX_VPORTS 16 396 397 + /* 398 * PBC boot lun configuration 399 */ 400 struct bfi_pbc_blun_s { ··· 402 lun_t tgt_lun; 403 }; 404 405 + /* 406 * PBC virtual port configuration 407 */ 408 struct bfi_pbc_vport_s { ··· 410 wwn_t vp_nwwn; 411 }; 412 413 + /* 414 * BFI pre-boot configuration information 415 */ 416 struct bfi_pbc_s { ··· 427 struct bfi_pbc_vport_s vport[BFI_PBC_MAX_VPORTS]; 428 }; 429 430 + /* 431 *---------------------------------------------------------------------- 432 * MSGQ 433 *---------------------------------------------------------------------- ··· 531 BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4), 532 }; 533 534 + /* 535 * Generic REQ type 536 */ 537 struct bfi_port_generic_req_s { ··· 540 u32 rsvd; 541 }; 542 543 + /* 544 * Generic RSP type 545 */ 546 struct bfi_port_generic_rsp_s { ··· 550 u32 msgtag; /* msgtag for reply */ 551 }; 552 553 + /* 554 * BFI_PORT_H2I_GET_STATS_REQ 555 */ 556 struct bfi_port_get_stats_req_s {
+25 -25
drivers/scsi/bfa/bfi_ms.h
··· 41 u16 rsvd_1; 42 u32 endian_sig; /* endian signature of host */ 43 44 - /** 45 * Request and response circular queue base addresses, size and 46 * shadow index pointers. 47 */ ··· 58 struct bfa_iocfc_intr_attr_s intr_attr; /* IOC interrupt attributes */ 59 }; 60 61 - /** 62 * Boot target wwn information for this port. This contains either the stored 63 * or discovered boot target port wwns for the port. 64 */ ··· 75 struct bfi_pbc_s pbc_cfg; 76 }; 77 78 - /** 79 * BFI_IOCFC_H2I_CFG_REQ message 80 */ 81 struct bfi_iocfc_cfg_req_s { ··· 84 }; 85 86 87 - /** 88 * BFI_IOCFC_I2H_CFG_REPLY message 89 */ 90 struct bfi_iocfc_cfg_reply_s { ··· 95 }; 96 97 98 - /** 99 * BFI_IOCFC_H2I_SET_INTR_REQ message 100 */ 101 struct bfi_iocfc_set_intr_req_s { ··· 107 }; 108 109 110 - /** 111 * BFI_IOCFC_H2I_UPDATEQ_REQ message 112 */ 113 struct bfi_iocfc_updateq_req_s { ··· 119 }; 120 121 122 - /** 123 * BFI_IOCFC_I2H_UPDATEQ_RSP message 124 */ 125 struct bfi_iocfc_updateq_rsp_s { ··· 129 }; 130 131 132 - /** 133 * H2I Messages 134 */ 135 union bfi_iocfc_h2i_msg_u { ··· 140 }; 141 142 143 - /** 144 * I2H Messages 145 */ 146 union bfi_iocfc_i2h_msg_u { ··· 173 }; 174 175 176 - /** 177 * Generic REQ type 178 */ 179 struct bfi_fcport_req_s { ··· 181 u32 msgtag; /* msgtag for reply */ 182 }; 183 184 - /** 185 * Generic RSP type 186 */ 187 struct bfi_fcport_rsp_s { ··· 191 u32 msgtag; /* msgtag for reply */ 192 }; 193 194 - /** 195 * BFI_FCPORT_H2I_ENABLE_REQ 196 */ 197 struct bfi_fcport_enable_req_s { ··· 205 u32 rsvd2; 206 }; 207 208 - /** 209 * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ 210 */ 211 struct bfi_fcport_set_svc_params_req_s { ··· 214 u16 rsvd; 215 }; 216 217 - /** 218 * BFI_FCPORT_I2H_EVENT 219 */ 220 struct bfi_fcport_event_s { ··· 222 struct bfa_port_link_s link_state; 223 }; 224 225 - /** 226 * BFI_FCPORT_I2H_TRUNK_SCN 227 */ 228 struct bfi_fcport_trunk_link_s { ··· 243 struct bfi_fcport_trunk_link_s tlink[BFI_FCPORT_MAX_LINKS]; 244 }; 245 246 - /** 247 * fcport H2I message 248 */ 249 union bfi_fcport_h2i_msg_u { ··· 255 struct bfi_fcport_req_s *pstatsclear; 256 }; 257 258 - /** 259 * fcport I2H message 260 */ 261 union bfi_fcport_i2h_msg_u { ··· 279 280 #define BFA_FCXP_MAX_SGES 2 281 282 - /** 283 * FCXP send request structure 284 */ 285 struct bfi_fcxp_send_req_s { ··· 299 struct bfi_sge_s rsp_sge[BFA_FCXP_MAX_SGES]; /* response buf */ 300 }; 301 302 - /** 303 * FCXP send response structure 304 */ 305 struct bfi_fcxp_send_rsp_s { ··· 565 BFI_IOIM_I2H_IOABORT_RSP = BFA_I2HM(2), /* ABORT rsp */ 566 }; 567 568 - /** 569 * IO command DIF info 570 */ 571 struct bfi_ioim_dif_s { 572 u32 dif_info[4]; 573 }; 574 575 - /** 576 * FCP IO messages overview 577 * 578 * @note ··· 587 u16 rport_hdl; /* itnim/rport firmware handle */ 588 struct fcp_cmnd_s cmnd; /* IO request info */ 589 590 - /** 591 * SG elements array within the IO request must be double word 592 * aligned. This aligment is required to optimize SGM setup for the IO. 593 */ ··· 598 struct bfi_ioim_dif_s dif; 599 }; 600 601 - /** 602 * This table shows various IO status codes from firmware and their 603 * meaning. Host driver can use these status codes to further process 604 * IO completions. ··· 684 }; 685 686 #define BFI_IOIM_SNSLEN (256) 687 - /** 688 * I/O response message 689 */ 690 struct bfi_ioim_rsp_s { ··· 746 BFI_TSKIM_STS_NOT_SUPP = 4, 747 BFI_TSKIM_STS_FAILED = 5, 748 749 - /** 750 * Defined by BFA 751 */ 752 BFI_TSKIM_STS_TIMEOUT = 10, /* TM request timedout */
··· 41 u16 rsvd_1; 42 u32 endian_sig; /* endian signature of host */ 43 44 + /* 45 * Request and response circular queue base addresses, size and 46 * shadow index pointers. 47 */ ··· 58 struct bfa_iocfc_intr_attr_s intr_attr; /* IOC interrupt attributes */ 59 }; 60 61 + /* 62 * Boot target wwn information for this port. This contains either the stored 63 * or discovered boot target port wwns for the port. 64 */ ··· 75 struct bfi_pbc_s pbc_cfg; 76 }; 77 78 + /* 79 * BFI_IOCFC_H2I_CFG_REQ message 80 */ 81 struct bfi_iocfc_cfg_req_s { ··· 84 }; 85 86 87 + /* 88 * BFI_IOCFC_I2H_CFG_REPLY message 89 */ 90 struct bfi_iocfc_cfg_reply_s { ··· 95 }; 96 97 98 + /* 99 * BFI_IOCFC_H2I_SET_INTR_REQ message 100 */ 101 struct bfi_iocfc_set_intr_req_s { ··· 107 }; 108 109 110 + /* 111 * BFI_IOCFC_H2I_UPDATEQ_REQ message 112 */ 113 struct bfi_iocfc_updateq_req_s { ··· 119 }; 120 121 122 + /* 123 * BFI_IOCFC_I2H_UPDATEQ_RSP message 124 */ 125 struct bfi_iocfc_updateq_rsp_s { ··· 129 }; 130 131 132 + /* 133 * H2I Messages 134 */ 135 union bfi_iocfc_h2i_msg_u { ··· 140 }; 141 142 143 + /* 144 * I2H Messages 145 */ 146 union bfi_iocfc_i2h_msg_u { ··· 173 }; 174 175 176 + /* 177 * Generic REQ type 178 */ 179 struct bfi_fcport_req_s { ··· 181 u32 msgtag; /* msgtag for reply */ 182 }; 183 184 + /* 185 * Generic RSP type 186 */ 187 struct bfi_fcport_rsp_s { ··· 191 u32 msgtag; /* msgtag for reply */ 192 }; 193 194 + /* 195 * BFI_FCPORT_H2I_ENABLE_REQ 196 */ 197 struct bfi_fcport_enable_req_s { ··· 205 u32 rsvd2; 206 }; 207 208 + /* 209 * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ 210 */ 211 struct bfi_fcport_set_svc_params_req_s { ··· 214 u16 rsvd; 215 }; 216 217 + /* 218 * BFI_FCPORT_I2H_EVENT 219 */ 220 struct bfi_fcport_event_s { ··· 222 struct bfa_port_link_s link_state; 223 }; 224 225 + /* 226 * BFI_FCPORT_I2H_TRUNK_SCN 227 */ 228 struct bfi_fcport_trunk_link_s { ··· 243 struct bfi_fcport_trunk_link_s tlink[BFI_FCPORT_MAX_LINKS]; 244 }; 245 246 + /* 247 * fcport H2I message 248 */ 249 union bfi_fcport_h2i_msg_u { ··· 255 struct bfi_fcport_req_s *pstatsclear; 256 }; 257 258 + /* 259 * fcport I2H message 260 */ 261 union bfi_fcport_i2h_msg_u { ··· 279 280 #define BFA_FCXP_MAX_SGES 2 281 282 + /* 283 * FCXP send request structure 284 */ 285 struct bfi_fcxp_send_req_s { ··· 299 struct bfi_sge_s rsp_sge[BFA_FCXP_MAX_SGES]; /* response buf */ 300 }; 301 302 + /* 303 * FCXP send response structure 304 */ 305 struct bfi_fcxp_send_rsp_s { ··· 565 BFI_IOIM_I2H_IOABORT_RSP = BFA_I2HM(2), /* ABORT rsp */ 566 }; 567 568 + /* 569 * IO command DIF info 570 */ 571 struct bfi_ioim_dif_s { 572 u32 dif_info[4]; 573 }; 574 575 + /* 576 * FCP IO messages overview 577 * 578 * @note ··· 587 u16 rport_hdl; /* itnim/rport firmware handle */ 588 struct fcp_cmnd_s cmnd; /* IO request info */ 589 590 + /* 591 * SG elements array within the IO request must be double word 592 * aligned. This aligment is required to optimize SGM setup for the IO. 593 */ ··· 598 struct bfi_ioim_dif_s dif; 599 }; 600 601 + /* 602 * This table shows various IO status codes from firmware and their 603 * meaning. Host driver can use these status codes to further process 604 * IO completions. ··· 684 }; 685 686 #define BFI_IOIM_SNSLEN (256) 687 + /* 688 * I/O response message 689 */ 690 struct bfi_ioim_rsp_s { ··· 746 BFI_TSKIM_STS_NOT_SUPP = 4, 747 BFI_TSKIM_STS_FAILED = 5, 748 749 + /* 750 * Defined by BFA 751 */ 752 BFI_TSKIM_STS_TIMEOUT = 10, /* TM request timedout */