Commit 2a838911 authored by Izabela Bakollari's avatar Izabela Bakollari Committed by David S. Miller

aquantia: Do not purge addresses when setting the number of rings

IPV6 addresses are purged when setting the number of rx/tx
rings using ethtool -G. The function aq_set_ringparam
calls dev_close, which removes the addresses. As a solution,
call an internal function (aq_ndev_close).

Fixes: c1af5427 ("net: aquantia: Ethtool based ring size configuration")
Signed-off-by: default avatarIzabela Bakollari <ibakolla@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 39701603
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "aq_ptp.h" #include "aq_ptp.h"
#include "aq_filters.h" #include "aq_filters.h"
#include "aq_macsec.h" #include "aq_macsec.h"
#include "aq_main.h"
#include <linux/ptp_clock_kernel.h> #include <linux/ptp_clock_kernel.h>
...@@ -858,7 +859,7 @@ static int aq_set_ringparam(struct net_device *ndev, ...@@ -858,7 +859,7 @@ static int aq_set_ringparam(struct net_device *ndev,
if (netif_running(ndev)) { if (netif_running(ndev)) {
ndev_running = true; ndev_running = true;
dev_close(ndev); aq_ndev_close(ndev);
} }
cfg->rxds = max(ring->rx_pending, hw_caps->rxds_min); cfg->rxds = max(ring->rx_pending, hw_caps->rxds_min);
...@@ -874,7 +875,7 @@ static int aq_set_ringparam(struct net_device *ndev, ...@@ -874,7 +875,7 @@ static int aq_set_ringparam(struct net_device *ndev,
goto err_exit; goto err_exit;
if (ndev_running) if (ndev_running)
err = dev_open(ndev, NULL); err = aq_ndev_open(ndev);
err_exit: err_exit:
return err; return err;
......
...@@ -58,7 +58,7 @@ struct net_device *aq_ndev_alloc(void) ...@@ -58,7 +58,7 @@ struct net_device *aq_ndev_alloc(void)
return ndev; return ndev;
} }
static int aq_ndev_open(struct net_device *ndev) int aq_ndev_open(struct net_device *ndev)
{ {
struct aq_nic_s *aq_nic = netdev_priv(ndev); struct aq_nic_s *aq_nic = netdev_priv(ndev);
int err = 0; int err = 0;
...@@ -88,7 +88,7 @@ static int aq_ndev_open(struct net_device *ndev) ...@@ -88,7 +88,7 @@ static int aq_ndev_open(struct net_device *ndev)
return err; return err;
} }
static int aq_ndev_close(struct net_device *ndev) int aq_ndev_close(struct net_device *ndev)
{ {
struct aq_nic_s *aq_nic = netdev_priv(ndev); struct aq_nic_s *aq_nic = netdev_priv(ndev);
int err = 0; int err = 0;
......
...@@ -16,5 +16,7 @@ DECLARE_STATIC_KEY_FALSE(aq_xdp_locking_key); ...@@ -16,5 +16,7 @@ DECLARE_STATIC_KEY_FALSE(aq_xdp_locking_key);
void aq_ndev_schedule_work(struct work_struct *work); void aq_ndev_schedule_work(struct work_struct *work);
struct net_device *aq_ndev_alloc(void); struct net_device *aq_ndev_alloc(void);
int aq_ndev_open(struct net_device *ndev);
int aq_ndev_close(struct net_device *ndev);
#endif /* AQ_MAIN_H */ #endif /* AQ_MAIN_H */
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