Commit 321b1b2d authored by Vasundhara Volam's avatar Vasundhara Volam Committed by Kelsey Skunberg

bnxt_en: reinitialize IRQs when MTU is modified

BugLink: https://bugs.launchpad.net/bugs/1868629

[ Upstream commit a9b952d2 ]

MTU changes may affect the number of IRQs so we must call
bnxt_close_nic()/bnxt_open_nic() with the irq_re_init parameter
set to true.  The reason is that a larger MTU may require
aggregation rings not needed with smaller MTU.  We may not be
able to allocate the required number of aggregation rings and
so we reduce the number of channels which will change the number
of IRQs.  Without this patch, it may crash eventually in
pci_disable_msix() when the IRQs are not properly unwound.

Fixes: c0c050c5 ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 68280c51
...@@ -5310,13 +5310,13 @@ static int bnxt_change_mtu(struct net_device *dev, int new_mtu) ...@@ -5310,13 +5310,13 @@ static int bnxt_change_mtu(struct net_device *dev, int new_mtu)
return -EINVAL; return -EINVAL;
if (netif_running(dev)) if (netif_running(dev))
bnxt_close_nic(bp, false, false); bnxt_close_nic(bp, true, false);
dev->mtu = new_mtu; dev->mtu = new_mtu;
bnxt_set_ring_params(bp); bnxt_set_ring_params(bp);
if (netif_running(dev)) if (netif_running(dev))
return bnxt_open_nic(bp, false, false); return bnxt_open_nic(bp, true, false);
return 0; return 0;
} }
......
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