Netdev List
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Claudiu Beznea <claudiu.beznea@microchip.com>,
	<davem@davemloft.net>, <kuba@kernel.org>, <linux@armlinux.org.uk>
Cc: <antoine.tenart@bootlin.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] net: macb: undo operations in case of failure
Date: Thu, 18 Jun 2020 17:53:01 +0200	[thread overview]
Message-ID: <e1f5e65a-c670-f178-dcda-a630db424215@microchip.com> (raw)
In-Reply-To: <1592469460-17825-1-git-send-email-claudiu.beznea@microchip.com>

On 18/06/2020 at 10:37, Claudiu Beznea wrote:
> Undo previously done operation in case macb_phylink_connect()
> fails. Since macb_reset_hw() is the 1st undo operation the
> napi_exit label was renamed to reset_hw.
> 
> Fixes: 7897b071ac3b ("net: macb: convert to phylink")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks Claudiu.

Regards,
   Nicolas

> ---
> 
> Changes in v2:
> - corrected fixes SHA1
> 
>   drivers/net/ethernet/cadence/macb_main.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 67933079aeea..257c4920cb88 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -2558,7 +2558,7 @@ static int macb_open(struct net_device *dev)
>   
>   	err = macb_phylink_connect(bp);
>   	if (err)
> -		goto napi_exit;
> +		goto reset_hw;
>   
>   	netif_tx_start_all_queues(dev);
>   
> @@ -2567,9 +2567,11 @@ static int macb_open(struct net_device *dev)
>   
>   	return 0;
>   
> -napi_exit:
> +reset_hw:
> +	macb_reset_hw(bp);
>   	for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
>   		napi_disable(&queue->napi);
> +	macb_free_consistent(bp);
>   pm_exit:
>   	pm_runtime_put_sync(&bp->pdev->dev);
>   	return err;
> 


-- 
Nicolas Ferre

  reply	other threads:[~2020-06-18 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18  8:37 [PATCH v2] net: macb: undo operations in case of failure Claudiu Beznea
2020-06-18 15:53 ` Nicolas Ferre [this message]
2020-06-20  2:59 ` 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=e1f5e65a-c670-f178-dcda-a630db424215@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox