diff options
| author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2020-06-15 14:18:54 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-17 16:42:02 +0200 |
| commit | 13f6e6b4de818242f974e51126720250df51a85b (patch) | |
| tree | 75f71d567c59c742a011ff08f8125d90e5533705 | |
| parent | 76fa3dea81366c5ebdc3cbf5e27c560b1aee21bc (diff) | |
| download | linux-stable-13f6e6b4de818242f974e51126720250df51a85b.tar.gz linux-stable-13f6e6b4de818242f974e51126720250df51a85b.zip | |
net: macb: Only disable NAPI on the actual error path
[ Upstream commit 939a5bf7c9b7a1ad9c5d3481c93766a522773531 ]
A recent change added a disable to NAPI into macb_open, this was
intended to only happen on the error path but accidentally applies
to all paths. This causes NAPI to be disabled on the success path, which
leads to the network to no longer functioning.
Fixes: 014406babc1f ("net: cadence: macb: disable NAPI on error")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 9b91a7b8a362..9067b413d6b7 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -2552,15 +2552,14 @@ static int macb_open(struct net_device *dev) if (bp->ptp_info) bp->ptp_info->ptp_init(dev); + return 0; + napi_exit: for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) napi_disable(&queue->napi); pm_exit: - if (err) { - pm_runtime_put_sync(&bp->pdev->dev); - return err; - } - return 0; + pm_runtime_put_sync(&bp->pdev->dev); + return err; } static int macb_close(struct net_device *dev) |
