From 0578335a719a3108b4430421ebe0ddc22399cbff Mon Sep 17 00:00:00 2001 From: Andrew Boyer Date: Wed, 16 Dec 2020 13:12:52 -0800 Subject: [PATCH] net/ionic: preserve Rx mode across LIF stop/start Otherwise, non-default settings (like PROMISC) get reset. This will become important when link toggling is tied to LIF stop/start. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_lif.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 646c921b2f..875c7e5855 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -1573,7 +1573,7 @@ ionic_lif_configure(struct ionic_lif *lif) int ionic_lif_start(struct ionic_lif *lif) { - uint32_t rx_mode = 0; + uint32_t rx_mode; uint32_t i; int err; @@ -1581,16 +1581,16 @@ ionic_lif_start(struct ionic_lif *lif) if (err) return err; - IONIC_PRINT(DEBUG, "Setting RX mode on port %u", - lif->port_id); - - rx_mode |= IONIC_RX_MODE_F_UNICAST; - rx_mode |= IONIC_RX_MODE_F_MULTICAST; - rx_mode |= IONIC_RX_MODE_F_BROADCAST; + if (!lif->rx_mode) { + IONIC_PRINT(DEBUG, "Setting RX mode on %s", + lif->name); - lif->rx_mode = 0; /* set by ionic_set_rx_mode */ + rx_mode = IONIC_RX_MODE_F_UNICAST; + rx_mode |= IONIC_RX_MODE_F_MULTICAST; + rx_mode |= IONIC_RX_MODE_F_BROADCAST; - ionic_set_rx_mode(lif, rx_mode); + ionic_set_rx_mode(lif, rx_mode); + } IONIC_PRINT(DEBUG, "Starting %u RX queues and %u TX queues " "on port %u", -- 2.20.1