All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] igb: Explicitly select page 0 at initialization
@ 2016-11-24 10:32 ` Matwey V. Kornilov
  0 siblings, 0 replies; 4+ messages in thread
From: Matwey V. Kornilov @ 2016-11-24 10:32 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: intel-wired-lan, netdev, linux-kernel, todd.fujinaka,
	carolyn.wyborny, dchang, jcheung, matwey.kornilov,
	Matwey V. Kornilov, stable

The functions igb_read_phy_reg_gs40g/igb_write_phy_reg_gs40g (which were
removed in 2a3cdea) explicitly selected the required page at every phy_reg
access. Currently, igb_get_phy_id_82575 relays on the fact that page 0 is
already selected. The assumption is not fulfilled for my Lex 3I380CW
motherboard with integrated dual i211 based gigabit ethernet. This leads to igb
initialization failure and network interfaces are not working:

    igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
    igb: Copyright (c) 2007-2014 Intel Corporation.
    igb: probe of 0000:01:00.0 failed with error -2
    igb: probe of 0000:02:00.0 failed with error -2

In order to fix it, we explicitly select page 0 before first access to phy
registers.

See also: https://bugzilla.suse.com/show_bug.cgi?id=1009911
See also: http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf

Fixes: 2a3cdea ("igb: Remove GS40G specific defines/functions")
Cc: <stable@vger.kernel.org> # 4.5+
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
---
 drivers/net/ethernet/intel/igb/e1000_82575.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
index a61447f..1264a36 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -246,6 +246,7 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
 			E1000_STATUS_FUNC_SHIFT;
 
 	/* Set phy->phy_addr and phy->id. */
+	igb_write_phy_reg_82580(hw, I347AT4_PAGE_SELECT, 0);
 	ret_val = igb_get_phy_id_82575(hw);
 	if (ret_val)
 		return ret_val;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Intel-wired-lan] [PATCH] igb: Explicitly select page 0 at initialization
@ 2016-11-24 10:32 ` Matwey V. Kornilov
  0 siblings, 0 replies; 4+ messages in thread
From: Matwey V. Kornilov @ 2016-11-24 10:32 UTC (permalink / raw)
  To: intel-wired-lan

The functions igb_read_phy_reg_gs40g/igb_write_phy_reg_gs40g (which were
removed in 2a3cdea) explicitly selected the required page at every phy_reg
access. Currently, igb_get_phy_id_82575 relays on the fact that page 0 is
already selected. The assumption is not fulfilled for my Lex 3I380CW
motherboard with integrated dual i211 based gigabit ethernet. This leads to igb
initialization failure and network interfaces are not working:

    igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
    igb: Copyright (c) 2007-2014 Intel Corporation.
    igb: probe of 0000:01:00.0 failed with error -2
    igb: probe of 0000:02:00.0 failed with error -2

In order to fix it, we explicitly select page 0 before first access to phy
registers.

See also: https://bugzilla.suse.com/show_bug.cgi?id=1009911
See also: http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf

Fixes: 2a3cdea ("igb: Remove GS40G specific defines/functions")
Cc: <stable@vger.kernel.org> # 4.5+
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
---
 drivers/net/ethernet/intel/igb/e1000_82575.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
index a61447f..1264a36 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -246,6 +246,7 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
 			E1000_STATUS_FUNC_SHIFT;
 
 	/* Set phy->phy_addr and phy->id. */
+	igb_write_phy_reg_82580(hw, I347AT4_PAGE_SELECT, 0);
 	ret_val = igb_get_phy_id_82575(hw);
 	if (ret_val)
 		return ret_val;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] igb: Explicitly select page 0 at initialization
  2016-11-24 10:32 ` [Intel-wired-lan] " Matwey V. Kornilov
@ 2016-11-24 10:36   ` Sergei Shtylyov
  -1 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-11-24 10:36 UTC (permalink / raw)
  To: Matwey V. Kornilov, jeffrey.t.kirsher
  Cc: intel-wired-lan, netdev, linux-kernel, todd.fujinaka,
	carolyn.wyborny, dchang, jcheung, matwey.kornilov, stable

Hello.

On 11/24/2016 1:32 PM, Matwey V. Kornilov wrote:

> The functions igb_read_phy_reg_gs40g/igb_write_phy_reg_gs40g (which were
> removed in 2a3cdea) explicitly selected the required page at every phy_reg

    This is not the way to cite a commit -- you need to specify at least 12 
digits and follow them with the commit subject enclosed into ("").

> access. Currently, igb_get_phy_id_82575 relays on the fact that page 0 is
> already selected. The assumption is not fulfilled for my Lex 3I380CW
> motherboard with integrated dual i211 based gigabit ethernet. This leads to igb
> initialization failure and network interfaces are not working:
>
>     igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
>     igb: Copyright (c) 2007-2014 Intel Corporation.
>     igb: probe of 0000:01:00.0 failed with error -2
>     igb: probe of 0000:02:00.0 failed with error -2
>
> In order to fix it, we explicitly select page 0 before first access to phy
> registers.
>
> See also: https://bugzilla.suse.com/show_bug.cgi?id=1009911
> See also: http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf
>
> Fixes: 2a3cdea ("igb: Remove GS40G specific defines/functions")

    Again, at least 12 digits.

> Cc: <stable@vger.kernel.org> # 4.5+
> Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
[...]

MBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Intel-wired-lan] [PATCH] igb: Explicitly select page 0 at initialization
@ 2016-11-24 10:36   ` Sergei Shtylyov
  0 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-11-24 10:36 UTC (permalink / raw)
  To: intel-wired-lan

Hello.

On 11/24/2016 1:32 PM, Matwey V. Kornilov wrote:

> The functions igb_read_phy_reg_gs40g/igb_write_phy_reg_gs40g (which were
> removed in 2a3cdea) explicitly selected the required page at every phy_reg

    This is not the way to cite a commit -- you need to specify at least 12 
digits and follow them with the commit subject enclosed into ("").

> access. Currently, igb_get_phy_id_82575 relays on the fact that page 0 is
> already selected. The assumption is not fulfilled for my Lex 3I380CW
> motherboard with integrated dual i211 based gigabit ethernet. This leads to igb
> initialization failure and network interfaces are not working:
>
>     igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
>     igb: Copyright (c) 2007-2014 Intel Corporation.
>     igb: probe of 0000:01:00.0 failed with error -2
>     igb: probe of 0000:02:00.0 failed with error -2
>
> In order to fix it, we explicitly select page 0 before first access to phy
> registers.
>
> See also: https://bugzilla.suse.com/show_bug.cgi?id=1009911
> See also: http://www.lex.com.tw/products/pdf/3I380A&3I380CW.pdf
>
> Fixes: 2a3cdea ("igb: Remove GS40G specific defines/functions")

    Again, at least 12 digits.

> Cc: <stable@vger.kernel.org> # 4.5+
> Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
[...]

MBR, Sergei


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-24 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-24 10:32 [PATCH] igb: Explicitly select page 0 at initialization Matwey V. Kornilov
2016-11-24 10:32 ` [Intel-wired-lan] " Matwey V. Kornilov
2016-11-24 10:36 ` Sergei Shtylyov
2016-11-24 10:36   ` [Intel-wired-lan] " Sergei Shtylyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.