Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
bfa_port.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
3  * All rights reserved
4  * www.brocade.com
5  *
6  * Linux driver for Brocade Fibre Channel Host Bus Adapter.
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License (GPL) Version 2 as
10  * published by the Free Software Foundation
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  */
17 
18 #ifndef __BFA_PORT_H__
19 #define __BFA_PORT_H__
20 
21 #include "bfa_defs_svc.h"
22 #include "bfa_ioc.h"
23 #include "bfa_cs.h"
24 
27 
28 struct bfa_port_s {
29  void *dev;
30  struct bfa_ioc_s *ioc;
36  void *stats_cbarg;
44  void *endis_cbarg;
50 };
51 
52 #define BFA_MEM_PORT_DMA(__bfa) (&((__bfa)->modules.port.port_dma))
53 
54 void bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc,
55  void *dev, struct bfa_trc_mod_s *trcmod);
56 void bfa_port_notify(void *arg, enum bfa_ioc_event_e event);
57 
59  union bfa_port_stats_u *stats,
60  bfa_port_stats_cbfn_t cbfn, void *cbarg);
62  bfa_port_stats_cbfn_t cbfn, void *cbarg);
64  bfa_port_endis_cbfn_t cbfn, void *cbarg);
66  bfa_port_endis_cbfn_t cbfn, void *cbarg);
67 u32 bfa_port_meminfo(void);
69  u8 *dma_kva, u64 dma_pa);
72 
73 /*
74  * CEE declaration
75  */
79 
87 };
88 
89 struct bfa_cee_s {
90  void *dev;
104  struct bfa_ioc_s *ioc;
109 };
110 
111 #define BFA_MEM_CEE_DMA(__bfa) (&((__bfa)->modules.cee.cee_dma))
112 
113 u32 bfa_cee_meminfo(void);
114 void bfa_cee_mem_claim(struct bfa_cee_s *cee, u8 *dma_kva, u64 dma_pa);
115 void bfa_cee_attach(struct bfa_cee_s *cee,
116  struct bfa_ioc_s *ioc, void *dev);
118  struct bfa_cee_attr_s *attr,
119  bfa_cee_get_attr_cbfn_t cbfn, void *cbarg);
121  struct bfa_cee_stats_s *stats,
122  bfa_cee_get_stats_cbfn_t cbfn, void *cbarg);
124  bfa_cee_reset_stats_cbfn_t cbfn, void *cbarg);
125 
126 #endif /* __BFA_PORT_H__ */