public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
To: Daniel Mack <zonque@gmail•com>, netdev@vger•kernel.org
Cc: davem@davemloft•net, marek.belisko@gmail•com, ujhelyi.m@gmail•com
Subject: Re: [PATCH 2/2] net: phy: at803x: soft-reset PHY when link goes down
Date: Fri, 15 Nov 2013 03:03:36 +0300	[thread overview]
Message-ID: <528564D8.9050504@cogentembedded.com> (raw)
In-Reply-To: <1384376870-7810-2-git-send-email-zonque@gmail.com>

Hello.

On 11/14/2013 12:07 AM, Daniel Mack wrote:

> When the link goes down and up again quickly and multiple times in a
> row, the AT803x PHY gets stuck and won't recover unless it is soft-reset
> via the BMCR register.

> Unfortunately, there is no way to detect this state, as all registers
> contain perfectly sane values in such cases. Hence, the only option is
> to always soft-reset the PHY when the link goes down.

> Reset logic is based on a patch from Marek Belisko.

> Signed-off-by: Daniel Mack <zonque@gmail•com>
> Reported-and-tested-by: Marek Belisko <marek.belisko@gmail•com>
> ---
>   drivers/net/phy/at803x.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 52 insertions(+)

> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
> index bc71947..303c5ae 100644
> --- a/drivers/net/phy/at803x.c
> +++ b/drivers/net/phy/at803x.c
> @@ -32,10 +32,56 @@
>   #define AT803X_DEBUG_SYSTEM_MODE_CTRL		0x05
>   #define AT803X_DEBUG_RGMII_TX_CLK_DLY		BIT(8)
>
> +#define AT803X_BMCR_SOFTRESET			BIT(15)
> +

    This is the standard bit (BMCR_RESET) #define'd in the same file as MII_BMCR.

WBR, Sergei

  reply	other threads:[~2013-11-14 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 21:07 [PATCH 1/2] net: phylib: add adjust_state callback to phy device Daniel Mack
2013-11-13 21:07 ` [PATCH 2/2] net: phy: at803x: soft-reset PHY when link goes down Daniel Mack
2013-11-15  0:03   ` Sergei Shtylyov [this message]
2013-11-14 21:32 ` [PATCH 1/2] net: phylib: add adjust_state callback to phy device David Miller
2013-11-15  7:35   ` Daniel Mack

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=528564D8.9050504@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=marek.belisko@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=ujhelyi.m@gmail$(echo .)com \
    --cc=zonque@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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