svn commit: r311488 - stable/11/sys/dev/sfxge/common
Andrew Rybchenko
arybchik at FreeBSD.org
Fri Jan 6 07:21:31 UTC 2017
Author: arybchik
Date: Fri Jan 6 07:21:30 2017
New Revision: 311488
URL: https://svnweb.freebsd.org/changeset/base/311488
Log:
MFC r310814
sfxge(4): make verified update result available from ef10_nvram_partn_unlock()
Manftest needs to know exactly what went wrong with the verified update
so that failing boards can be correctly diagnosed.
Submitted by: Tom Millington <tmillington at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Modified:
stable/11/sys/dev/sfxge/common/ef10_impl.h
stable/11/sys/dev/sfxge/common/ef10_nvram.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/sfxge/common/ef10_impl.h
==============================================================================
--- stable/11/sys/dev/sfxge/common/ef10_impl.h Fri Jan 6 07:20:20 2017 (r311487)
+++ stable/11/sys/dev/sfxge/common/ef10_impl.h Fri Jan 6 07:21:30 2017 (r311488)
@@ -393,7 +393,8 @@ ef10_nvram_partn_lock(
extern __checkReturn efx_rc_t
ef10_nvram_partn_unlock(
__in efx_nic_t *enp,
- __in uint32_t partn);
+ __in uint32_t partn,
+ __out_opt uint32_t *resultp);
#endif /* EFSYS_OPT_NVRAM || EFSYS_OPT_VPD */
Modified: stable/11/sys/dev/sfxge/common/ef10_nvram.c
==============================================================================
--- stable/11/sys/dev/sfxge/common/ef10_nvram.c Fri Jan 6 07:20:20 2017 (r311487)
+++ stable/11/sys/dev/sfxge/common/ef10_nvram.c Fri Jan 6 07:21:30 2017 (r311488)
@@ -1828,7 +1828,7 @@ ef10_nvram_partn_write_segment_tlv(
goto fail7;
/* Unlock the partition */
- ef10_nvram_partn_unlock(enp, partn);
+ ef10_nvram_partn_unlock(enp, partn, NULL);
EFSYS_KMEM_FREE(enp->en_esip, partn_size, partn_data);
@@ -1843,7 +1843,7 @@ fail5:
fail4:
EFSYS_PROBE(fail4);
- ef10_nvram_partn_unlock(enp, partn);
+ ef10_nvram_partn_unlock(enp, partn, NULL);
fail3:
EFSYS_PROBE(fail3);
@@ -2049,13 +2049,16 @@ fail1:
__checkReturn efx_rc_t
ef10_nvram_partn_unlock(
__in efx_nic_t *enp,
- __in uint32_t partn)
+ __in uint32_t partn,
+ __out_opt uint32_t *resultp)
{
boolean_t reboot = B_FALSE;
- uint32_t result = 0; /* FIXME: MC_CMD_NVRAM_VERIFY_RC_UNKNOWN */
efx_rc_t rc;
- rc = efx_mcdi_nvram_update_finish(enp, partn, reboot, &result);
+ if (resultp != NULL)
+ *resultp = MC_CMD_NVRAM_VERIFY_RC_UNKNOWN;
+
+ rc = efx_mcdi_nvram_update_finish(enp, partn, reboot, resultp);
if (rc != 0)
goto fail1;
@@ -2064,7 +2067,6 @@ ef10_nvram_partn_unlock(
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
- /* FIXME: log result if verified firmware update fails */
return (rc);
}
@@ -2370,7 +2372,7 @@ ef10_nvram_partn_rw_finish(
{
efx_rc_t rc;
- if ((rc = ef10_nvram_partn_unlock(enp, partn)) != 0)
+ if ((rc = ef10_nvram_partn_unlock(enp, partn, NULL)) != 0)
goto fail1;
return (0);
More information about the svn-src-stable
mailing list