From: Tobias Klauser <tklauser@distanz.ch>
To: Kostya Belezko <bkostya@hotmail.com>
Cc: Nios2-dev <nios2-dev@lists.rocketboards.org>,
Vince Bridgers <vbridgers2013@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [Nios2-dev] [PATCH] Altera TSE: Add missing phydev
Date: Thu, 25 Dec 2014 13:52:39 +0100 [thread overview]
Message-ID: <20141225125239.GP16916@distanz.ch> (raw)
In-Reply-To: <BLU436-SMTP58313D55680097A2C4AAA0B6560@phx.gbl>
On 2014-12-22 at 23:37:19 +0100, Kostya Belezko <bkostya@hotmail.com> wrote:
> Altera network device doesn't come up after
>
> ifconfig eth0 down
> ifconfig eth0 up
>
> The reason behind is clearing priv->phydev during tse_shutdown().
> The phydev is not restored back at tse_open().
>
> Signed-off-by: Kostya Belezko <bkostya@hotmail.com>
Please Cc: netdev@vger.kernel.org for network driver patches.
> ---
> drivers/net/ethernet/altera/altera_tse_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
> index 4efc435..361bf35 100644
> --- a/drivers/net/ethernet/altera/altera_tse_main.c
> +++ b/drivers/net/ethernet/altera/altera_tse_main.c
> @@ -1150,6 +1150,9 @@ static int tse_open(struct net_device *dev)
>
> spin_unlock_irqrestore(&priv->rxdma_irq_lock, flags);
>
> + if (!priv->phydev)
> + init_phy(dev);
That way the PHY will be initialized twice on first start.
IMO the proper solution would be to disconnect and NULL the phydev in
altera_tse_remove, not in tse_shutdown. There, only phy_stop should be
called.
next parent reply other threads:[~2014-12-25 12:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BLU436-SMTP58313D55680097A2C4AAA0B6560@phx.gbl>
2014-12-25 12:52 ` Tobias Klauser [this message]
2014-12-25 14:55 ` [Nios2-dev] [PATCH] Altera TSE: Add missing phydev Tobias Klauser
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=20141225125239.GP16916@distanz.ch \
--to=tklauser@distanz.ch \
--cc=bkostya@hotmail.com \
--cc=netdev@vger.kernel.org \
--cc=nios2-dev@lists.rocketboards.org \
--cc=vbridgers2013@gmail.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).