16349Sqs148142 /* 26349Sqs148142 * CDDL HEADER START 36349Sqs148142 * 46349Sqs148142 * The contents of this file are subject to the terms of the 56349Sqs148142 * Common Development and Distribution License (the "License"). 66349Sqs148142 * You may not use this file except in compliance with the License. 76349Sqs148142 * 86349Sqs148142 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 96349Sqs148142 * or http://www.opensolaris.org/os/licensing. 106349Sqs148142 * See the License for the specific language governing permissions 116349Sqs148142 * and limitations under the License. 126349Sqs148142 * 136349Sqs148142 * When distributing Covered Code, include this CDDL HEADER in each 146349Sqs148142 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 156349Sqs148142 * If applicable, add the following below this CDDL HEADER, with the 166349Sqs148142 * fields enclosed by brackets "[]" replaced with your own identifying 176349Sqs148142 * information: Portions Copyright [yyyy] [name of copyright owner] 186349Sqs148142 * 196349Sqs148142 * CDDL HEADER END 206349Sqs148142 */ 216349Sqs148142 /* 226349Sqs148142 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 236349Sqs148142 * Use is subject to license terms. 246349Sqs148142 */ 256349Sqs148142 266349Sqs148142 #ifndef _HPI_MAC_H 276349Sqs148142 #define _HPI_MAC_H 286349Sqs148142 296349Sqs148142 #ifdef __cplusplus 306349Sqs148142 extern "C" { 316349Sqs148142 #endif 326349Sqs148142 336349Sqs148142 #include <hpi.h> 346349Sqs148142 #include <hxge_vmac_hw.h> 356349Sqs148142 366349Sqs148142 hpi_status_t hpi_tx_vmac_reset(hpi_handle_t handle); 376349Sqs148142 hpi_status_t hpi_rx_vmac_reset(hpi_handle_t handle); 386349Sqs148142 hpi_status_t hpi_vmac_tx_config(hpi_handle_t handle, config_op_t op, 396349Sqs148142 uint64_t config, uint16_t max_frame_length); 406349Sqs148142 hpi_status_t hpi_vmac_rx_config(hpi_handle_t handle, config_op_t op, 416349Sqs148142 uint64_t config, uint16_t max_frame_length); 426349Sqs148142 hpi_status_t hpi_vmac_clear_rx_int_stat(hpi_handle_t handle); 436349Sqs148142 hpi_status_t hpi_vmac_clear_tx_int_stat(hpi_handle_t handle); 446349Sqs148142 hpi_status_t hpi_pfc_set_rx_int_stat_mask(hpi_handle_t handle, 456349Sqs148142 boolean_t overflow_cnt, boolean_t frame_cnt); 466349Sqs148142 hpi_status_t hpi_pfc_set_tx_int_stat_mask(hpi_handle_t handle, 476349Sqs148142 boolean_t overflow_cnt, boolean_t frame_cnt); 48*8141SMichael.Speer@Sun.COM hpi_status_t hpi_vmac_rx_set_framesize(hpi_handle_t handle, 49*8141SMichael.Speer@Sun.COM uint16_t max_frame_length); 506349Sqs148142 516349Sqs148142 #define CFG_VMAC_TX_EN 0x00000001 526349Sqs148142 #define CFG_VMAC_TX_CRC_INSERT 0x00000002 536349Sqs148142 #define CFG_VMAC_TX_PAD 0x00000004 546349Sqs148142 556349Sqs148142 #define CFG_VMAC_RX_EN 0x00000001 566349Sqs148142 #define CFG_VMAC_RX_CRC_CHECK_DISABLE 0x00000002 576349Sqs148142 #define CFG_VMAC_RX_STRIP_CRC 0x00000004 586349Sqs148142 #define CFG_VMAC_RX_PASS_FLOW_CTRL_FR 0x00000008 596349Sqs148142 #define CFG_VMAC_RX_PROMIXCUOUS_GROUP 0x00000010 606349Sqs148142 #define CFG_VMAC_RX_PROMISCUOUS_MODE 0x00000020 616349Sqs148142 #define CFG_VMAC_RX_LOOP_BACK 0x00000040 626349Sqs148142 636349Sqs148142 #ifdef __cplusplus 646349Sqs148142 } 656349Sqs148142 #endif 666349Sqs148142 676349Sqs148142 #endif /* _HPI_MAC_H */ 68