Patchwork [net-next,v2] igb: reset PHY after recovering from PHY power down

login
register
mail settings
Submitter Koki Sanagi
Date Dec. 19, 2011, 1:24 a.m.
Message ID <4EEE9248.8020009@jp.fujitsu.com>
Download mbox | patch
Permalink /patch/132141/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Koki Sanagi - Dec. 19, 2011, 1:24 a.m.
According to 82576_Datasheet.pdf, PHY setting is lost after PHY power down.
So resetting PHY is needed when recovering from PHY power down to set a default
setting to PHY register.
Owing to this lack, NIC doesn't link up in some rare situation.

Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
---

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wyborny, Carolyn - Dec. 20, 2011, 4:05 p.m.
>-----Original Message-----
>From: Koki Sanagi [mailto:sanagi.koki@jp.fujitsu.com]
>Sent: Sunday, December 18, 2011 5:24 PM
>To: netdev@vger.kernel.org
>Cc: davem@davemloft.net; e1000-devel@lists.sourceforge.net; Wyborny,
>Carolyn; Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W;
>Skidmore, Donald C; Rose, Gregory V; Waskiewicz Jr, Peter P; Duyck,
>Alexander H; Ronciak, John
>Subject: [PATCH net-next v2] igb: reset PHY after recovering from PHY
>power down
>
>According to 82576_Datasheet.pdf, PHY setting is lost after PHY power
>down.
>So resetting PHY is needed when recovering from PHY power down to set a
>default
>setting to PHY register.
>Owing to this lack, NIC doesn't link up in some rare situation.
>
>Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
>---
>diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
>b/drivers/net/ethernet/intel/igb/igb_main.c
>index 89d576c..9b923b0 100644
>--- a/drivers/net/ethernet/intel/igb/igb_main.c
>+++ b/drivers/net/ethernet/intel/igb/igb_main.c
>@@ -1498,6 +1498,7 @@ void igb_power_up_link(struct igb_adapter
>*adapter)
> 		igb_power_up_phy_copper(&adapter->hw);
> 	else
> 		igb_power_up_serdes_link_82575(&adapter->hw);
>+	igb_reset_phy(&adapter->hw);
> }
>
> /**

ACK


Carolyn Wyborny
Linux Development
LAN Access Division
Intel Corporation


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Kirsher - Dec. 22, 2011, 6:46 a.m.
On Sun, 2011-12-18 at 17:24 -0800, Koki Sanagi wrote:
> According to 82576_Datasheet.pdf, PHY setting is lost after PHY power
> down.
> So resetting PHY is needed when recovering from PHY power down to set
> a default
> setting to PHY register.
> Owing to this lack, NIC doesn't link up in some rare situation.
> 
> Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com> 

I have added this patch to my queue.  Thanks Koki!

Patch

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 89d576c..9b923b0 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1498,6 +1498,7 @@  void igb_power_up_link(struct igb_adapter *adapter)
 		igb_power_up_phy_copper(&adapter->hw);
 	else
 		igb_power_up_serdes_link_82575(&adapter->hw);
+	igb_reset_phy(&adapter->hw);
 }
 
 /**