]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sfxge(4): precheck and verify flash writes
authorAndrew Rybchenko <arybchik@FreeBSD.org>
Fri, 23 Nov 2018 10:21:36 +0000 (10:21 +0000)
committerAndrew Rybchenko <arybchik@FreeBSD.org>
Fri, 23 Nov 2018 10:21:36 +0000 (10:21 +0000)
commitede1a3edaace0ead70ecfcddeeb54974f74d56de
treea3eb2129f52106ecb3bc84d33b3dcd7f0ab045d9
parent6a869fec96cc16cea76b2cd195ec95183f07c2e5
sfxge(4): precheck and verify flash writes

Read existing flash content before writing, so the flash write can be
avoided if the existing partition content matches the new image. This
avoids unnecessary write cycles for the flash device, and may also be
faster. If the flash does need to be updated, verify the content after
writing.

Note that reading the flash content after writing but before calling
efx_nvram-rw_finish() avoids firmware bug68170, which can lead to
signed image updates failing on Medford.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18093
sys/dev/sfxge/common/ef10_impl.h
sys/dev/sfxge/common/ef10_nvram.c
sys/dev/sfxge/common/efx.h
sys/dev/sfxge/common/efx_impl.h
sys/dev/sfxge/common/efx_nvram.c