Skip to content

Commit

Permalink
bnx2x: Prevent false warning for lack of FC NPIV
Browse files Browse the repository at this point in the history
Not all adapters have FC-NPIV configured. If bnx2fc is used with such an
adapter, driver would read irrelevant data from the the nvram and log
"FC-NPIV table with bad length..." In system logs.

Simply accept that reading '0' as the feature offset in nvram indicates
the feature isn't there and return.

Reported-by: Andrew Patterson <[email protected]>
Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Yuval Mintz authored and davem330 committed Mar 18, 2016
1 parent 38c848c commit 1e6bb1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14885,6 +14885,10 @@ static int bnx2x_get_fc_npiv(struct net_device *dev,
}

offset = SHMEM2_RD(bp, fc_npiv_nvram_tbl_addr[BP_PORT(bp)]);
if (!offset) {
DP(BNX2X_MSG_MCP, "No FC-NPIV in NVRAM\n");
goto out;
}
DP(BNX2X_MSG_MCP, "Offset of FC-NPIV in NVRAM: %08x\n", offset);

/* Read the table contents from nvram */
Expand Down

0 comments on commit 1e6bb1a

Please sign in to comment.