Deleted Added
full compact
ef10_mcdi.c (291585) ef10_mcdi.c (291588)
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>
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 291585 2015-12-01 15:26:46Z arybchik $");
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_mcdi.c 291588 2015-12-01 15:38:39Z arybchik $");
33
34#include "efsys.h"
35#include "efx.h"
36#include "efx_impl.h"
37
38
39#if EFSYS_OPT_HUNTINGTON
40

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

466 ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ==
467 MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ||
468 ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) ==
469 MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN);
470
471 return (0);
472}
473
33
34#include "efsys.h"
35#include "efx.h"
36#include "efx_impl.h"
37
38
39#if EFSYS_OPT_HUNTINGTON
40

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

466 ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ==
467 MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ||
468 ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) ==
469 MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN);
470
471 return (0);
472}
473
474 __checkReturn efx_rc_t
475hunt_mcdi_link_control_supported(
476 __in efx_nic_t *enp,
477 __out boolean_t *supportedp)
478{
479 efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
480 uint32_t privilege_mask = encp->enc_privilege_mask;
481
482 EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON);
483
484 /*
485 * Use privilege mask state at MCDI attach.
486 * Admin privilege used prior to introduction of
487 * specific flag.
488 */
489 *supportedp =
490 ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK) ==
491 MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK) ||
492 ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) ==
493 MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN);
494
495 return (0);
496}
497
474#endif /* EFSYS_OPT_MCDI */
475
476#endif /* EFSYS_OPT_HUNTINGTON */
498#endif /* EFSYS_OPT_MCDI */
499
500#endif /* EFSYS_OPT_HUNTINGTON */