mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: <thor.thayer@linux.intel.com>, <alexandre.torgue@st.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization
Date: Thu, 1 Jun 2017 08:08:57 +0200	[thread overview]
Message-ID: <7413abda-760e-9a8f-e9ef-efab006c66a8@st.com> (raw)
In-Reply-To: <1496258927-5493-1-git-send-email-thor.thayer@linux.intel.com>

On 5/31/2017 9:28 PM, thor.thayer@linux.intel.com wrote:
> From: Thor Thayer <thor.thayer@linux.intel.com>
>
> Fix NETDEV WATCHDOG timeout on startup by adding missing register
> writes that properly setup SGMII.
>
> Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
Thanks a lot for this fix.

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>   drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c b/drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c
> index 489ef14..6a9c954 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c
> @@ -37,6 +37,7 @@
>   #define TSE_PCS_CONTROL_AN_EN_MASK			BIT(12)
>   #define TSE_PCS_CONTROL_REG				0x00
>   #define TSE_PCS_CONTROL_RESTART_AN_MASK			BIT(9)
> +#define TSE_PCS_CTRL_AUTONEG_SGMII			0x1140
>   #define TSE_PCS_IF_MODE_REG				0x28
>   #define TSE_PCS_LINK_TIMER_0_REG			0x24
>   #define TSE_PCS_LINK_TIMER_1_REG			0x26
> @@ -65,6 +66,7 @@
>   #define TSE_PCS_SW_RESET_TIMEOUT			100
>   #define TSE_PCS_USE_SGMII_AN_MASK			BIT(1)
>   #define TSE_PCS_USE_SGMII_ENA				BIT(0)
> +#define TSE_PCS_IF_USE_SGMII				0x03
>   
>   #define SGMII_ADAPTER_CTRL_REG				0x00
>   #define SGMII_ADAPTER_DISABLE				0x0001
> @@ -101,7 +103,9 @@ int tse_pcs_init(void __iomem *base, struct tse_pcs *pcs)
>   {
>   	int ret = 0;
>   
> -	writew(TSE_PCS_USE_SGMII_ENA, base + TSE_PCS_IF_MODE_REG);
> +	writew(TSE_PCS_IF_USE_SGMII, base + TSE_PCS_IF_MODE_REG);
> +
> +	writew(TSE_PCS_CTRL_AUTONEG_SGMII, base + TSE_PCS_CONTROL_REG);
>   
>   	writew(TSE_PCS_SGMII_LINK_TIMER_0, base + TSE_PCS_LINK_TIMER_0_REG);
>   	writew(TSE_PCS_SGMII_LINK_TIMER_1, base + TSE_PCS_LINK_TIMER_1_REG);

  reply	other threads:[~2017-06-01  6:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 19:28 thor.thayer
2017-06-01  6:08 ` Giuseppe CAVALLARO [this message]
2017-06-02 18:20 ` David Miller

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=7413abda-760e-9a8f-e9ef-efab006c66a8@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=thor.thayer@linux.intel.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

Powered by JetHome