Deleted Added
sdiff udiff text old ( 292007 ) new ( 292008 )
full compact
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,

--- 15 unchanged lines hidden (view full) ---

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
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_mcdi.c 292007 2015-12-09 06:14:47Z arybchik $");
33
34#include "efsys.h"
35#include "efx.h"
36#include "efx_impl.h"
37
38
39#if EFSYS_OPT_HUNTINGTON
40

--- 389 unchanged lines hidden (view full) ---

430 efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
431 uint32_t privilege_mask = encp->enc_privilege_mask;
432
433 EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON);
434
435 /*
436 * Use privilege mask state at MCDI attach.
437 * Admin privilege must be used prior to introduction of
438 * specific flag (at v4.6).
439 */
440 *supportedp =
441 ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ==
442 MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ||
443 ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) ==
444 MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN);
445
446 return (0);
447}
448
449 __checkReturn efx_rc_t
450hunt_mcdi_link_control_supported(
451 __in efx_nic_t *enp,
452 __out boolean_t *supportedp)
453{
454 efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
455 uint32_t privilege_mask = encp->enc_privilege_mask;
456
457 EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON);

--- 18 unchanged lines hidden ---