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 292008 2015-12-09 06:24:22Z 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_fw_update_supported(
288 __in efx_nic_t *enp,
289 __out boolean_t *supportedp);
290
291extern __checkReturn efx_rc_t
292hunt_mcdi_macaddr_change_supported(
293 __in efx_nic_t *enp,
294 __out boolean_t *supportedp);
295
296extern __checkReturn efx_rc_t
297hunt_mcdi_link_control_supported(
298 __in efx_nic_t *enp,
299 __out boolean_t *supportedp);
300
301extern __checkReturn efx_rc_t
302hunt_mcdi_mac_spoofing_supported(
303 __in efx_nic_t *enp,
304 __out boolean_t *supportedp);
305
306
307#endif /* EFSYS_OPT_MCDI */
308
309/* NVRAM */
310
311#if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD
312
313extern __checkReturn efx_rc_t
314hunt_nvram_buf_read_tlv(
--- 402 unchanged lines hidden (view full) ---
717#define ER_DZ_TX_PIOBUF_SIZE 2048
718#endif
719
720#define HUNT_PIOBUF_NBUFS (16)
721#define HUNT_PIOBUF_SIZE (ER_DZ_TX_PIOBUF_SIZE)
722
723#define HUNT_MIN_PIO_ALLOC_SIZE (HUNT_PIOBUF_SIZE / 32)
724
725#define HUNT_LEGACY_PF_PRIVILEGE_MASK \
726 (MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN | \
727 MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK | \
728 MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD | \
729 MC_CMD_PRIVILEGE_MASK_IN_GRP_PTP | \
730 MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE_FILTERS | \
731 MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING | \
732 MC_CMD_PRIVILEGE_MASK_IN_GRP_UNICAST | \
733 MC_CMD_PRIVILEGE_MASK_IN_GRP_MULTICAST | \
734 MC_CMD_PRIVILEGE_MASK_IN_GRP_BROADCAST | \
735 MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST | \
736 MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS)
737
738#define HUNT_LEGACY_VF_PRIVILEGE_MASK 0
739
740typedef uint32_t efx_piobuf_handle_t;
741
742#define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t) -1)
743
744extern __checkReturn efx_rc_t
745hunt_nic_pio_alloc(
746 __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 292008 2015-12-09 06:24:22Z 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_fw_update_supported(
288 __in efx_nic_t *enp,
289 __out boolean_t *supportedp);
290
291extern __checkReturn efx_rc_t
292hunt_mcdi_macaddr_change_supported(
293 __in efx_nic_t *enp,
294 __out boolean_t *supportedp);
295
296extern __checkReturn efx_rc_t
297hunt_mcdi_link_control_supported(
298 __in efx_nic_t *enp,
299 __out boolean_t *supportedp);
300
301extern __checkReturn efx_rc_t
302hunt_mcdi_mac_spoofing_supported(
303 __in efx_nic_t *enp,
304 __out boolean_t *supportedp);
305
306
307#endif /* EFSYS_OPT_MCDI */
308
309/* NVRAM */
310
311#if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD
312
313extern __checkReturn efx_rc_t
314hunt_nvram_buf_read_tlv(
--- 402 unchanged lines hidden (view full) ---
717#define ER_DZ_TX_PIOBUF_SIZE 2048
718#endif
719
720#define HUNT_PIOBUF_NBUFS (16)
721#define HUNT_PIOBUF_SIZE (ER_DZ_TX_PIOBUF_SIZE)
722
723#define HUNT_MIN_PIO_ALLOC_SIZE (HUNT_PIOBUF_SIZE / 32)
724
725#define HUNT_LEGACY_PF_PRIVILEGE_MASK \
726 (MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN | \
727 MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK | \
728 MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD | \
729 MC_CMD_PRIVILEGE_MASK_IN_GRP_PTP | \
730 MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE_FILTERS | \
731 MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING | \
732 MC_CMD_PRIVILEGE_MASK_IN_GRP_UNICAST | \
733 MC_CMD_PRIVILEGE_MASK_IN_GRP_MULTICAST | \
734 MC_CMD_PRIVILEGE_MASK_IN_GRP_BROADCAST | \
735 MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST | \
736 MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS)
737
738#define HUNT_LEGACY_VF_PRIVILEGE_MASK 0
739
740typedef uint32_t efx_piobuf_handle_t;
741
742#define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t) -1)
743
744extern __checkReturn efx_rc_t
745hunt_nic_pio_alloc(
746 __inout efx_nic_t *enp,
--- 311 unchanged lines hidden ---