aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bna/bfa_cee.h
diff options
context:
space:
mode:
authorRasesh Mody <rmody@brocade.com>2010-08-23 23:24:12 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-23 23:24:12 -0400
commit8b230ed8ec96c933047dd0625cf95f739e4939a6 (patch)
tree517e761a804a2b2f9631b755abcbf525240b916e /drivers/net/bna/bfa_cee.h
parent231cc2aaf14bad3b2325be0b19b8385ff5e75485 (diff)
bna: Brocade 10Gb Ethernet device driver
This is patch 1/6 which contains linux driver source for Brocade's BR1010/BR1020 10Gb CEE capable ethernet adapter. Signed-off-by: Debashis Dutt <ddutt@brocade.com> Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bna/bfa_cee.h')
-rw-r--r--drivers/net/bna/bfa_cee.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/drivers/net/bna/bfa_cee.h b/drivers/net/bna/bfa_cee.h
new file mode 100644
index 000000000000..1208cadeceed
--- /dev/null
+++ b/drivers/net/bna/bfa_cee.h
@@ -0,0 +1,72 @@
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
25typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, enum bfa_status status);
26typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, enum bfa_status status);
27typedef void (*bfa_cee_reset_stats_cbfn_t) (void *dev, enum bfa_status status);
28typedef void (*bfa_cee_hbfail_cbfn_t) (void *dev, enum bfa_status status);
29
30struct bfa_cee_cbfn {
31 bfa_cee_get_attr_cbfn_t get_attr_cbfn;
32 void *get_attr_cbarg;
33 bfa_cee_get_stats_cbfn_t get_stats_cbfn;
34 void *get_stats_cbarg;
35 bfa_cee_reset_stats_cbfn_t reset_stats_cbfn;
36 void *reset_stats_cbarg;
37};
38
39struct bfa_cee {
40 void *dev;
41 bool get_attr_pending;
42 bool get_stats_pending;
43 bool reset_stats_pending;
44 enum bfa_status get_attr_status;
45 enum bfa_status get_stats_status;
46 enum bfa_status reset_stats_status;
47 struct bfa_cee_cbfn cbfn;
48 struct bfa_ioc_hbfail_notify hbfail;
49 struct bfa_cee_attr *attr;
50 struct bfa_cee_stats *stats;
51 struct bfa_dma attr_dma;
52 struct bfa_dma stats_dma;
53 struct bfa_ioc *ioc;
54 struct bfa_mbox_cmd get_cfg_mb;
55 struct bfa_mbox_cmd get_stats_mb;
56 struct bfa_mbox_cmd reset_stats_mb;
57};
58
59u32 bfa_cee_meminfo(void);
60void bfa_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva,
61 u64 dma_pa);
62void bfa_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev);
63void bfa_cee_detach(struct bfa_cee *cee);
64enum bfa_status bfa_cee_get_attr(struct bfa_cee *cee,
65 struct bfa_cee_attr *attr, bfa_cee_get_attr_cbfn_t cbfn, void *cbarg);
66enum bfa_status bfa_cee_get_stats(struct bfa_cee *cee,
67 struct bfa_cee_stats *stats, bfa_cee_get_stats_cbfn_t cbfn,
68 void *cbarg);
69enum bfa_status bfa_cee_reset_stats(struct bfa_cee *cee,
70 bfa_cee_reset_stats_cbfn_t cbfn, void *cbarg);
71
72#endif /* __BFA_CEE_H__ */