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.
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.
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]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 * This file is Sun4v specific. It is the NXGE interface to the
35 #include <sys/nxge/nxge_impl.h>
36 #include <sys/nxge/nxge_hio.h>
39 * The HV VR functions are set up based on the
40 * the version number of the NIU API group.
41 * For version 2.0 and above, the NIU will be
42 * be referenced from the cfg-handle.
48 nxge_hio_hv_init(nxge_t
*nxge
)
50 nxge_hio_data_t
*nhd
= (nxge_hio_data_t
*)nxge
->nxge_hw_p
->hio
;
56 /* First, the HV VR functions. */
59 /* HV Major 1 interfaces */
60 vr
->assign
= &hv_niu_vr_assign
;
61 /* HV Major 2 interfaces */
62 vr
->cfgh_assign
= &hv_niu_cfgh_vr_assign
;
64 vr
->unassign
= &hv_niu_vr_unassign
;
65 vr
->getinfo
= &hv_niu_vr_getinfo
;
67 // -------------------------------------------------------------
68 /* Find the transmit functions. */
71 tx
->assign
= &hv_niu_tx_dma_assign
;
72 tx
->unassign
= &hv_niu_tx_dma_unassign
;
73 tx
->get_map
= &hv_niu_vr_get_txmap
;
75 /* HV Major 1 interfaces */
76 tx
->lp_conf
= &hv_niu_tx_logical_page_conf
;
77 tx
->lp_info
= &hv_niu_tx_logical_page_info
;
78 /* HV Major 2 interfaces */
79 tx
->lp_cfgh_conf
= &hv_niu_cfgh_tx_logical_page_conf
;
80 tx
->lp_cfgh_info
= &hv_niu_cfgh_tx_logical_page_info
;
82 tx
->getinfo
= &hv_niu_vrtx_getinfo
;
84 /* Now find the Receive functions. */
87 rx
->assign
= &hv_niu_rx_dma_assign
;
88 rx
->unassign
= &hv_niu_rx_dma_unassign
;
89 rx
->get_map
= &hv_niu_vr_get_rxmap
;
91 /* HV Major 1 interfaces */
92 rx
->lp_conf
= &hv_niu_rx_logical_page_conf
;
93 rx
->lp_info
= &hv_niu_rx_logical_page_info
;
94 /* HV Major 2 interfaces */
95 rx
->lp_cfgh_conf
= &hv_niu_cfgh_rx_logical_page_conf
;
96 rx
->lp_cfgh_info
= &hv_niu_cfgh_rx_logical_page_info
;
98 rx
->getinfo
= &hv_niu_vrrx_getinfo
;
101 #endif /* defined(sun4v) */