Commit 1e6bb1a3 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

bnx2x: Prevent false warning for lack of FC NPIV

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: default avatarAndrew Patterson <andrew.patterson@hpe.com>
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 38c848c7
...@@ -14885,6 +14885,10 @@ static int bnx2x_get_fc_npiv(struct net_device *dev, ...@@ -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)]); 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); DP(BNX2X_MSG_MCP, "Offset of FC-NPIV in NVRAM: %08x\n", offset);
/* Read the table contents from nvram */ /* Read the table contents from nvram */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment