Skip to content

Commit 3da988c

Browse files
Sarveshwar Bandidavem330
authored andcommitted
be2net: Clear any capability flags that driver is not interested in.
It is possible for some versions of firmware to advertise capabilities that driver is not ready to handle. This may lead to controller stall. Since the driver is interested only in subset of flags, clearing the rest. Signed-off-by: Sarveshwar Bandi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d9bf5f1 commit 3da988c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3048,6 +3048,9 @@ int be_cmd_get_func_config(struct be_adapter *adapter)
30483048

30493049
adapter->max_event_queues = le16_to_cpu(desc->eq_count);
30503050
adapter->if_cap_flags = le32_to_cpu(desc->cap_flags);
3051+
3052+
/* Clear flags that driver is not interested in */
3053+
adapter->if_cap_flags &= BE_IF_CAP_FLAGS_WANT;
30513054
}
30523055
err:
30533056
mutex_unlock(&adapter->mbox_lock);

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,12 @@ enum be_if_flags {
563563
BE_IF_FLAGS_MULTICAST = 0x1000
564564
};
565565

566+
#define BE_IF_CAP_FLAGS_WANT (BE_IF_FLAGS_RSS | BE_IF_FLAGS_PROMISCUOUS |\
567+
BE_IF_FLAGS_BROADCAST | BE_IF_FLAGS_VLAN_PROMISCUOUS |\
568+
BE_IF_FLAGS_VLAN | BE_IF_FLAGS_MCAST_PROMISCUOUS |\
569+
BE_IF_FLAGS_PASS_L3L4_ERRORS | BE_IF_FLAGS_MULTICAST |\
570+
BE_IF_FLAGS_UNTAGGED)
571+
566572
/* An RX interface is an object with one or more MAC addresses and
567573
* filtering capabilities. */
568574
struct be_cmd_req_if_create {

0 commit comments

Comments
 (0)