From: shaozhengchao <shaozhengchao@huawei.com>
To: <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>
Cc: <michal.simek@xilinx.com>, <harini.katakam@amd.com>,
<xuhaoyue1@hisilicon.com>, <huangjunxian6@hisilicon.com>,
<wangqing@vivo.com>, <chenhao288@hisilicon.com>,
<yangyingliang@huawei.com>, <trix@redhat.com>,
<afleming@freescale.com>, <grant.likely@secretlab.ca>,
<weiyongjun1@huawei.com>, <yuehaibing@huawei.com>
Subject: Re: [PATCH] net: ll_temac: stop phy when request_irq() failed in temac_open()
Date: Mon, 21 Nov 2022 09:05:39 +0800 [thread overview]
Message-ID: <081368e4-2608-1023-0e30-3ce9c59e1b1e@huawei.com> (raw)
In-Reply-To: <20221121010658.106749-1-shaozhengchao@huawei.com>
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);
>
prev parent reply other threads:[~2022-11-21 1:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=081368e4-2608-1023-0e30-3ce9c59e1b1e@huawei.com \
--to=shaozhengchao@huawei.com \
--cc=afleming@freescale.com \
--cc=chenhao288@hisilicon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=grant.likely@secretlab.ca \
--cc=harini.katakam@amd.com \
--cc=huangjunxian6@hisilicon.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=trix@redhat.com \
--cc=wangqing@vivo.com \
--cc=weiyongjun1@huawei.com \
--cc=xuhaoyue1@hisilicon.com \
--cc=yangyingliang@huawei.com \
--cc=yuehaibing@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).