Commit 841f60fc authored by Somnath Kotur's avatar Somnath Kotur Committed by David S. Miller

be2net: clear vlan-promisc setting before programming the vlan list

The Lancer FW has a bug due to which in some cases vlan-promisc setting
is cleared eventhough the vlan-list programming did not succeed (via
VLAN_CONFIG) cmd. The driver has no way of knowing if the vlan-promisc
mode was cleared or not when this cmd fails. To work around this issue,
this patch first explicitly clears the vlan-promisc mode via RX_FILTER
cmd and then tries to program the vlan list.
Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: default avatarSathya Perla <sathya.perla@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e7bbcc1
...@@ -1427,6 +1427,11 @@ static int be_vid_config(struct be_adapter *adapter) ...@@ -1427,6 +1427,11 @@ static int be_vid_config(struct be_adapter *adapter)
if (adapter->vlans_added > be_max_vlans(adapter)) if (adapter->vlans_added > be_max_vlans(adapter))
return be_set_vlan_promisc(adapter); return be_set_vlan_promisc(adapter);
if (adapter->if_flags & BE_IF_FLAGS_VLAN_PROMISCUOUS) {
status = be_clear_vlan_promisc(adapter);
if (status)
return status;
}
/* Construct VLAN Table to give to HW */ /* Construct VLAN Table to give to HW */
for_each_set_bit(i, adapter->vids, VLAN_N_VID) for_each_set_bit(i, adapter->vids, VLAN_N_VID)
vids[num++] = cpu_to_le16(i); vids[num++] = cpu_to_le16(i);
...@@ -1439,8 +1444,6 @@ static int be_vid_config(struct be_adapter *adapter) ...@@ -1439,8 +1444,6 @@ static int be_vid_config(struct be_adapter *adapter)
addl_status(status) == addl_status(status) ==
MCC_ADDL_STATUS_INSUFFICIENT_RESOURCES) MCC_ADDL_STATUS_INSUFFICIENT_RESOURCES)
return be_set_vlan_promisc(adapter); return be_set_vlan_promisc(adapter);
} else if (adapter->if_flags & BE_IF_FLAGS_VLAN_PROMISCUOUS) {
status = be_clear_vlan_promisc(adapter);
} }
return status; return status;
} }
......
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