Deleted Added
full compact
siena_nvram.c (278941) siena_nvram.c (279141)
1/*-
2 * Copyright 2009 Solarflare Communications Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright 2009 Solarflare Communications Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/siena_nvram.c 278941 2015-02-18 06:23:16Z arybchik $");
27__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/siena_nvram.c 279141 2015-02-22 07:08:57Z arybchik $");
28
29#include "efsys.h"
30#include "efx.h"
31#include "efx_types.h"
32#include "efx_regs.h"
33#include "efx_impl.h"
34
35#if EFSYS_OPT_SIENA

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

607
608 if (req.emr_out_length_used < MC_CMD_GET_BOARD_CFG_OUT_LENMIN) {
609 rc = EMSGSIZE;
610 goto fail2;
611 }
612
613 if (req.emr_out_length_used <
614 MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST +
28
29#include "efsys.h"
30#include "efx.h"
31#include "efx_types.h"
32#include "efx_regs.h"
33#include "efx_impl.h"
34
35#if EFSYS_OPT_SIENA

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

607
608 if (req.emr_out_length_used < MC_CMD_GET_BOARD_CFG_OUT_LENMIN) {
609 rc = EMSGSIZE;
610 goto fail2;
611 }
612
613 if (req.emr_out_length_used <
614 MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST +
615 (partn + 1) * sizeof(efx_word_t)) {
615 (partn + 1) * sizeof (efx_word_t)) {
616 rc = ENOENT;
617 goto fail3;
618 }
619
620 fw_list = MCDI_OUT2(req, efx_word_t,
621 GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST);
622 *subtypep = EFX_WORD_FIELD(fw_list[partn], EFX_WORD_0);
623

--- 374 unchanged lines hidden ---
616 rc = ENOENT;
617 goto fail3;
618 }
619
620 fw_list = MCDI_OUT2(req, efx_word_t,
621 GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST);
622 *subtypep = EFX_WORD_FIELD(fw_list[partn], EFX_WORD_0);
623

--- 374 unchanged lines hidden ---