Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1654563 > unrolled thread
| Started by | thor.thayer@linux.intel.com |
|---|---|
| First post | 2017-05-31 21:30 +0200 |
| Last post | 2017-06-02 20:30 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization thor.thayer@linux.intel.com - 2017-05-31 21:30 +0200
Re: [PATCH] net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2017-06-01 08:10 +0200
Re: [PATCH] net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization David Miller <davem@davemloft.net> - 2017-06-02 20:30 +0200
| From | thor.thayer@linux.intel.com |
|---|---|
| Date | 2017-05-31 21:30 +0200 |
| Subject | [PATCH] net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization |
| Message-ID | <tNhtD-w5-3@gated-at.bofh.it> |
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>
---
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);
--
2.7.4
[toc] | [next] | [standalone]
| From | Giuseppe CAVALLARO <peppe.cavallaro@st.com> |
|---|---|
| Date | 2017-06-01 08:10 +0200 |
| Subject | Re: [PATCH] net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization |
| Message-ID | <tNrsZ-7fK-1@gated-at.bofh.it> |
| In reply to | #1654563 |
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);
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-06-02 20:30 +0200 |
| Subject | Re: [PATCH] net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization |
| Message-ID | <tNZuF-4Jd-17@gated-at.bofh.it> |
| In reply to | #1654563 |
From: thor.thayer@linux.intel.com Date: Wed, 31 May 2017 14:28:47 -0500 > 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> Applied, thank you.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web