Geetha sowjanya 69f0aeb13b octeontx2-pf: Fix interface down flag on error
In the existing code while changing the number of TX/RX
queues using ethtool the PF/VF interface resources are
freed and reallocated (otx2_stop and otx2_open is called)
if the device is in running state. If any resource allocation
fails in otx2_open, driver free already allocated resources
and return. But again, when the number of queues changes
as the device state still running oxt2_stop is called.
In which we try to free already freed resources leading
to driver crash.
This patch fixes the issue by setting the INTF_DOWN flag on
error and free the resources in otx2_stop only if the flag is
not set.

Fixes: 50fe6c02e5ad ("octeontx2-pf: Register and handle link notifications")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-25 09:25:03 +01:00
..
2021-07-16 17:22:35 -07:00
2021-07-13 09:43:50 -07:00
2021-07-03 11:13:22 -07:00
2021-06-30 15:51:09 -07:00
2021-07-05 14:08:24 -07:00
2021-07-05 14:08:24 -07:00
2021-07-23 10:34:31 +02:00
2021-06-28 12:44:17 -07:00
2021-06-14 13:17:10 -07:00