Skip to content

Commit

Permalink
fpgareg: Make walk DFL also print registers for the last feature with…
Browse files Browse the repository at this point in the history
… eol set (#2844)

fpgareg pf0_registers() stopped when reading a DFH with eol without printing the registers.

Signed-off-by: Roger Christensen <rc@silicom.dk>
Co-authored-by: Ananda Ravuri <33236856+anandaravuri@users.noreply.github.com>
  • Loading branch information
rchriste1 and anandaravuri committed Feb 14, 2023
1 parent c9d5824 commit f08c4b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/opae.admin/opae/admin/tools/fpgareg.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,16 @@ def pf0_registers(self):
print("\ndfh:{} :{}".format(hex(dfh_offset),
hex(fpga_dfh.value)))

if fpga_dfh.bits.eol or not fpga_dfh.bits.next_header_offset:
self.mm.close()
return True

for x in range(PCIE_DFH_CSR_LEN):
offset = 0x8 * x
reg = int(self.reg64(offset), 16)
print("{} :{}".format(hex(dfh_offset + offset),
hex(reg)))

if fpga_dfh.bits.eol or not fpga_dfh.bits.next_header_offset:
self.mm.close()
return True

dfh_offset += fpga_dfh.next_header_offset
self.mm.close()
return True
Expand Down

0 comments on commit f08c4b0

Please sign in to comment.