13dec9fcdSqs /* 23dec9fcdSqs * CDDL HEADER START 33dec9fcdSqs * 43dec9fcdSqs * The contents of this file are subject to the terms of the 53dec9fcdSqs * Common Development and Distribution License (the "License"). 63dec9fcdSqs * You may not use this file except in compliance with the License. 73dec9fcdSqs * 83dec9fcdSqs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93dec9fcdSqs * or http://www.opensolaris.org/os/licensing. 103dec9fcdSqs * See the License for the specific language governing permissions 113dec9fcdSqs * and limitations under the License. 123dec9fcdSqs * 133dec9fcdSqs * When distributing Covered Code, include this CDDL HEADER in each 143dec9fcdSqs * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153dec9fcdSqs * If applicable, add the following below this CDDL HEADER, with the 163dec9fcdSqs * fields enclosed by brackets "[]" replaced with your own identifying 173dec9fcdSqs * information: Portions Copyright [yyyy] [name of copyright owner] 183dec9fcdSqs * 193dec9fcdSqs * CDDL HEADER END 203dec9fcdSqs */ 213dec9fcdSqs /* 223dec9fcdSqs * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 233dec9fcdSqs * Use is subject to license terms. 243dec9fcdSqs */ 253dec9fcdSqs 263dec9fcdSqs #ifndef _HPI_MAC_H 273dec9fcdSqs #define _HPI_MAC_H 283dec9fcdSqs 293dec9fcdSqs #ifdef __cplusplus 303dec9fcdSqs extern "C" { 313dec9fcdSqs #endif 323dec9fcdSqs 333dec9fcdSqs #include <hpi.h> 343dec9fcdSqs #include <hxge_vmac_hw.h> 353dec9fcdSqs 363dec9fcdSqs hpi_status_t hpi_tx_vmac_reset(hpi_handle_t handle); 373dec9fcdSqs hpi_status_t hpi_rx_vmac_reset(hpi_handle_t handle); 383dec9fcdSqs hpi_status_t hpi_vmac_tx_config(hpi_handle_t handle, config_op_t op, 393dec9fcdSqs uint64_t config, uint16_t max_frame_length); 403dec9fcdSqs hpi_status_t hpi_vmac_rx_config(hpi_handle_t handle, config_op_t op, 413dec9fcdSqs uint64_t config, uint16_t max_frame_length); 423dec9fcdSqs hpi_status_t hpi_vmac_clear_rx_int_stat(hpi_handle_t handle); 433dec9fcdSqs hpi_status_t hpi_vmac_clear_tx_int_stat(hpi_handle_t handle); 443dec9fcdSqs hpi_status_t hpi_pfc_set_rx_int_stat_mask(hpi_handle_t handle, 453dec9fcdSqs boolean_t overflow_cnt, boolean_t frame_cnt); 463dec9fcdSqs hpi_status_t hpi_pfc_set_tx_int_stat_mask(hpi_handle_t handle, 473dec9fcdSqs boolean_t overflow_cnt, boolean_t frame_cnt); 48*b83cd2c3SMichael Speer hpi_status_t hpi_vmac_rx_set_framesize(hpi_handle_t handle, 49*b83cd2c3SMichael Speer uint16_t max_frame_length); 503dec9fcdSqs 513dec9fcdSqs #define CFG_VMAC_TX_EN 0x00000001 523dec9fcdSqs #define CFG_VMAC_TX_CRC_INSERT 0x00000002 533dec9fcdSqs #define CFG_VMAC_TX_PAD 0x00000004 543dec9fcdSqs 553dec9fcdSqs #define CFG_VMAC_RX_EN 0x00000001 563dec9fcdSqs #define CFG_VMAC_RX_CRC_CHECK_DISABLE 0x00000002 573dec9fcdSqs #define CFG_VMAC_RX_STRIP_CRC 0x00000004 583dec9fcdSqs #define CFG_VMAC_RX_PASS_FLOW_CTRL_FR 0x00000008 593dec9fcdSqs #define CFG_VMAC_RX_PROMIXCUOUS_GROUP 0x00000010 603dec9fcdSqs #define CFG_VMAC_RX_PROMISCUOUS_MODE 0x00000020 613dec9fcdSqs #define CFG_VMAC_RX_LOOP_BACK 0x00000040 623dec9fcdSqs 633dec9fcdSqs #ifdef __cplusplus 643dec9fcdSqs } 653dec9fcdSqs #endif 663dec9fcdSqs 673dec9fcdSqs #endif /* _HPI_MAC_H */ 68