Skip to content

Commit e9e2a90

Browse files
Somnath Koturdavem330
authored andcommitted
be2net: Warn users of possible broken functionality on BE2 cards with very old FW versions with latest driver
On very old FW versions < 4.0, the mailbox command to set interrupts on the card succeeds even though it is not supported and should have failed, leading to a scenario where interrupts do not work. Hence warn users to upgrade to a suitable FW version to avoid seeing broken functionality. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d49c83d commit e9e2a90

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

drivers/net/ethernet/emulex/benet/be.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,15 @@ static inline int qnq_async_evt_rcvd(struct be_adapter *adapter)
696696
return adapter->flags & BE_FLAGS_QNQ_ASYNC_EVT_RCVD;
697697
}
698698

699+
static inline int fw_major_num(const char *fw_ver)
700+
{
701+
int fw_major = 0;
702+
703+
sscanf(fw_ver, "%d.", &fw_major);
704+
705+
return fw_major;
706+
}
707+
699708
extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
700709
u16 num_popped);
701710
extern void be_link_status_update(struct be_adapter *adapter, u8 link_status);

drivers/net/ethernet/emulex/benet/be_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3247,6 +3247,12 @@ static int be_setup(struct be_adapter *adapter)
32473247

32483248
be_cmd_get_fw_ver(adapter, adapter->fw_ver, adapter->fw_on_flash);
32493249

3250+
if (BE2_chip(adapter) && fw_major_num(adapter->fw_ver) < 4) {
3251+
dev_err(dev, "Firmware on card is old(%s), IRQs may not work.",
3252+
adapter->fw_ver);
3253+
dev_err(dev, "Please upgrade firmware to version >= 4.0\n");
3254+
}
3255+
32503256
if (adapter->vlans_added)
32513257
be_vid_config(adapter);
32523258

0 commit comments

Comments
 (0)