Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Linux network driver for QLogic BR-series Converged Network Adapter.
0004  */
0005 /*
0006  * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
0007  * Copyright (c) 2014-2015 QLogic Corporation
0008  * All rights reserved
0009  * www.qlogic.com
0010  */
0011 
0012 #ifndef __BFA_CEE_H__
0013 #define __BFA_CEE_H__
0014 
0015 #include "bfa_defs_cna.h"
0016 #include "bfa_ioc.h"
0017 
0018 typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, enum bfa_status status);
0019 typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, enum bfa_status status);
0020 typedef void (*bfa_cee_reset_stats_cbfn_t) (void *dev, enum bfa_status status);
0021 
0022 struct bfa_cee_cbfn {
0023     bfa_cee_get_attr_cbfn_t    get_attr_cbfn;
0024     void *get_attr_cbarg;
0025     bfa_cee_get_stats_cbfn_t   get_stats_cbfn;
0026     void *get_stats_cbarg;
0027     bfa_cee_reset_stats_cbfn_t reset_stats_cbfn;
0028     void *reset_stats_cbarg;
0029 };
0030 
0031 struct bfa_cee {
0032     void *dev;
0033     bool get_attr_pending;
0034     bool get_stats_pending;
0035     bool reset_stats_pending;
0036     enum bfa_status get_attr_status;
0037     enum bfa_status get_stats_status;
0038     enum bfa_status reset_stats_status;
0039     struct bfa_cee_cbfn cbfn;
0040     struct bfa_ioc_notify ioc_notify;
0041     struct bfa_cee_attr *attr;
0042     struct bfa_cee_stats *stats;
0043     struct bfa_dma attr_dma;
0044     struct bfa_dma stats_dma;
0045     struct bfa_ioc *ioc;
0046     struct bfa_mbox_cmd get_cfg_mb;
0047     struct bfa_mbox_cmd get_stats_mb;
0048     struct bfa_mbox_cmd reset_stats_mb;
0049 };
0050 
0051 u32 bfa_nw_cee_meminfo(void);
0052 void bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva,
0053     u64 dma_pa);
0054 void bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev);
0055 enum bfa_status bfa_nw_cee_get_attr(struct bfa_cee *cee,
0056                 struct bfa_cee_attr *attr,
0057                 bfa_cee_get_attr_cbfn_t cbfn, void *cbarg);
0058 #endif /* __BFA_CEE_H__ */