15f5c71ccSAndrew Rybchenko /*- 2*929c7febSAndrew Rybchenko * Copyright (c) 2015-2016 Solarflare Communications Inc. 35f5c71ccSAndrew Rybchenko * All rights reserved. 45f5c71ccSAndrew Rybchenko * 55f5c71ccSAndrew Rybchenko * Redistribution and use in source and binary forms, with or without 65f5c71ccSAndrew Rybchenko * modification, are permitted provided that the following conditions are met: 75f5c71ccSAndrew Rybchenko * 85f5c71ccSAndrew Rybchenko * 1. Redistributions of source code must retain the above copyright notice, 95f5c71ccSAndrew Rybchenko * this list of conditions and the following disclaimer. 105f5c71ccSAndrew Rybchenko * 2. Redistributions in binary form must reproduce the above copyright notice, 115f5c71ccSAndrew Rybchenko * this list of conditions and the following disclaimer in the documentation 125f5c71ccSAndrew Rybchenko * and/or other materials provided with the distribution. 135f5c71ccSAndrew Rybchenko * 145f5c71ccSAndrew Rybchenko * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 155f5c71ccSAndrew Rybchenko * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 165f5c71ccSAndrew Rybchenko * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 175f5c71ccSAndrew Rybchenko * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 185f5c71ccSAndrew Rybchenko * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 195f5c71ccSAndrew Rybchenko * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 205f5c71ccSAndrew Rybchenko * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 215f5c71ccSAndrew Rybchenko * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 225f5c71ccSAndrew Rybchenko * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 235f5c71ccSAndrew Rybchenko * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 245f5c71ccSAndrew Rybchenko * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 255f5c71ccSAndrew Rybchenko * 265f5c71ccSAndrew Rybchenko * The views and conclusions contained in the software and documentation are 275f5c71ccSAndrew Rybchenko * those of the authors and should not be interpreted as representing official 285f5c71ccSAndrew Rybchenko * policies, either expressed or implied, of the FreeBSD Project. 295f5c71ccSAndrew Rybchenko * 305f5c71ccSAndrew Rybchenko * $FreeBSD$ 315f5c71ccSAndrew Rybchenko */ 325f5c71ccSAndrew Rybchenko 335f5c71ccSAndrew Rybchenko #ifndef _SYS_MEDFORD_IMPL_H 345f5c71ccSAndrew Rybchenko #define _SYS_MEDFORD_IMPL_H 355f5c71ccSAndrew Rybchenko 365f5c71ccSAndrew Rybchenko #ifdef __cplusplus 375f5c71ccSAndrew Rybchenko extern "C" { 385f5c71ccSAndrew Rybchenko #endif 395f5c71ccSAndrew Rybchenko 40cfa023ebSAndrew Rybchenko /* Alignment requirement for value written to RX WPTR: 41cfa023ebSAndrew Rybchenko * the WPTR must be aligned to an 8 descriptor boundary 42cfa023ebSAndrew Rybchenko * 43cfa023ebSAndrew Rybchenko * FIXME: Is this the same on Medford as Huntington? 44cfa023ebSAndrew Rybchenko */ 45cfa023ebSAndrew Rybchenko #define MEDFORD_RX_WPTR_ALIGN 8 46cfa023ebSAndrew Rybchenko 47cfa023ebSAndrew Rybchenko 48cfa023ebSAndrew Rybchenko 49cfa023ebSAndrew Rybchenko #ifndef ER_EZ_TX_PIOBUF_SIZE 50cfa023ebSAndrew Rybchenko #define ER_EZ_TX_PIOBUF_SIZE 4096 51cfa023ebSAndrew Rybchenko #endif 52cfa023ebSAndrew Rybchenko 53cfa023ebSAndrew Rybchenko 54e7119ad9SAndrew Rybchenko #define MEDFORD_PIOBUF_NBUFS (16) 55cfa023ebSAndrew Rybchenko #define MEDFORD_PIOBUF_SIZE (ER_EZ_TX_PIOBUF_SIZE) 56cfa023ebSAndrew Rybchenko 57cfa023ebSAndrew Rybchenko #define MEDFORD_MIN_PIO_ALLOC_SIZE (MEDFORD_PIOBUF_SIZE / 32) 58cfa023ebSAndrew Rybchenko 59cfa023ebSAndrew Rybchenko 60cfa023ebSAndrew Rybchenko extern __checkReturn efx_rc_t 61cfa023ebSAndrew Rybchenko medford_board_cfg( 62cfa023ebSAndrew Rybchenko __in efx_nic_t *enp); 635f5c71ccSAndrew Rybchenko 645f5c71ccSAndrew Rybchenko 655f5c71ccSAndrew Rybchenko #ifdef __cplusplus 665f5c71ccSAndrew Rybchenko } 675f5c71ccSAndrew Rybchenko #endif 685f5c71ccSAndrew Rybchenko 695f5c71ccSAndrew Rybchenko #endif /* _SYS_MEDFORD_IMPL_H */ 70