xref: /illumos-gate/usr/src/uts/common/sys/nxge/nxge_fzc.h (revision 4ba491f5)
144961713Sgirish /*
244961713Sgirish  * CDDL HEADER START
344961713Sgirish  *
444961713Sgirish  * The contents of this file are subject to the terms of the
544961713Sgirish  * Common Development and Distribution License (the "License").
644961713Sgirish  * You may not use this file except in compliance with the License.
744961713Sgirish  *
844961713Sgirish  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
944961713Sgirish  * or http://www.opensolaris.org/os/licensing.
1044961713Sgirish  * See the License for the specific language governing permissions
1144961713Sgirish  * and limitations under the License.
1244961713Sgirish  *
1344961713Sgirish  * When distributing Covered Code, include this CDDL HEADER in each
1444961713Sgirish  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1544961713Sgirish  * If applicable, add the following below this CDDL HEADER, with the
1644961713Sgirish  * fields enclosed by brackets "[]" replaced with your own identifying
1744961713Sgirish  * information: Portions Copyright [yyyy] [name of copyright owner]
1844961713Sgirish  *
1944961713Sgirish  * CDDL HEADER END
2044961713Sgirish  */
21*4ba491f5SMichael Speer 
2244961713Sgirish /*
23*4ba491f5SMichael Speer  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2444961713Sgirish  * Use is subject to license terms.
2544961713Sgirish  */
2644961713Sgirish 
2744961713Sgirish #ifndef	_SYS_NXGE_NXGE_FZC_H
2844961713Sgirish #define	_SYS_NXGE_NXGE_FZC_H
2944961713Sgirish 
3044961713Sgirish #ifdef	__cplusplus
3144961713Sgirish extern "C" {
3244961713Sgirish #endif
3344961713Sgirish 
3444961713Sgirish #include <npi_vir.h>
3544961713Sgirish 
3644961713Sgirish nxge_status_t nxge_fzc_intr_init(p_nxge_t);
3744961713Sgirish nxge_status_t nxge_fzc_intr_ldg_num_set(p_nxge_t);
3844961713Sgirish nxge_status_t nxge_fzc_intr_tmres_set(p_nxge_t);
3944961713Sgirish nxge_status_t nxge_fzc_intr_sid_set(p_nxge_t);
4044961713Sgirish 
4144961713Sgirish nxge_status_t nxge_fzc_dmc_rx_log_page_vld(p_nxge_t, uint16_t,
4244961713Sgirish 	uint32_t, boolean_t);
4344961713Sgirish nxge_status_t nxge_fzc_dmc_rx_log_page_mask(p_nxge_t, uint16_t,
4444961713Sgirish 	uint32_t, uint32_t, uint32_t);
4544961713Sgirish 
4644961713Sgirish void nxge_init_fzc_txdma_channels(p_nxge_t);
4744961713Sgirish 
48678453a8Sspeer nxge_status_t nxge_init_fzc_tdc(p_nxge_t, uint16_t);
4944961713Sgirish nxge_status_t nxge_init_fzc_txdma_channel(p_nxge_t, uint16_t,
5044961713Sgirish 	p_tx_ring_t, p_tx_mbox_t);
5144961713Sgirish nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
5244961713Sgirish 
53678453a8Sspeer nxge_status_t nxge_init_fzc_rxdma_channel(p_nxge_t, uint16_t);
5444961713Sgirish 
55678453a8Sspeer nxge_status_t nxge_init_fzc_rdc(p_nxge_t, uint16_t);
5644961713Sgirish nxge_status_t nxge_init_fzc_rx_common(p_nxge_t);
5744961713Sgirish nxge_status_t nxge_init_fzc_rxdma_port(p_nxge_t);
5844961713Sgirish 
59*4ba491f5SMichael Speer nxge_status_t nxge_init_fzc_rdc_tbl(nxge_t *, nxge_rdc_grp_t *, int);
60678453a8Sspeer 
61678453a8Sspeer int nxge_fzc_rdc_tbl_bind(nxge_t *, int, int);
62678453a8Sspeer int nxge_fzc_rdc_tbl_unbind(p_nxge_t, int);
63678453a8Sspeer 
6444961713Sgirish nxge_status_t nxge_init_fzc_rxdma_channel_pages(p_nxge_t,
6544961713Sgirish 	uint16_t, p_rx_rbr_ring_t);
6644961713Sgirish 
6744961713Sgirish nxge_status_t nxge_init_fzc_rxdma_channel_red(p_nxge_t,
6844961713Sgirish 	uint16_t, p_rx_rcr_ring_t);
6944961713Sgirish 
7044961713Sgirish nxge_status_t nxge_init_fzc_rxdma_channel_clrlog(p_nxge_t,
7144961713Sgirish 	uint16_t, p_rx_rbr_ring_t);
7244961713Sgirish 
7344961713Sgirish nxge_status_t nxge_init_fzc_txdma_channel_pages(p_nxge_t,
7444961713Sgirish 	uint16_t, p_tx_ring_t);
7544961713Sgirish 
7644961713Sgirish nxge_status_t nxge_init_fzc_txdma_channel_drr(p_nxge_t, uint16_t,
7744961713Sgirish 	p_tx_ring_t);
7844961713Sgirish 
7944961713Sgirish nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
8044961713Sgirish 
8144961713Sgirish void nxge_init_fzc_ldg_num(p_nxge_t);
8244961713Sgirish void nxge_init_fzc_sys_int_data(p_nxge_t);
8344961713Sgirish void nxge_init_fzc_ldg_int_timer(p_nxge_t);
8444961713Sgirish nxge_status_t nxge_fzc_sys_err_mask_set(p_nxge_t, uint64_t);
8544961713Sgirish 
8644961713Sgirish #if	defined(sun4v) && defined(NIU_LP_WORKAROUND)
8744961713Sgirish nxge_status_t nxge_init_hv_fzc_rxdma_channel_pages(p_nxge_t,
8844961713Sgirish 	uint16_t, p_rx_rbr_ring_t);
8944961713Sgirish nxge_status_t nxge_init_hv_fzc_txdma_channel_pages(p_nxge_t,
9044961713Sgirish 	uint16_t, p_tx_ring_t);
9144961713Sgirish #endif
9244961713Sgirish 
9344961713Sgirish #ifdef	__cplusplus
9444961713Sgirish }
9544961713Sgirish #endif
9644961713Sgirish 
9744961713Sgirish #endif	/* _SYS_NXGE_NXGE_FZC_H */
98