xref: /titanic_52/usr/src/uts/common/sys/nxge/nxge_fzc.h (revision d2ec54f7875f7e05edd56195adbeb593c947763f)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_SYS_NXGE_NXGE_FZC_H
27 #define	_SYS_NXGE_NXGE_FZC_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 #include <npi_vir.h>
36 
37 nxge_status_t nxge_fzc_intr_init(p_nxge_t);
38 nxge_status_t nxge_fzc_intr_ldg_num_set(p_nxge_t);
39 nxge_status_t nxge_fzc_intr_tmres_set(p_nxge_t);
40 nxge_status_t nxge_fzc_intr_sid_set(p_nxge_t);
41 
42 nxge_status_t nxge_fzc_dmc_rx_log_page_vld(p_nxge_t, uint16_t,
43 	uint32_t, boolean_t);
44 nxge_status_t nxge_fzc_dmc_rx_log_page_mask(p_nxge_t, uint16_t,
45 	uint32_t, uint32_t, uint32_t);
46 
47 void nxge_init_fzc_txdma_channels(p_nxge_t);
48 
49 nxge_status_t nxge_init_fzc_tdc(p_nxge_t, uint16_t);
50 nxge_status_t nxge_init_fzc_txdma_channel(p_nxge_t, uint16_t,
51 	p_tx_ring_t, p_tx_mbox_t);
52 nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
53 
54 nxge_status_t nxge_init_fzc_rxdma_channel(p_nxge_t, uint16_t);
55 
56 nxge_status_t nxge_init_fzc_rdc(p_nxge_t, uint16_t);
57 nxge_status_t nxge_init_fzc_rx_common(p_nxge_t);
58 nxge_status_t nxge_init_fzc_rxdma_port(p_nxge_t);
59 
60 nxge_status_t nxge_init_fzc_rdc_tbl(nxge_t *, int);
61 
62 int nxge_fzc_rdc_tbl_bind(nxge_t *, int, int);
63 int nxge_fzc_rdc_tbl_unbind(p_nxge_t, int);
64 
65 nxge_status_t nxge_init_fzc_rxdma_channel_pages(p_nxge_t,
66 	uint16_t, p_rx_rbr_ring_t);
67 
68 nxge_status_t nxge_init_fzc_rxdma_channel_red(p_nxge_t,
69 	uint16_t, p_rx_rcr_ring_t);
70 
71 nxge_status_t nxge_init_fzc_rxdma_channel_clrlog(p_nxge_t,
72 	uint16_t, p_rx_rbr_ring_t);
73 
74 nxge_status_t nxge_init_fzc_txdma_channel_pages(p_nxge_t,
75 	uint16_t, p_tx_ring_t);
76 
77 nxge_status_t nxge_init_fzc_txdma_channel_drr(p_nxge_t, uint16_t,
78 	p_tx_ring_t);
79 
80 nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
81 
82 void nxge_init_fzc_ldg_num(p_nxge_t);
83 void nxge_init_fzc_sys_int_data(p_nxge_t);
84 void nxge_init_fzc_ldg_int_timer(p_nxge_t);
85 nxge_status_t nxge_fzc_sys_err_mask_set(p_nxge_t, uint64_t);
86 
87 #if	defined(sun4v) && defined(NIU_LP_WORKAROUND)
88 nxge_status_t nxge_init_hv_fzc_rxdma_channel_pages(p_nxge_t,
89 	uint16_t, p_rx_rbr_ring_t);
90 nxge_status_t nxge_init_hv_fzc_txdma_channel_pages(p_nxge_t,
91 	uint16_t, p_tx_ring_t);
92 #endif
93 
94 #ifdef	__cplusplus
95 }
96 #endif
97 
98 #endif	/* _SYS_NXGE_NXGE_FZC_H */
99