xref: /illumos-gate/usr/src/uts/common/sys/nxge/nxge_fzc.h (revision 4ba491f53199ecfd5a928fdce7dc8f8aa9de4b9e)
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 /*
23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_NXGE_NXGE_FZC_H
28 #define	_SYS_NXGE_NXGE_FZC_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 #include <npi_vir.h>
35 
36 nxge_status_t nxge_fzc_intr_init(p_nxge_t);
37 nxge_status_t nxge_fzc_intr_ldg_num_set(p_nxge_t);
38 nxge_status_t nxge_fzc_intr_tmres_set(p_nxge_t);
39 nxge_status_t nxge_fzc_intr_sid_set(p_nxge_t);
40 
41 nxge_status_t nxge_fzc_dmc_rx_log_page_vld(p_nxge_t, uint16_t,
42 	uint32_t, boolean_t);
43 nxge_status_t nxge_fzc_dmc_rx_log_page_mask(p_nxge_t, uint16_t,
44 	uint32_t, uint32_t, uint32_t);
45 
46 void nxge_init_fzc_txdma_channels(p_nxge_t);
47 
48 nxge_status_t nxge_init_fzc_tdc(p_nxge_t, uint16_t);
49 nxge_status_t nxge_init_fzc_txdma_channel(p_nxge_t, uint16_t,
50 	p_tx_ring_t, p_tx_mbox_t);
51 nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
52 
53 nxge_status_t nxge_init_fzc_rxdma_channel(p_nxge_t, uint16_t);
54 
55 nxge_status_t nxge_init_fzc_rdc(p_nxge_t, uint16_t);
56 nxge_status_t nxge_init_fzc_rx_common(p_nxge_t);
57 nxge_status_t nxge_init_fzc_rxdma_port(p_nxge_t);
58 
59 nxge_status_t nxge_init_fzc_rdc_tbl(nxge_t *, nxge_rdc_grp_t *, int);
60 
61 int nxge_fzc_rdc_tbl_bind(nxge_t *, int, int);
62 int nxge_fzc_rdc_tbl_unbind(p_nxge_t, int);
63 
64 nxge_status_t nxge_init_fzc_rxdma_channel_pages(p_nxge_t,
65 	uint16_t, p_rx_rbr_ring_t);
66 
67 nxge_status_t nxge_init_fzc_rxdma_channel_red(p_nxge_t,
68 	uint16_t, p_rx_rcr_ring_t);
69 
70 nxge_status_t nxge_init_fzc_rxdma_channel_clrlog(p_nxge_t,
71 	uint16_t, p_rx_rbr_ring_t);
72 
73 nxge_status_t nxge_init_fzc_txdma_channel_pages(p_nxge_t,
74 	uint16_t, p_tx_ring_t);
75 
76 nxge_status_t nxge_init_fzc_txdma_channel_drr(p_nxge_t, uint16_t,
77 	p_tx_ring_t);
78 
79 nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
80 
81 void nxge_init_fzc_ldg_num(p_nxge_t);
82 void nxge_init_fzc_sys_int_data(p_nxge_t);
83 void nxge_init_fzc_ldg_int_timer(p_nxge_t);
84 nxge_status_t nxge_fzc_sys_err_mask_set(p_nxge_t, uint64_t);
85 
86 #if	defined(sun4v) && defined(NIU_LP_WORKAROUND)
87 nxge_status_t nxge_init_hv_fzc_rxdma_channel_pages(p_nxge_t,
88 	uint16_t, p_rx_rbr_ring_t);
89 nxge_status_t nxge_init_hv_fzc_txdma_channel_pages(p_nxge_t,
90 	uint16_t, p_tx_ring_t);
91 #endif
92 
93 #ifdef	__cplusplus
94 }
95 #endif
96 
97 #endif	/* _SYS_NXGE_NXGE_FZC_H */
98