Deleted Added
full compact
siena_mcdi.c (293814) siena_mcdi.c (293817)
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/siena_mcdi.c 293814 2016-01-13 07:25:51Z arybchik $");
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/siena_mcdi.c 293817 2016-01-13 07:46:21Z arybchik $");
33
34#include "efx.h"
35#include "efx_impl.h"
36
37#if EFSYS_OPT_SIENA && EFSYS_OPT_MCDI
38
39#define SIENA_MCDI_PDU(_emip) \
40 (((emip)->emi_port == 1) \

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

211 pdur = SIENA_MCDI_PDU(emip);
212
213 EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, pdur, &hdr, B_FALSE);
214 return (EFX_DWORD_FIELD(hdr, MCDI_HEADER_RESPONSE) ? B_TRUE : B_FALSE);
215}
216
217 void
218siena_mcdi_read_response(
33
34#include "efx.h"
35#include "efx_impl.h"
36
37#if EFSYS_OPT_SIENA && EFSYS_OPT_MCDI
38
39#define SIENA_MCDI_PDU(_emip) \
40 (((emip)->emi_port == 1) \

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

211 pdur = SIENA_MCDI_PDU(emip);
212
213 EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, pdur, &hdr, B_FALSE);
214 return (EFX_DWORD_FIELD(hdr, MCDI_HEADER_RESPONSE) ? B_TRUE : B_FALSE);
215}
216
217 void
218siena_mcdi_read_response(
219 __in efx_nic_t *enp,
220 __out void *bufferp,
221 __in size_t offset,
222 __in size_t length)
219 __in efx_nic_t *enp,
220 __out_bcount(length) void *bufferp,
221 __in size_t offset,
222 __in size_t length)
223{
224 efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
225 unsigned int pdur;
226 unsigned int pos;
227 efx_dword_t data;
228
229 EFSYS_ASSERT(emip->emi_port == 1 || emip->emi_port == 2);
230 pdur = SIENA_MCDI_PDU(emip);

--- 91 unchanged lines hidden ---
223{
224 efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
225 unsigned int pdur;
226 unsigned int pos;
227 efx_dword_t data;
228
229 EFSYS_ASSERT(emip->emi_port == 1 || emip->emi_port == 2);
230 pdur = SIENA_MCDI_PDU(emip);

--- 91 unchanged lines hidden ---