xref: /titanic_44/usr/src/uts/common/sys/nxge/nxge_fzc.h (revision 4ba491f53199ecfd5a928fdce7dc8f8aa9de4b9e)
16f45ec7bSml29623 /*
26f45ec7bSml29623  * CDDL HEADER START
36f45ec7bSml29623  *
46f45ec7bSml29623  * The contents of this file are subject to the terms of the
56f45ec7bSml29623  * Common Development and Distribution License (the "License").
66f45ec7bSml29623  * You may not use this file except in compliance with the License.
76f45ec7bSml29623  *
86f45ec7bSml29623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96f45ec7bSml29623  * or http://www.opensolaris.org/os/licensing.
106f45ec7bSml29623  * See the License for the specific language governing permissions
116f45ec7bSml29623  * and limitations under the License.
126f45ec7bSml29623  *
136f45ec7bSml29623  * When distributing Covered Code, include this CDDL HEADER in each
146f45ec7bSml29623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156f45ec7bSml29623  * If applicable, add the following below this CDDL HEADER, with the
166f45ec7bSml29623  * fields enclosed by brackets "[]" replaced with your own identifying
176f45ec7bSml29623  * information: Portions Copyright [yyyy] [name of copyright owner]
186f45ec7bSml29623  *
196f45ec7bSml29623  * CDDL HEADER END
206f45ec7bSml29623  */
21*4ba491f5SMichael Speer 
226f45ec7bSml29623 /*
23*4ba491f5SMichael Speer  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
246f45ec7bSml29623  * Use is subject to license terms.
256f45ec7bSml29623  */
266f45ec7bSml29623 
276f45ec7bSml29623 #ifndef	_SYS_NXGE_NXGE_FZC_H
286f45ec7bSml29623 #define	_SYS_NXGE_NXGE_FZC_H
296f45ec7bSml29623 
306f45ec7bSml29623 #ifdef	__cplusplus
316f45ec7bSml29623 extern "C" {
326f45ec7bSml29623 #endif
336f45ec7bSml29623 
346f45ec7bSml29623 #include <npi_vir.h>
356f45ec7bSml29623 
366f45ec7bSml29623 nxge_status_t nxge_fzc_intr_init(p_nxge_t);
376f45ec7bSml29623 nxge_status_t nxge_fzc_intr_ldg_num_set(p_nxge_t);
386f45ec7bSml29623 nxge_status_t nxge_fzc_intr_tmres_set(p_nxge_t);
396f45ec7bSml29623 nxge_status_t nxge_fzc_intr_sid_set(p_nxge_t);
406f45ec7bSml29623 
416f45ec7bSml29623 nxge_status_t nxge_fzc_dmc_rx_log_page_vld(p_nxge_t, uint16_t,
426f45ec7bSml29623 	uint32_t, boolean_t);
436f45ec7bSml29623 nxge_status_t nxge_fzc_dmc_rx_log_page_mask(p_nxge_t, uint16_t,
446f45ec7bSml29623 	uint32_t, uint32_t, uint32_t);
456f45ec7bSml29623 
466f45ec7bSml29623 void nxge_init_fzc_txdma_channels(p_nxge_t);
476f45ec7bSml29623 
48678453a8Sspeer nxge_status_t nxge_init_fzc_tdc(p_nxge_t, uint16_t);
496f45ec7bSml29623 nxge_status_t nxge_init_fzc_txdma_channel(p_nxge_t, uint16_t,
506f45ec7bSml29623 	p_tx_ring_t, p_tx_mbox_t);
516f45ec7bSml29623 nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
526f45ec7bSml29623 
53678453a8Sspeer nxge_status_t nxge_init_fzc_rxdma_channel(p_nxge_t, uint16_t);
546f45ec7bSml29623 
55678453a8Sspeer nxge_status_t nxge_init_fzc_rdc(p_nxge_t, uint16_t);
566f45ec7bSml29623 nxge_status_t nxge_init_fzc_rx_common(p_nxge_t);
576f45ec7bSml29623 nxge_status_t nxge_init_fzc_rxdma_port(p_nxge_t);
586f45ec7bSml29623 
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 
646f45ec7bSml29623 nxge_status_t nxge_init_fzc_rxdma_channel_pages(p_nxge_t,
656f45ec7bSml29623 	uint16_t, p_rx_rbr_ring_t);
666f45ec7bSml29623 
676f45ec7bSml29623 nxge_status_t nxge_init_fzc_rxdma_channel_red(p_nxge_t,
686f45ec7bSml29623 	uint16_t, p_rx_rcr_ring_t);
696f45ec7bSml29623 
706f45ec7bSml29623 nxge_status_t nxge_init_fzc_rxdma_channel_clrlog(p_nxge_t,
716f45ec7bSml29623 	uint16_t, p_rx_rbr_ring_t);
726f45ec7bSml29623 
736f45ec7bSml29623 nxge_status_t nxge_init_fzc_txdma_channel_pages(p_nxge_t,
746f45ec7bSml29623 	uint16_t, p_tx_ring_t);
756f45ec7bSml29623 
766f45ec7bSml29623 nxge_status_t nxge_init_fzc_txdma_channel_drr(p_nxge_t, uint16_t,
776f45ec7bSml29623 	p_tx_ring_t);
786f45ec7bSml29623 
796f45ec7bSml29623 nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
806f45ec7bSml29623 
816f45ec7bSml29623 void nxge_init_fzc_ldg_num(p_nxge_t);
826f45ec7bSml29623 void nxge_init_fzc_sys_int_data(p_nxge_t);
836f45ec7bSml29623 void nxge_init_fzc_ldg_int_timer(p_nxge_t);
846f45ec7bSml29623 nxge_status_t nxge_fzc_sys_err_mask_set(p_nxge_t, uint64_t);
856f45ec7bSml29623 
866f45ec7bSml29623 #if	defined(sun4v) && defined(NIU_LP_WORKAROUND)
876f45ec7bSml29623 nxge_status_t nxge_init_hv_fzc_rxdma_channel_pages(p_nxge_t,
886f45ec7bSml29623 	uint16_t, p_rx_rbr_ring_t);
896f45ec7bSml29623 nxge_status_t nxge_init_hv_fzc_txdma_channel_pages(p_nxge_t,
906f45ec7bSml29623 	uint16_t, p_tx_ring_t);
916f45ec7bSml29623 #endif
926f45ec7bSml29623 
936f45ec7bSml29623 #ifdef	__cplusplus
946f45ec7bSml29623 }
956f45ec7bSml29623 #endif
966f45ec7bSml29623 
976f45ec7bSml29623 #endif	/* _SYS_NXGE_NXGE_FZC_H */
98