xref: /titanic_41/usr/src/uts/common/sys/nxge/nxge_fzc.h (revision 4bd2082ff2d009263265d7de938de336894b6009)
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 2006 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_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 	p_rx_rbr_ring_t, p_rx_rcr_ring_t, p_rx_mbox_t);
55 
56 nxge_status_t nxge_init_fzc_rdc_tbl(p_nxge_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_rxdma_channel_pages(p_nxge_t,
61 	uint16_t, p_rx_rbr_ring_t);
62 
63 nxge_status_t nxge_init_fzc_rxdma_channel_red(p_nxge_t,
64 	uint16_t, p_rx_rcr_ring_t);
65 
66 nxge_status_t nxge_init_fzc_rxdma_channel_clrlog(p_nxge_t,
67 	uint16_t, p_rx_rbr_ring_t);
68 
69 nxge_status_t nxge_init_fzc_txdma_channel_pages(p_nxge_t,
70 	uint16_t, p_tx_ring_t);
71 
72 nxge_status_t nxge_init_fzc_txdma_channel_drr(p_nxge_t, uint16_t,
73 	p_tx_ring_t);
74 
75 nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
76 
77 void nxge_init_fzc_ldg_num(p_nxge_t);
78 void nxge_init_fzc_sys_int_data(p_nxge_t);
79 void nxge_init_fzc_ldg_int_timer(p_nxge_t);
80 nxge_status_t nxge_fzc_sys_err_mask_set(p_nxge_t, uint64_t);
81 
82 #if	defined(sun4v) && defined(NIU_LP_WORKAROUND)
83 nxge_status_t nxge_init_hv_fzc_rxdma_channel_pages(p_nxge_t,
84 	uint16_t, p_rx_rbr_ring_t);
85 nxge_status_t nxge_init_hv_fzc_txdma_channel_pages(p_nxge_t,
86 	uint16_t, p_tx_ring_t);
87 #endif
88 
89 #ifdef	__cplusplus
90 }
91 #endif
92 
93 #endif	/* _SYS_NXGE_NXGE_FZC_H */
94