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