* Re: [PATCH] net: ll_temac: stop phy when request_irq() failed in temac_open()
2022-11-21 1:06 [PATCH] net: ll_temac: stop phy when request_irq() failed in temac_open() Zhengchao Shao
@ 2022-11-21 1:05 ` shaozhengchao
0 siblings, 0 replies; 2+ messages in thread
From: shaozhengchao @ 2022-11-21 1:05 UTC (permalink / raw)
To: netdev, linux-arm-kernel, davem, edumazet, kuba, pabeni
Cc: michal.simek, harini.katakam, xuhaoyue1, huangjunxian6, wangqing,
chenhao288, yangyingliang, trix, afleming, grant.likely,
weiyongjun1, yuehaibing
Sorry to interrupt, please ignore this patch.
On 2022/11/21 9:06, Zhengchao Shao wrote:
> When request_irq() failed in temac_open(), phy is not stopped. Compiled
> test only.
>
> Fixes: 92744989533c ("net: add Xilinx ll_temac device driver")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> drivers/net/ethernet/xilinx/ll_temac_main.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
> index 1066420d6a83..2b61fa2c04a2 100644
> --- a/drivers/net/ethernet/xilinx/ll_temac_main.c
> +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
> @@ -1193,8 +1193,10 @@ static int temac_open(struct net_device *ndev)
> err_rx_irq:
> free_irq(lp->tx_irq, ndev);
> err_tx_irq:
> - if (phydev)
> + if (phydev) {
> + phy_stop(phydev);
> phy_disconnect(phydev);
> + }
> dev_err(lp->dev, "request_irq() failed\n");
> return rc;
> }
> @@ -1211,8 +1213,10 @@ static int temac_stop(struct net_device *ndev)
> free_irq(lp->tx_irq, ndev);
> free_irq(lp->rx_irq, ndev);
>
> - if (phydev)
> + if (phydev) {
> + phy_stop(phydev);
> phy_disconnect(phydev);
> + }
>
> temac_dma_bd_release(ndev);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] net: ll_temac: stop phy when request_irq() failed in temac_open()
@ 2022-11-21 1:06 Zhengchao Shao
2022-11-21 1:05 ` shaozhengchao
0 siblings, 1 reply; 2+ messages in thread
From: Zhengchao Shao @ 2022-11-21 1:06 UTC (permalink / raw)
To: netdev, linux-arm-kernel, davem, edumazet, kuba, pabeni
Cc: michal.simek, harini.katakam, xuhaoyue1, huangjunxian6, wangqing,
chenhao288, yangyingliang, trix, afleming, grant.likely,
weiyongjun1, yuehaibing, shaozhengchao
When request_irq() failed in temac_open(), phy is not stopped. Compiled
test only.
Fixes: 92744989533c ("net: add Xilinx ll_temac device driver")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
drivers/net/ethernet/xilinx/ll_temac_main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 1066420d6a83..2b61fa2c04a2 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -1193,8 +1193,10 @@ static int temac_open(struct net_device *ndev)
err_rx_irq:
free_irq(lp->tx_irq, ndev);
err_tx_irq:
- if (phydev)
+ if (phydev) {
+ phy_stop(phydev);
phy_disconnect(phydev);
+ }
dev_err(lp->dev, "request_irq() failed\n");
return rc;
}
@@ -1211,8 +1213,10 @@ static int temac_stop(struct net_device *ndev)
free_irq(lp->tx_irq, ndev);
free_irq(lp->rx_irq, ndev);
- if (phydev)
+ if (phydev) {
+ phy_stop(phydev);
phy_disconnect(phydev);
+ }
temac_dma_bd_release(ndev);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-21 1:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 1:06 [PATCH] net: ll_temac: stop phy when request_irq() failed in temac_open() Zhengchao Shao
2022-11-21 1:05 ` shaozhengchao
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).