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