* [PATCH] net: macb: undo operations in case of failure
@ 2020-06-17 13:23 Claudiu Beznea
2020-06-17 16:29 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Claudiu Beznea @ 2020-06-17 13:23 UTC (permalink / raw)
To: nicolas.ferre, davem, kuba, linux
Cc: antoine.tenart, netdev, linux-kernel, Claudiu Beznea
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: b2b041417299 ("net: macb: convert to phylink")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
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;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: macb: undo operations in case of failure
2020-06-17 13:23 [PATCH] net: macb: undo operations in case of failure Claudiu Beznea
@ 2020-06-17 16:29 ` Jakub Kicinski
2020-06-17 17:31 ` Nicolas Ferre
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2020-06-17 16:29 UTC (permalink / raw)
To: Claudiu Beznea
Cc: nicolas.ferre, davem, linux, antoine.tenart, netdev, linux-kernel
On Wed, 17 Jun 2020 16:23:55 +0300 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: b2b041417299 ("net: macb: convert to phylink")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Fixes tag: Fixes: b2b041417299 ("net: macb: convert to phylink")
Has these problem(s):
- Target SHA1 does not exist
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: macb: undo operations in case of failure
2020-06-17 16:29 ` Jakub Kicinski
@ 2020-06-17 17:31 ` Nicolas Ferre
0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2020-06-17 17:31 UTC (permalink / raw)
To: Jakub Kicinski, Claudiu Beznea
Cc: davem, linux, antoine.tenart, netdev, linux-kernel
On 17/06/2020 at 18:29, Jakub Kicinski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Wed, 17 Jun 2020 16:23:55 +0300 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: b2b041417299 ("net: macb: convert to phylink")
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>
> Fixes tag: Fixes: b2b041417299 ("net: macb: convert to phylink")
> Has these problem(s):
> - Target SHA1 does not exist
It must be:
Fixes: 7897b071ac3b ("net: macb: convert to phylink")
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-17 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 13:23 [PATCH] net: macb: undo operations in case of failure Claudiu Beznea
2020-06-17 16:29 ` Jakub Kicinski
2020-06-17 17:31 ` Nicolas Ferre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).