1/*-
2 * Copyright (c) 2012-2015 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
--- 13 unchanged lines hidden (view full) ---
22 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
29 *
30 * $FreeBSD: head/sys/dev/sfxge/common/hunt_impl.h 292055 2015-12-10 07:42:56Z arybchik $
31 */
32
33#ifndef _SYS_HUNT_IMPL_H
34#define _SYS_HUNT_IMPL_H
35
36#include "efx.h"
37#include "efx_regs.h"
38#include "efx_regs_ef10.h"
--- 240 unchanged lines hidden (view full) ---
279 __in efx_nic_t *enp,
280 __in efx_mcdi_req_t *emrp);
281
282extern efx_rc_t
283hunt_mcdi_poll_reboot(
284 __in efx_nic_t *enp);
285
286extern __checkReturn efx_rc_t
287hunt_mcdi_feature_supported(
288 __in efx_nic_t *enp,
289 __in efx_mcdi_feature_id_t id,
290 __out boolean_t *supportedp);
291
292#endif /* EFSYS_OPT_MCDI */
293
294/* NVRAM */
295
296#if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD
297
298extern __checkReturn efx_rc_t
299hunt_nvram_buf_read_tlv(
--- 402 unchanged lines hidden (view full) ---
702#define ER_DZ_TX_PIOBUF_SIZE 2048
703#endif
704
705#define HUNT_PIOBUF_NBUFS (16)
706#define HUNT_PIOBUF_SIZE (ER_DZ_TX_PIOBUF_SIZE)
707
708#define HUNT_MIN_PIO_ALLOC_SIZE (HUNT_PIOBUF_SIZE / 32)
709
710#define HUNT_LEGACY_PF_PRIVILEGE_MASK \
711 (MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN | \
712 MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK | \
713 MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD | \
714 MC_CMD_PRIVILEGE_MASK_IN_GRP_PTP | \
715 MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE_FILTERS | \
716 MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING | \
717 MC_CMD_PRIVILEGE_MASK_IN_GRP_UNICAST | \
718 MC_CMD_PRIVILEGE_MASK_IN_GRP_MULTICAST | \
719 MC_CMD_PRIVILEGE_MASK_IN_GRP_BROADCAST | \
720 MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST | \
721 MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS)
722
723#define HUNT_LEGACY_VF_PRIVILEGE_MASK 0
724
725typedef uint32_t efx_piobuf_handle_t;
726
727#define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t) -1)
728
729extern __checkReturn efx_rc_t
730hunt_nic_pio_alloc(
731 __inout efx_nic_t *enp,
--- 311 unchanged lines hidden ---
2 * Copyright (c) 2012-2015 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
--- 13 unchanged lines hidden (view full) ---
22 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
29 *
30 * $FreeBSD: head/sys/dev/sfxge/common/hunt_impl.h 292055 2015-12-10 07:42:56Z arybchik $
31 */
32
33#ifndef _SYS_HUNT_IMPL_H
34#define _SYS_HUNT_IMPL_H
35
36#include "efx.h"
37#include "efx_regs.h"
38#include "efx_regs_ef10.h"
--- 240 unchanged lines hidden (view full) ---
279 __in efx_nic_t *enp,
280 __in efx_mcdi_req_t *emrp);
281
282extern efx_rc_t
283hunt_mcdi_poll_reboot(
284 __in efx_nic_t *enp);
285
286extern __checkReturn efx_rc_t
287hunt_mcdi_feature_supported(
288 __in efx_nic_t *enp,
289 __in efx_mcdi_feature_id_t id,
290 __out boolean_t *supportedp);
291
292#endif /* EFSYS_OPT_MCDI */
293
294/* NVRAM */
295
296#if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD
297
298extern __checkReturn efx_rc_t
299hunt_nvram_buf_read_tlv(
--- 402 unchanged lines hidden (view full) ---
702#define ER_DZ_TX_PIOBUF_SIZE 2048
703#endif
704
705#define HUNT_PIOBUF_NBUFS (16)
706#define HUNT_PIOBUF_SIZE (ER_DZ_TX_PIOBUF_SIZE)
707
708#define HUNT_MIN_PIO_ALLOC_SIZE (HUNT_PIOBUF_SIZE / 32)
709
710#define HUNT_LEGACY_PF_PRIVILEGE_MASK \
711 (MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN | \
712 MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK | \
713 MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD | \
714 MC_CMD_PRIVILEGE_MASK_IN_GRP_PTP | \
715 MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE_FILTERS | \
716 MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING | \
717 MC_CMD_PRIVILEGE_MASK_IN_GRP_UNICAST | \
718 MC_CMD_PRIVILEGE_MASK_IN_GRP_MULTICAST | \
719 MC_CMD_PRIVILEGE_MASK_IN_GRP_BROADCAST | \
720 MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST | \
721 MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS)
722
723#define HUNT_LEGACY_VF_PRIVILEGE_MASK 0
724
725typedef uint32_t efx_piobuf_handle_t;
726
727#define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t) -1)
728
729extern __checkReturn efx_rc_t
730hunt_nic_pio_alloc(
731 __inout efx_nic_t *enp,
--- 311 unchanged lines hidden ---