diff options
| author | Yuval Mintz <Yuval.Mintz@qlogic.com> | 2016-03-15 13:52:04 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-03-18 19:17:16 -0400 |
| commit | 1e6bb1a3540fec3ef112b9a89dda88e684c3ff59 (patch) | |
| tree | 9af4fcb2dcaf852adb567f0441e46f72e8ee5d6a | |
| parent | 38c848c73180fb1d142a39e664b6d9663751f6b2 (diff) | |
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: Andrew Patterson <andrew.patterson@hpe.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index b597c32275aa..d465bd721146 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
| @@ -14885,6 +14885,10 @@ static int bnx2x_get_fc_npiv(struct net_device *dev, | |||
| 14885 | } | 14885 | } |
| 14886 | 14886 | ||
| 14887 | offset = SHMEM2_RD(bp, fc_npiv_nvram_tbl_addr[BP_PORT(bp)]); | 14887 | offset = SHMEM2_RD(bp, fc_npiv_nvram_tbl_addr[BP_PORT(bp)]); |
| 14888 | if (!offset) { | ||
| 14889 | DP(BNX2X_MSG_MCP, "No FC-NPIV in NVRAM\n"); | ||
| 14890 | goto out; | ||
| 14891 | } | ||
| 14888 | DP(BNX2X_MSG_MCP, "Offset of FC-NPIV in NVRAM: %08x\n", offset); | 14892 | DP(BNX2X_MSG_MCP, "Offset of FC-NPIV in NVRAM: %08x\n", offset); |
| 14889 | 14893 | ||
| 14890 | /* Read the table contents from nvram */ | 14894 | /* Read the table contents from nvram */ |
