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

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

76 */
77
78
79 __checkReturn efx_rc_t
80ef10_mcdi_init(
81 __in efx_nic_t *enp,
82 __in const efx_mcdi_transport_t *emtp)
83{
33
34#include "efsys.h"
35#include "efx.h"
36#include "efx_impl.h"
37
38
39#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
40

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

76 */
77
78
79 __checkReturn efx_rc_t
80ef10_mcdi_init(
81 __in efx_nic_t *enp,
82 __in const efx_mcdi_transport_t *emtp)
83{
84 efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
84 efsys_mem_t *esmp = emtp->emt_dma_mem;
85 efx_dword_t dword;
86 efx_rc_t rc;
87
88 EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
89 enp->en_family == EFX_FAMILY_MEDFORD);
90 EFSYS_ASSERT(enp->en_features & EFX_FEATURE_MCDI_DMA);
91
85 efsys_mem_t *esmp = emtp->emt_dma_mem;
86 efx_dword_t dword;
87 efx_rc_t rc;
88
89 EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
90 enp->en_family == EFX_FAMILY_MEDFORD);
91 EFSYS_ASSERT(enp->en_features & EFX_FEATURE_MCDI_DMA);
92
93 /*
94 * All EF10 firmware supports MCDIv2 and MCDIv1.
95 * Medford BootROM supports MCDIv2 and MCDIv1.
96 * Huntington BootROM supports MCDIv1 only.
97 */
98 emip->emi_max_version = 2;
99
92 /* A host DMA buffer is required for EF10 MCDI */
93 if (esmp == NULL) {
94 rc = EINVAL;
95 goto fail1;
96 }
97
98 /*
99 * Ensure that the MC doorbell is in a known state before issuing MCDI

--- 324 unchanged lines hidden ---
100 /* A host DMA buffer is required for EF10 MCDI */
101 if (esmp == NULL) {
102 rc = EINVAL;
103 goto fail1;
104 }
105
106 /*
107 * Ensure that the MC doorbell is in a known state before issuing MCDI

--- 324 unchanged lines hidden ---