Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
0004  * Copyright (c) 2014- QLogic Corporation.
0005  * All rights reserved
0006  * www.qlogic.com
0007  *
0008  * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
0009  */
0010 
0011 /*
0012  *  bfa_modules.h BFA modules
0013  */
0014 
0015 #ifndef __BFA_MODULES_H__
0016 #define __BFA_MODULES_H__
0017 
0018 #include "bfa_cs.h"
0019 #include "bfa.h"
0020 #include "bfa_svc.h"
0021 #include "bfa_fcpim.h"
0022 #include "bfa_port.h"
0023 
0024 struct bfa_modules_s {
0025     struct bfa_fcdiag_s fcdiag;     /* fcdiag module */
0026     struct bfa_fcport_s fcport;     /*  fc port module        */
0027     struct bfa_fcxp_mod_s   fcxp_mod;   /*  fcxp module       */
0028     struct bfa_lps_mod_s    lps_mod;    /*  fcxp module       */
0029     struct bfa_uf_mod_s uf_mod;     /*  unsolicited frame module */
0030     struct bfa_rport_mod_s  rport_mod;  /*  remote port module        */
0031     struct bfa_fcp_mod_s    fcp_mod;    /*  FCP initiator module     */
0032     struct bfa_sgpg_mod_s   sgpg_mod;   /*  SG page module        */
0033     struct bfa_port_s   port;       /*  Physical port module     */
0034     struct bfa_ablk_s   ablk;       /*  ASIC block config module */
0035     struct bfa_cee_s    cee;        /*  CEE Module  */
0036     struct bfa_sfp_s    sfp;        /*  SFP module  */
0037     struct bfa_flash_s  flash;      /*  flash module */
0038     struct bfa_diag_s   diag_mod;   /*  diagnostics module  */
0039     struct bfa_phy_s    phy;        /*  phy module      */
0040     struct bfa_dconf_mod_s  dconf_mod;  /*  DCONF common module */
0041     struct bfa_fru_s    fru;        /*  fru module      */
0042 };
0043 
0044 /*
0045  * !!! Only append to the enums defined here to avoid any versioning
0046  * !!! needed between trace utility and driver version
0047  */
0048 enum {
0049     BFA_TRC_HAL_CORE    = 1,
0050     BFA_TRC_HAL_FCXP    = 2,
0051     BFA_TRC_HAL_FCPIM   = 3,
0052     BFA_TRC_HAL_IOCFC_CT    = 4,
0053     BFA_TRC_HAL_IOCFC_CB    = 5,
0054 };
0055 
0056 #define BFA_CACHELINE_SZ    (256)
0057 
0058 struct bfa_s {
0059     void            *bfad;      /*  BFA driver instance    */
0060     struct bfa_plog_s   *plog;      /*  portlog buffer      */
0061     struct bfa_trc_mod_s    *trcmod;    /*  driver tracing      */
0062     struct bfa_ioc_s    ioc;        /*  IOC module          */
0063     struct bfa_iocfc_s  iocfc;      /*  IOCFC module        */
0064     struct bfa_timer_mod_s  timer_mod;  /*  timer module        */
0065     struct bfa_modules_s    modules;    /*  BFA modules     */
0066     struct list_head    comp_q;     /*  pending completions     */
0067     bfa_boolean_t       queue_process;  /*  queue processing enabled */
0068     struct list_head    reqq_waitq[BFI_IOC_MAX_CQS];
0069     bfa_boolean_t       fcs;        /*  FCS is attached to BFA */
0070     struct bfa_msix_s   msix;
0071     int         bfa_aen_seq;
0072     bfa_boolean_t       intr_enabled;   /*  Status of interrupts */
0073 };
0074 
0075 extern bfa_boolean_t bfa_auto_recover;
0076 
0077 void bfa_dconf_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *);
0078 void bfa_dconf_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
0079           struct bfa_s *);
0080 void bfa_dconf_iocdisable(struct bfa_s *);
0081 void bfa_fcp_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
0082         struct bfa_pcidev_s *);
0083 void bfa_fcp_iocdisable(struct bfa_s *bfa);
0084 void bfa_fcp_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
0085         struct bfa_s *);
0086 void bfa_fcpim_iocdisable(struct bfa_fcp_mod_s *);
0087 void bfa_fcport_start(struct bfa_s *);
0088 void bfa_fcport_iocdisable(struct bfa_s *);
0089 void bfa_fcport_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
0090            struct bfa_s *);
0091 void bfa_fcport_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
0092         struct bfa_pcidev_s *);
0093 void bfa_fcxp_iocdisable(struct bfa_s *);
0094 void bfa_fcxp_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
0095         struct bfa_s *);
0096 void bfa_fcxp_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
0097         struct bfa_pcidev_s *);
0098 void bfa_fcdiag_iocdisable(struct bfa_s *);
0099 void bfa_fcdiag_attach(struct bfa_s *bfa, void *, struct bfa_iocfc_cfg_s *,
0100         struct bfa_pcidev_s *);
0101 void bfa_ioim_lm_init(struct bfa_s *);
0102 void bfa_lps_iocdisable(struct bfa_s *bfa);
0103 void bfa_lps_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
0104         struct bfa_s *);
0105 void bfa_lps_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
0106     struct bfa_pcidev_s *);
0107 void bfa_rport_iocdisable(struct bfa_s *bfa);
0108 void bfa_rport_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
0109         struct bfa_s *);
0110 void bfa_rport_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
0111         struct bfa_pcidev_s *);
0112 void bfa_sgpg_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
0113         struct bfa_s *);
0114 void bfa_sgpg_attach(struct bfa_s *, void *bfad, struct bfa_iocfc_cfg_s *,
0115         struct bfa_pcidev_s *);
0116 void bfa_uf_iocdisable(struct bfa_s *);
0117 void bfa_uf_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
0118         struct bfa_s *);
0119 void bfa_uf_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
0120         struct bfa_pcidev_s *);
0121 void bfa_uf_start(struct bfa_s *);
0122 
0123 #endif /* __BFA_MODULES_H__ */