Page MenuHomeFreeBSD

sfxge: fix common code VPD iterator and duplicate tag verificat
ClosedPublic

Authored by arybchik on Jan 13 2016, 7:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 5 2023, 1:30 AM
Unknown Object (File)
Sep 4 2023, 4:59 AM
Unknown Object (File)
Aug 28 2023, 10:30 PM
Unknown Object (File)
Jul 8 2023, 5:40 PM
Unknown Object (File)
Jun 18 2023, 12:57 PM
Unknown Object (File)
Jun 16 2023, 9:32 AM
Unknown Object (File)
Jun 3 2023, 5:25 PM
Unknown Object (File)
Jan 15 2023, 10:47 PM
Subscribers

Details

Summary

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).

Test Plan

Build tested. Driver loaded/unloaded.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

arybchik retitled this revision from to sfxge: fix common code VPD iterator and duplicate tag verificat.
arybchik updated this object.
arybchik edited the test plan for this revision. (Show Details)
arybchik added reviewers: gnn, philip, np, bz.
gnn edited edge metadata.
This revision is now accepted and ready to land.Jan 13 2016, 4:05 PM
This revision was automatically updated to reflect the committed changes.