Linux Audio

Check our new training course

Linux debugging, profiling, tracing and performance analysis training

Apr 14-17, 2025
Register
Loading...
 1/*
 2 * Linux network driver for QLogic BR-series 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-2014 Brocade Communications Systems, Inc.
15 * Copyright (c) 2014-2015 QLogic Corporation
16 * All rights reserved
17 * www.qlogic.com
18 */
19
20#ifndef __BFA_CEE_H__
21#define __BFA_CEE_H__
22
23#include "bfa_defs_cna.h"
24#include "bfa_ioc.h"
25
26typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, enum bfa_status status);
27typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, enum bfa_status status);
28typedef void (*bfa_cee_reset_stats_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_notify ioc_notify;
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_nw_cee_meminfo(void);
60void bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva,
61	u64 dma_pa);
62void bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev);
63enum bfa_status bfa_nw_cee_get_attr(struct bfa_cee *cee,
64				struct bfa_cee_attr *attr,
65				bfa_cee_get_attr_cbfn_t cbfn, void *cbarg);
66#endif /* __BFA_CEE_H__ */
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * Linux network driver for QLogic BR-series Converged Network Adapter.
 4 */
 5/*
 6 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
 7 * Copyright (c) 2014-2015 QLogic Corporation
 8 * All rights reserved
 9 * www.qlogic.com
10 */
11
12#ifndef __BFA_CEE_H__
13#define __BFA_CEE_H__
14
15#include "bfa_defs_cna.h"
16#include "bfa_ioc.h"
17
18typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, enum bfa_status status);
19typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, enum bfa_status status);
20typedef void (*bfa_cee_reset_stats_cbfn_t) (void *dev, enum bfa_status status);
21
22struct bfa_cee_cbfn {
23	bfa_cee_get_attr_cbfn_t    get_attr_cbfn;
24	void *get_attr_cbarg;
25	bfa_cee_get_stats_cbfn_t   get_stats_cbfn;
26	void *get_stats_cbarg;
27	bfa_cee_reset_stats_cbfn_t reset_stats_cbfn;
28	void *reset_stats_cbarg;
29};
30
31struct bfa_cee {
32	void *dev;
33	bool get_attr_pending;
34	bool get_stats_pending;
35	bool reset_stats_pending;
36	enum bfa_status get_attr_status;
37	enum bfa_status get_stats_status;
38	enum bfa_status reset_stats_status;
39	struct bfa_cee_cbfn cbfn;
40	struct bfa_ioc_notify ioc_notify;
41	struct bfa_cee_attr *attr;
42	struct bfa_cee_stats *stats;
43	struct bfa_dma attr_dma;
44	struct bfa_dma stats_dma;
45	struct bfa_ioc *ioc;
46	struct bfa_mbox_cmd get_cfg_mb;
47	struct bfa_mbox_cmd get_stats_mb;
48	struct bfa_mbox_cmd reset_stats_mb;
49};
50
51u32 bfa_nw_cee_meminfo(void);
52void bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva,
53	u64 dma_pa);
54void bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev);
55enum bfa_status bfa_nw_cee_get_attr(struct bfa_cee *cee,
56				struct bfa_cee_attr *attr,
57				bfa_cee_get_attr_cbfn_t cbfn, void *cbarg);
58#endif /* __BFA_CEE_H__ */