aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Vecera <[email protected]>2018-01-19 20:23:50 +0100
committerDavid S. Miller <[email protected]>2018-01-22 16:22:42 -0500
commit52acf06451930eb4cefabd5ecea56e2d46c32f76 (patch)
tree3b073389be09f602e6ca1dde8d86163898ead9f8
parentad23b750933ea7bf962678972a286c78a8fa36aa (diff)
be2net: restore properly promisc mode after queues reconfiguration
The commit 622190669403 ("be2net: Request RSS capability of Rx interface depending on number of Rx rings") modified be_update_queues() so the IFACE (HW representation of the netdevice) is destroyed and then re-created. This causes a regression because potential promiscuous mode is not restored properly during be_open() because the driver thinks that the HW has promiscuous mode already enabled. Note that Lancer is not affected by this bug because RX-filter flags are disabled during be_close() for this chipset. Cc: Sathya Perla <[email protected]> Cc: Ajit Khaparde <[email protected]> Cc: Sriharsha Basavapatna <[email protected]> Cc: Somnath Kotur <[email protected]> Fixes: 622190669403 ("be2net: Request RSS capability of Rx interface depending on number of Rx rings") Signed-off-by: Ivan Vecera <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index c6e859a27ee6..e180657a02ef 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4634,6 +4634,15 @@ int be_update_queues(struct be_adapter *adapter)
be_schedule_worker(adapter);
+ /*
+ * The IF was destroyed and re-created. We need to clear
+ * all promiscuous flags valid for the destroyed IF.
+ * Without this promisc mode is not restored during
+ * be_open() because the driver thinks that it is
+ * already enabled in HW.
+ */
+ adapter->if_flags &= ~BE_IF_FLAGS_ALL_PROMISCUOUS;
+
if (netif_running(netdev))
status = be_open(netdev);