Deleted Added
full compact
ef10_mcdi.c (293814) ef10_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/hunt_mcdi.c 293814 2016-01-13 07:25:51Z arybchik $");
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_mcdi.c 293817 2016-01-13 07:46:21Z arybchik $");
33
34#include "efx.h"
35#include "efx_impl.h"
36
37
38#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
39
40#if EFSYS_OPT_MCDI

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

302 efx_dword_t hdr;
303
304 EFSYS_MEM_READD(esmp, 0, &hdr);
305 return (EFX_DWORD_FIELD(hdr, MCDI_HEADER_RESPONSE) ? B_TRUE : B_FALSE);
306}
307
308 void
309ef10_mcdi_read_response(
33
34#include "efx.h"
35#include "efx_impl.h"
36
37
38#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
39
40#if EFSYS_OPT_MCDI

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

302 efx_dword_t hdr;
303
304 EFSYS_MEM_READD(esmp, 0, &hdr);
305 return (EFX_DWORD_FIELD(hdr, MCDI_HEADER_RESPONSE) ? B_TRUE : B_FALSE);
306}
307
308 void
309ef10_mcdi_read_response(
310 __in efx_nic_t *enp,
311 __out void *bufferp,
312 __in size_t offset,
313 __in size_t length)
310 __in efx_nic_t *enp,
311 __out_bcount(length) void *bufferp,
312 __in size_t offset,
313 __in size_t length)
314{
315 const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
316 efsys_mem_t *esmp = emtp->emt_dma_mem;
317 unsigned int pos;
318 efx_dword_t data;
319
320 for (pos = 0; pos < length; pos += sizeof (efx_dword_t)) {
321 EFSYS_MEM_READD(esmp, offset + pos, &data);

--- 125 unchanged lines hidden ---
314{
315 const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
316 efsys_mem_t *esmp = emtp->emt_dma_mem;
317 unsigned int pos;
318 efx_dword_t data;
319
320 for (pos = 0; pos < length; pos += sizeof (efx_dword_t)) {
321 EFSYS_MEM_READD(esmp, offset + pos, &data);

--- 125 unchanged lines hidden ---