From: LABBE Corentin <clabbe@baylibre.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: davem@davemloft.net, nicolas.ferre@microchip.com,
kuba@kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: macb: Only disable NAPI on the actual error path
Date: Mon, 15 Jun 2020 16:51:15 +0200 [thread overview]
Message-ID: <20200615145115.GA23038@Red> (raw)
In-Reply-To: <20200615131854.12187-1-ckeepax@opensource.cirrus.com>
On Mon, Jun 15, 2020 at 02:18:54PM +0100, Charles Keepax wrote:
> 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>
> ---
> drivers/net/ethernet/cadence/macb_main.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 5b9d7c60eebc0..67933079aeea5 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -2565,15 +2565,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)
> --
> 2.11.0
>
Shame on me to not have see this.
With the fix it works.
Tested-by: Corentin Labbe <clabbe@baylibre.com>
Tested-on: qemu-xilinx-zynq-a9
next prev parent reply other threads:[~2020-06-15 14:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 13:18 [PATCH] net: macb: Only disable NAPI on the actual error path Charles Keepax
2020-06-15 14:51 ` LABBE Corentin [this message]
2020-06-15 20:11 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200615145115.GA23038@Red \
--to=clabbe@baylibre.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.