aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/base/siena_nvram.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/base/siena_nvram.c')
-rw-r--r--drivers/net/sfc/base/siena_nvram.c43
1 files changed, 11 insertions, 32 deletions
diff --git a/drivers/net/sfc/base/siena_nvram.c b/drivers/net/sfc/base/siena_nvram.c
index af4cf172..e72bba0b 100644
--- a/drivers/net/sfc/base/siena_nvram.c
+++ b/drivers/net/sfc/base/siena_nvram.c
@@ -1,31 +1,7 @@
-/*
- * Copyright (c) 2009-2016 Solarflare Communications Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
+/* SPDX-License-Identifier: BSD-3-Clause
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are
- * those of the authors and should not be interpreted as representing official
- * policies, either expressed or implied, of the FreeBSD Project.
+ * Copyright (c) 2009-2018 Solarflare Communications Inc.
+ * All rights reserved.
*/
#include "efx.h"
@@ -170,7 +146,8 @@ fail1:
__checkReturn efx_rc_t
siena_nvram_partn_unlock(
__in efx_nic_t *enp,
- __in uint32_t partn)
+ __in uint32_t partn,
+ __out_opt uint32_t *verify_resultp)
{
boolean_t reboot;
efx_rc_t rc;
@@ -183,7 +160,7 @@ siena_nvram_partn_unlock(
partn == MC_CMD_NVRAM_TYPE_PHY_PORT1 ||
partn == MC_CMD_NVRAM_TYPE_DISABLED_CALLISTO);
- rc = efx_mcdi_nvram_update_finish(enp, partn, reboot, NULL);
+ rc = efx_mcdi_nvram_update_finish(enp, partn, reboot, verify_resultp);
if (rc != 0)
goto fail1;
@@ -239,6 +216,7 @@ siena_nvram_type_to_partn(
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
unsigned int i;
+ EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
EFSYS_ASSERT(partnp != NULL);
@@ -587,11 +565,12 @@ fail1:
__checkReturn efx_rc_t
siena_nvram_partn_rw_finish(
__in efx_nic_t *enp,
- __in uint32_t partn)
+ __in uint32_t partn,
+ __out_opt uint32_t *verify_resultp)
{
efx_rc_t rc;
- if ((rc = siena_nvram_partn_unlock(enp, partn)) != 0)
+ if ((rc = siena_nvram_partn_unlock(enp, partn, verify_resultp)) != 0)
goto fail1;
return (0);
@@ -705,7 +684,7 @@ siena_nvram_partn_set_version(
EFSYS_KMEM_FREE(enp->en_esip, length, dcfg);
- siena_nvram_partn_unlock(enp, dcfg_partn);
+ siena_nvram_partn_unlock(enp, dcfg_partn, NULL);
return (0);