diff options
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc.h')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h index 83c3f2fc3411..1d51164faa81 100644 --- a/drivers/scsi/bfa/bfa_ioc.h +++ b/drivers/scsi/bfa/bfa_ioc.h | |||
@@ -367,6 +367,58 @@ struct bfa_ablk_s { | |||
367 | }; | 367 | }; |
368 | #define BFA_MEM_ABLK_DMA(__bfa) (&((__bfa)->modules.ablk.ablk_dma)) | 368 | #define BFA_MEM_ABLK_DMA(__bfa) (&((__bfa)->modules.ablk.ablk_dma)) |
369 | 369 | ||
370 | /* | ||
371 | * SFP module specific | ||
372 | */ | ||
373 | typedef void (*bfa_cb_sfp_t) (void *cbarg, bfa_status_t status); | ||
374 | |||
375 | struct bfa_sfp_s { | ||
376 | void *dev; | ||
377 | struct bfa_ioc_s *ioc; | ||
378 | struct bfa_trc_mod_s *trcmod; | ||
379 | struct sfp_mem_s *sfpmem; | ||
380 | bfa_cb_sfp_t cbfn; | ||
381 | void *cbarg; | ||
382 | enum bfi_sfp_mem_e memtype; /* mem access type */ | ||
383 | u32 status; | ||
384 | struct bfa_mbox_cmd_s mbcmd; | ||
385 | u8 *dbuf_kva; /* dma buf virtual address */ | ||
386 | u64 dbuf_pa; /* dma buf physical address */ | ||
387 | struct bfa_ioc_notify_s ioc_notify; | ||
388 | enum bfa_defs_sfp_media_e *media; | ||
389 | enum bfa_port_speed portspeed; | ||
390 | bfa_cb_sfp_t state_query_cbfn; | ||
391 | void *state_query_cbarg; | ||
392 | u8 lock; | ||
393 | u8 data_valid; /* data in dbuf is valid */ | ||
394 | u8 state; /* sfp state */ | ||
395 | u8 state_query_lock; | ||
396 | struct bfa_mem_dma_s sfp_dma; | ||
397 | u8 is_elb; /* eloopback */ | ||
398 | }; | ||
399 | |||
400 | #define BFA_SFP_MOD(__bfa) (&(__bfa)->modules.sfp) | ||
401 | #define BFA_MEM_SFP_DMA(__bfa) (&(BFA_SFP_MOD(__bfa)->sfp_dma)) | ||
402 | |||
403 | u32 bfa_sfp_meminfo(void); | ||
404 | |||
405 | void bfa_sfp_attach(struct bfa_sfp_s *sfp, struct bfa_ioc_s *ioc, | ||
406 | void *dev, struct bfa_trc_mod_s *trcmod); | ||
407 | |||
408 | void bfa_sfp_memclaim(struct bfa_sfp_s *diag, u8 *dm_kva, u64 dm_pa); | ||
409 | void bfa_sfp_intr(void *bfaarg, struct bfi_mbmsg_s *msg); | ||
410 | |||
411 | bfa_status_t bfa_sfp_show(struct bfa_sfp_s *sfp, struct sfp_mem_s *sfpmem, | ||
412 | bfa_cb_sfp_t cbfn, void *cbarg); | ||
413 | |||
414 | bfa_status_t bfa_sfp_media(struct bfa_sfp_s *sfp, | ||
415 | enum bfa_defs_sfp_media_e *media, | ||
416 | bfa_cb_sfp_t cbfn, void *cbarg); | ||
417 | |||
418 | bfa_status_t bfa_sfp_speed(struct bfa_sfp_s *sfp, | ||
419 | enum bfa_port_speed portspeed, | ||
420 | bfa_cb_sfp_t cbfn, void *cbarg); | ||
421 | |||
370 | #define bfa_ioc_pcifn(__ioc) ((__ioc)->pcidev.pci_func) | 422 | #define bfa_ioc_pcifn(__ioc) ((__ioc)->pcidev.pci_func) |
371 | #define bfa_ioc_devid(__ioc) ((__ioc)->pcidev.device_id) | 423 | #define bfa_ioc_devid(__ioc) ((__ioc)->pcidev.device_id) |
372 | #define bfa_ioc_bar0(__ioc) ((__ioc)->pcidev.pci_bar_kva) | 424 | #define bfa_ioc_bar0(__ioc) ((__ioc)->pcidev.pci_bar_kva) |