49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Copyright (c) 2015 Solarflare Communications Inc.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * All rights reserved.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Redistribution and use in source and binary forms, with or without
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * modification, are permitted provided that the following conditions are met:
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * 1. Redistributions of source code must retain the above copyright notice,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * this list of conditions and the following disclaimer.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * 2. Redistributions in binary form must reproduce the above copyright notice,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * this list of conditions and the following disclaimer in the documentation
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * and/or other materials provided with the distribution.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * The views and conclusions contained in the software and documentation are
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * those of the authors and should not be interpreted as representing official
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * policies, either expressed or implied, of the FreeBSD Project.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#if (EFSYS_OPT_HUNTINGTON && EFSYS_OPT_MEDFORD)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#define EF10_MAX_PIOBUF_NBUFS MAX(HUNT_PIOBUF_NBUFS, MEDFORD_PIOBUF_NBUFS)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#define EF10_MAX_PIOBUF_NBUFS HUNT_PIOBUF_NBUFS
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#define EF10_MAX_PIOBUF_NBUFS MEDFORD_PIOBUF_NBUFS
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * FIXME: This is just a power of 2 which fits in an MCDI v1 message, and could
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * possibly be increased, or the write size reported by newer firmware used
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* Alignment requirement for value written to RX WPTR:
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * the WPTR must be aligned to an 8 descriptor boundary
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Max byte offset into the packet the TCP header must start for the hardware
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * to be able to parse the packet correctly.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* Invalid RSS context handle */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#define EF10_RSS_CONTEXT_INVALID (0xffffffff)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __inout_ecount(EV_NQSTATS) efsys_stat_t *stat);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_QSTATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_DIAG */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_LOOPBACK */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_MAC_STATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_MCDI */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __deref_out_bcount_opt(*sizep) caddr_t *datap,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __inout_bcount(partn_size) caddr_t partn_data,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __deref_out_bcount_opt(*sizep) caddr_t *datap,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_NVRAM || EFSYS_OPT_VPD */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_DIAG */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amoreextern __checkReturn __success(return != B_FALSE) boolean_t
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_NVRAM */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_PHY_STATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __in unsigned int n,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __in unsigned int n,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __inout_ecount(TX_NQSTATS) efsys_stat_t *stat);
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_QSTATS */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t) -1)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_VPD */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_RX_SCATTER */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_RX_SCALE */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore __in unsigned int n,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore uintptr_t efe_spec; /* pointer to filter spec plus busy bit */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * BUSY flag indicates that an update is in progress.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * AUTO_OLD flag is used to mark and sweep MAC packet filters.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * Size of the hash table used by the driver. Doesn't need to be the
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore * same size as the hardware's table.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* Only need to allow for one directed and one unknown unicast filter */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#define EFX_EF10_FILTER_UNICAST_FILTERS_MAX 2
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore/* Allow for the broadcast address to be added to the multicast list */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#define EFX_EF10_FILTER_MULTICAST_FILTERS_MAX (EFX_MAC_MULTICAST_LIST_MAX + 1)
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore ef10_filter_entry_t eft_entry[EFX_EF10_FILTER_TBL_ROWS];
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* EFSYS_OPT_FILTER */
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore#endif /* _SYS_EF10_IMPL_H */