Skip to content

Commit 8a62061

Browse files
committed
Merge branch 'at91-5.4-trunk/net' into linux-5.4-at91
2 parents bbb533a + 9d51299 commit 8a62061

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,19 +2506,25 @@ static int macb_open(struct net_device *dev)
25062506

25072507
err = macb_phylink_connect(bp);
25082508
if (err)
2509-
goto pm_exit;
2509+
goto reset_hw;
25102510

25112511
netif_tx_start_all_queues(dev);
25122512

25132513
if (bp->ptp_info)
25142514
bp->ptp_info->ptp_init(dev);
25152515

2516-
pm_exit:
2517-
if (err) {
2518-
pm_runtime_put_sync(&bp->pdev->dev);
2519-
return err;
2520-
}
25212516
return 0;
2517+
2518+
reset_hw:
2519+
macb_reset_hw(bp);
2520+
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
2521+
napi_disable(&queue->napi);
2522+
macb_free_consistent(bp);
2523+
2524+
pm_exit:
2525+
pm_runtime_put_sync(&bp->pdev->dev);
2526+
2527+
return err;
25222528
}
25232529

25242530
static int macb_close(struct net_device *dev)

0 commit comments

Comments
 (0)