diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-09-15 18:12:21 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-09-15 18:13:19 +0200 |
commit | 3561373114c8b3359114e2da27259317dc51145a (patch) | |
tree | 3885239a7987bc96fc9eb3684f77ff4d9e42eef7 /drivers/net/can/m_can | |
parent | net/mlx5: HWS, check the correct variable in hws_send_ring_alloc_sq() (diff) | |
parent | netfilter: nft_socket: Fix a NULL vs IS_ERR() bug in nft_socket_cgroup_subtre... (diff) | |
download | linux-3561373114c8b3359114e2da27259317dc51145a.tar.xz linux-3561373114c8b3359114e2da27259317dc51145a.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in late fixes to prepare for the 6.12 net-next PR.
No conflicts or adjacent changes.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/can/m_can')
-rw-r--r-- | drivers/net/can/m_can/m_can.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index a7b3bc439ae5..a978b960f1f1 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1764,11 +1764,7 @@ static int m_can_close(struct net_device *dev) netif_stop_queue(dev); - if (!cdev->is_peripheral) - napi_disable(&cdev->napi); - m_can_stop(dev); - m_can_clk_stop(cdev); free_irq(dev->irq, dev); m_can_clean(dev); @@ -1777,10 +1773,13 @@ static int m_can_close(struct net_device *dev) destroy_workqueue(cdev->tx_wq); cdev->tx_wq = NULL; can_rx_offload_disable(&cdev->offload); + } else { + napi_disable(&cdev->napi); } close_candev(dev); + m_can_clk_stop(cdev); phy_power_off(cdev->transceiver); return 0; @@ -2031,6 +2030,8 @@ static int m_can_open(struct net_device *dev) if (cdev->is_peripheral) can_rx_offload_enable(&cdev->offload); + else + napi_enable(&cdev->napi); /* register interrupt handler */ if (cdev->is_peripheral) { @@ -2064,9 +2065,6 @@ static int m_can_open(struct net_device *dev) if (err) goto exit_start_fail; - if (!cdev->is_peripheral) - napi_enable(&cdev->napi); - netif_start_queue(dev); return 0; @@ -2080,6 +2078,8 @@ exit_irq_fail: out_wq_fail: if (cdev->is_peripheral) can_rx_offload_disable(&cdev->offload); + else + napi_disable(&cdev->napi); close_candev(dev); exit_disable_clks: m_can_clk_stop(cdev); |