1f844a0eaSJeff Kirsher /* 2f844a0eaSJeff Kirsher * Linux network driver for Brocade 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 /* 14f844a0eaSJeff Kirsher * Copyright (c) 2005-2010 Brocade Communications Systems, Inc. 15f844a0eaSJeff Kirsher * All rights reserved 16f844a0eaSJeff Kirsher * www.brocade.com 17f844a0eaSJeff Kirsher */ 18f844a0eaSJeff Kirsher 19f844a0eaSJeff Kirsher #ifndef __BFA_CEE_H__ 20f844a0eaSJeff Kirsher #define __BFA_CEE_H__ 21f844a0eaSJeff Kirsher 22f844a0eaSJeff Kirsher #include "bfa_defs_cna.h" 23f844a0eaSJeff Kirsher #include "bfa_ioc.h" 24f844a0eaSJeff Kirsher 25f844a0eaSJeff Kirsher typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, enum bfa_status status); 26f844a0eaSJeff Kirsher typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, enum bfa_status status); 27f844a0eaSJeff Kirsher typedef void (*bfa_cee_reset_stats_cbfn_t) (void *dev, enum bfa_status status); 28f844a0eaSJeff Kirsher 29f844a0eaSJeff Kirsher struct bfa_cee_cbfn { 30f844a0eaSJeff Kirsher bfa_cee_get_attr_cbfn_t get_attr_cbfn; 31f844a0eaSJeff Kirsher void *get_attr_cbarg; 32f844a0eaSJeff Kirsher bfa_cee_get_stats_cbfn_t get_stats_cbfn; 33f844a0eaSJeff Kirsher void *get_stats_cbarg; 34f844a0eaSJeff Kirsher bfa_cee_reset_stats_cbfn_t reset_stats_cbfn; 35f844a0eaSJeff Kirsher void *reset_stats_cbarg; 36f844a0eaSJeff Kirsher }; 37f844a0eaSJeff Kirsher 38f844a0eaSJeff Kirsher struct bfa_cee { 39f844a0eaSJeff Kirsher void *dev; 40f844a0eaSJeff Kirsher bool get_attr_pending; 41f844a0eaSJeff Kirsher bool get_stats_pending; 42f844a0eaSJeff Kirsher bool reset_stats_pending; 43f844a0eaSJeff Kirsher enum bfa_status get_attr_status; 44f844a0eaSJeff Kirsher enum bfa_status get_stats_status; 45f844a0eaSJeff Kirsher enum bfa_status reset_stats_status; 46f844a0eaSJeff Kirsher struct bfa_cee_cbfn cbfn; 47f844a0eaSJeff Kirsher struct bfa_ioc_notify ioc_notify; 48f844a0eaSJeff Kirsher struct bfa_cee_attr *attr; 49f844a0eaSJeff Kirsher struct bfa_cee_stats *stats; 50f844a0eaSJeff Kirsher struct bfa_dma attr_dma; 51f844a0eaSJeff Kirsher struct bfa_dma stats_dma; 52f844a0eaSJeff Kirsher struct bfa_ioc *ioc; 53f844a0eaSJeff Kirsher struct bfa_mbox_cmd get_cfg_mb; 54f844a0eaSJeff Kirsher struct bfa_mbox_cmd get_stats_mb; 55f844a0eaSJeff Kirsher struct bfa_mbox_cmd reset_stats_mb; 56f844a0eaSJeff Kirsher }; 57f844a0eaSJeff Kirsher 58f844a0eaSJeff Kirsher u32 bfa_nw_cee_meminfo(void); 59f844a0eaSJeff Kirsher void bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, 60f844a0eaSJeff Kirsher u64 dma_pa); 61f844a0eaSJeff Kirsher void bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev); 62*7afc5dbdSKrishna Gudipati enum bfa_status bfa_nw_cee_get_attr(struct bfa_cee *cee, 63*7afc5dbdSKrishna Gudipati struct bfa_cee_attr *attr, 64*7afc5dbdSKrishna Gudipati bfa_cee_get_attr_cbfn_t cbfn, void *cbarg); 65f844a0eaSJeff Kirsher #endif /* __BFA_CEE_H__ */ 66