3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs/*
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * CDDL HEADER START
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs *
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * The contents of this file are subject to the terms of the
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Common Development and Distribution License (the "License").
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * You may not use this file except in compliance with the License.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs *
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * or http://www.opensolaris.org/os/licensing.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * See the License for the specific language governing permissions
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * and limitations under the License.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs *
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * When distributing Covered Code, include this CDDL HEADER in each
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * If applicable, add the following below this CDDL HEADER, with the
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * fields enclosed by brackets "[]" replaced with your own identifying
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * information: Portions Copyright [yyyy] [name of copyright owner]
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs *
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * CDDL HEADER END
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs/*
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Use is subject to license terms.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#ifndef _HPI_MAC_H
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define _HPI_MAC_H
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#ifdef __cplusplus
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qsextern "C" {
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#endif
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#include <hpi.h>
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#include <hxge_vmac_hw.h>
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_status_t hpi_tx_vmac_reset(hpi_handle_t handle);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_status_t hpi_rx_vmac_reset(hpi_handle_t handle);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_status_t hpi_vmac_tx_config(hpi_handle_t handle, config_op_t op,
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t config, uint16_t max_frame_length);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_status_t hpi_vmac_rx_config(hpi_handle_t handle, config_op_t op,
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t config, uint16_t max_frame_length);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_status_t hpi_vmac_clear_rx_int_stat(hpi_handle_t handle);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_status_t hpi_vmac_clear_tx_int_stat(hpi_handle_t handle);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_status_t hpi_pfc_set_rx_int_stat_mask(hpi_handle_t handle,
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs boolean_t overflow_cnt, boolean_t frame_cnt);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qshpi_status_t hpi_pfc_set_tx_int_stat_mask(hpi_handle_t handle,
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs boolean_t overflow_cnt, boolean_t frame_cnt);
b83cd2c35abe58abb09c73f2ef35426f1384ad46Michael Speerhpi_status_t hpi_vmac_rx_set_framesize(hpi_handle_t handle,
b83cd2c35abe58abb09c73f2ef35426f1384ad46Michael Speer uint16_t max_frame_length);
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_TX_EN 0x00000001
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_TX_CRC_INSERT 0x00000002
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_TX_PAD 0x00000004
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_RX_EN 0x00000001
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_RX_CRC_CHECK_DISABLE 0x00000002
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_RX_STRIP_CRC 0x00000004
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_RX_PASS_FLOW_CTRL_FR 0x00000008
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_RX_PROMIXCUOUS_GROUP 0x00000010
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_RX_PROMISCUOUS_MODE 0x00000020
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define CFG_VMAC_RX_LOOP_BACK 0x00000040
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#ifdef __cplusplus
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs}
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#endif
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#endif /* _HPI_MAC_H */