Skip to content

Commit 2a83891

Browse files
Izabela Bakollaridavem330
authored andcommitted
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: c1af542 ("net: aquantia: Ethtool based ring size configuration") Signed-off-by: Izabela Bakollari <ibakolla@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3970160 commit 2a83891

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "aq_ptp.h"
1414
#include "aq_filters.h"
1515
#include "aq_macsec.h"
16+
#include "aq_main.h"
1617

1718
#include <linux/ptp_clock_kernel.h>
1819

@@ -858,7 +859,7 @@ static int aq_set_ringparam(struct net_device *ndev,
858859

859860
if (netif_running(ndev)) {
860861
ndev_running = true;
861-
dev_close(ndev);
862+
aq_ndev_close(ndev);
862863
}
863864

864865
cfg->rxds = max(ring->rx_pending, hw_caps->rxds_min);
@@ -874,7 +875,7 @@ static int aq_set_ringparam(struct net_device *ndev,
874875
goto err_exit;
875876

876877
if (ndev_running)
877-
err = dev_open(ndev, NULL);
878+
err = aq_ndev_open(ndev);
878879

879880
err_exit:
880881
return err;

drivers/net/ethernet/aquantia/atlantic/aq_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct net_device *aq_ndev_alloc(void)
5858
return ndev;
5959
}
6060

61-
static int aq_ndev_open(struct net_device *ndev)
61+
int aq_ndev_open(struct net_device *ndev)
6262
{
6363
struct aq_nic_s *aq_nic = netdev_priv(ndev);
6464
int err = 0;
@@ -88,7 +88,7 @@ static int aq_ndev_open(struct net_device *ndev)
8888
return err;
8989
}
9090

91-
static int aq_ndev_close(struct net_device *ndev)
91+
int aq_ndev_close(struct net_device *ndev)
9292
{
9393
struct aq_nic_s *aq_nic = netdev_priv(ndev);
9494
int err = 0;

drivers/net/ethernet/aquantia/atlantic/aq_main.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ DECLARE_STATIC_KEY_FALSE(aq_xdp_locking_key);
1616

1717
void aq_ndev_schedule_work(struct work_struct *work);
1818
struct net_device *aq_ndev_alloc(void);
19+
int aq_ndev_open(struct net_device *ndev);
20+
int aq_ndev_close(struct net_device *ndev);
1921

2022
#endif /* AQ_MAIN_H */

0 commit comments

Comments
 (0)