1f844a0eaSJeff Kirsher /* 2*2732ba56SRasesh Mody * Linux network driver for QLogic BR-series Converged Network Adapter. 3f844a0eaSJeff Kirsher * 4f844a0eaSJeff Kirsher * This program is free software; you can redistribute it and/or modify it 5f844a0eaSJeff Kirsher * under the terms of the GNU General Public License (GPL) Version 2 as 6f844a0eaSJeff Kirsher * published by the Free Software Foundation 7f844a0eaSJeff Kirsher * 8f844a0eaSJeff Kirsher * This program is distributed in the hope that it will be useful, but 9f844a0eaSJeff Kirsher * WITHOUT ANY WARRANTY; without even the implied warranty of 10f844a0eaSJeff Kirsher * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11f844a0eaSJeff Kirsher * General Public License for more details. 12f844a0eaSJeff Kirsher */ 13f844a0eaSJeff Kirsher /* 14*2732ba56SRasesh Mody * Copyright (c) 2005-2014 Brocade Communications Systems, Inc. 15*2732ba56SRasesh Mody * Copyright (c) 2014-2015 QLogic Corporation 16f844a0eaSJeff Kirsher * All rights reserved 17*2732ba56SRasesh Mody * www.qlogic.com 18f844a0eaSJeff Kirsher */ 19f844a0eaSJeff Kirsher 20f844a0eaSJeff Kirsher #ifndef __BFA_CEE_H__ 21f844a0eaSJeff Kirsher #define __BFA_CEE_H__ 22f844a0eaSJeff Kirsher 23f844a0eaSJeff Kirsher #include "bfa_defs_cna.h" 24f844a0eaSJeff Kirsher #include "bfa_ioc.h" 25f844a0eaSJeff Kirsher 26f844a0eaSJeff Kirsher typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, enum bfa_status status); 27f844a0eaSJeff Kirsher typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, enum bfa_status status); 28f844a0eaSJeff Kirsher typedef void (*bfa_cee_reset_stats_cbfn_t) (void *dev, enum bfa_status status); 29f844a0eaSJeff Kirsher 30f844a0eaSJeff Kirsher struct bfa_cee_cbfn { 31f844a0eaSJeff Kirsher bfa_cee_get_attr_cbfn_t get_attr_cbfn; 32f844a0eaSJeff Kirsher void *get_attr_cbarg; 33f844a0eaSJeff Kirsher bfa_cee_get_stats_cbfn_t get_stats_cbfn; 34f844a0eaSJeff Kirsher void *get_stats_cbarg; 35f844a0eaSJeff Kirsher bfa_cee_reset_stats_cbfn_t reset_stats_cbfn; 36f844a0eaSJeff Kirsher void *reset_stats_cbarg; 37f844a0eaSJeff Kirsher }; 38f844a0eaSJeff Kirsher 39f844a0eaSJeff Kirsher struct bfa_cee { 40f844a0eaSJeff Kirsher void *dev; 41f844a0eaSJeff Kirsher bool get_attr_pending; 42f844a0eaSJeff Kirsher bool get_stats_pending; 43f844a0eaSJeff Kirsher bool reset_stats_pending; 44f844a0eaSJeff Kirsher enum bfa_status get_attr_status; 45f844a0eaSJeff Kirsher enum bfa_status get_stats_status; 46f844a0eaSJeff Kirsher enum bfa_status reset_stats_status; 47f844a0eaSJeff Kirsher struct bfa_cee_cbfn cbfn; 48f844a0eaSJeff Kirsher struct bfa_ioc_notify ioc_notify; 49f844a0eaSJeff Kirsher struct bfa_cee_attr *attr; 50f844a0eaSJeff Kirsher struct bfa_cee_stats *stats; 51f844a0eaSJeff Kirsher struct bfa_dma attr_dma; 52f844a0eaSJeff Kirsher struct bfa_dma stats_dma; 53f844a0eaSJeff Kirsher struct bfa_ioc *ioc; 54f844a0eaSJeff Kirsher struct bfa_mbox_cmd get_cfg_mb; 55f844a0eaSJeff Kirsher struct bfa_mbox_cmd get_stats_mb; 56f844a0eaSJeff Kirsher struct bfa_mbox_cmd reset_stats_mb; 57f844a0eaSJeff Kirsher }; 58f844a0eaSJeff Kirsher 59f844a0eaSJeff Kirsher u32 bfa_nw_cee_meminfo(void); 60f844a0eaSJeff Kirsher void bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, 61f844a0eaSJeff Kirsher u64 dma_pa); 62f844a0eaSJeff Kirsher void bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev); 637afc5dbdSKrishna Gudipati enum bfa_status bfa_nw_cee_get_attr(struct bfa_cee *cee, 647afc5dbdSKrishna Gudipati struct bfa_cee_attr *attr, 657afc5dbdSKrishna Gudipati bfa_cee_get_attr_cbfn_t cbfn, void *cbarg); 66f844a0eaSJeff Kirsher #endif /* __BFA_CEE_H__ */ 67