path: root/sys/dev/sfxge/common/hunt_nvram.c
diff options
authorAndrew Rybchenko <arybchik@FreeBSD.org>2016-01-14 09:11:20 +0000
committerAndrew Rybchenko <arybchik@FreeBSD.org>2016-01-14 09:11:20 +0000
commit72cda83214f188a51643837d589ee8249329f586 (patch)
tree9b2187ce77d642f6b55b052a505c41872f1eb4f7 /sys/dev/sfxge/common/hunt_nvram.c
parentac23c34a9f2e82a2857dda1a61f646727d1c494d (diff)
sfxge: fix common code VPD iterator and duplicate tag verification
Fix efx_vpd_hunk_next() which has -- since its inception -- failed to correctly iterate over the tags and keywords contained in the VPD data. Only the first tag or keyword would be returned and the next call with *contp == 1 would walk to the end of the data and finish. This was spotted when fixing up errors spotted by Prefast code analysis (which neglected to set all of the out parameters in all successful cases) Also fix efx_vpd_verify() on Siena and EF10 which (as a side effect of correctly iterating over all the tags and keywords) was failing as it detected that both the static VPD and dynamic VPD storage contained an RV keyword in the VPD-R tag. This is intentional as the static VPD and dynamic VPD are stored separately (firmware merges their contents and computes a new RV keyword checksum for the data readable from the VPD capability in PCIe configuration space). Submitted by: Andrew Lee <alee at solarflare.com> Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4915
Notes: svn path=/head/; revision=293895
Diffstat (limited to 'sys/dev/sfxge/common/hunt_nvram.c')
0 files changed, 0 insertions, 0 deletions