Skip to content

Commit

Permalink
print firmware revision maj and min
Browse files Browse the repository at this point in the history
  • Loading branch information
capr committed Mar 31, 2016
1 parent dfbd705 commit 34929f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/apps/mellanox/connectx4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local macaddress = require("lib.macaddress")
local mib = require("lib.ipc.shmem.mib")
local timer = require("core.timer")
local bits, bitset = lib.bits, lib.bitset
local band, bor, lshift = bit.band, bit.bor, bit.lshift
local band, bor, shl, shr = bit.band, bit.bor, bit.lshift, bit.rshift

ConnectX4 = {}
ConnectX4.__index = ConnectX4
Expand All @@ -34,7 +34,8 @@ function ConnectX4:new(arg)

register.define(init_segment_desc, r, base)

print(r.fw_rev())
local rev = r.fw_rev()
print(band(rev, 0xffff), shr(rev, 16))

function self:stop()
if not base then return end
Expand Down

0 comments on commit 34929f1

Please sign in to comment.