* [PATCH net-next] igb: reset PHY after recovering from PHY power down
@ 2011-11-24 3:18 Koki Sanagi
2011-11-28 17:57 ` Wyborny, Carolyn
2011-12-16 15:53 ` Wyborny, Carolyn
0 siblings, 2 replies; 5+ messages in thread
From: Koki Sanagi @ 2011-11-24 3:18 UTC (permalink / raw)
To: netdev, jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
peter.p.waskiewicz.jr, alexander.h.duyck, john.ronciak,
e1000-devel
Cc: davem
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.
The situation I encountered is following.
1.Both ports connect to switch.
+---------+ +--------+
| |-----------| |
| 82576NS | | switch |
| |-----------| |
+---------+ +--------+
2.Detach both cables from switch.
+---------+ +--------+
| |------- | |
| 82576NS | | switch |
| |------- | |
+---------+ +--------+
3.Detach one cable from one port.
+---------+ +--------+
| |------- | |
| 82576NS | | switch |
| | | |
+---------+ +--------+
4.Attach that cable to the other port.(It means connecting directly each port)
+---------+ +--------+
| |-------+ | |
| 82576NS | | | switch |
| |-------+ | |
+---------+ +--------+
As a result, NIC doesn't link up sometimes.
Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
---
drivers/net/ethernet/intel/igb/igb_main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index bd9b30e..4d4f065 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2496,6 +2496,7 @@ static int igb_open(struct net_device *netdev)
goto err_setup_rx;
igb_power_up_link(adapter);
+ igb_reset_phy(hw);
/* before we allocate an interrupt, we must be ready to handle it.
* Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH net-next] igb: reset PHY after recovering from PHY power down
2011-11-24 3:18 [PATCH net-next] igb: reset PHY after recovering from PHY power down Koki Sanagi
@ 2011-11-28 17:57 ` Wyborny, Carolyn
2011-12-14 5:55 ` Koki Sanagi
2011-12-16 15:53 ` Wyborny, Carolyn
1 sibling, 1 reply; 5+ messages in thread
From: Wyborny, Carolyn @ 2011-11-28 17:57 UTC (permalink / raw)
To: Koki Sanagi, netdev@vger.kernel.org, Kirsher, Jeffrey T,
Brandeburg, Jesse, Allan, Bruce W, Skidmore, Donald C,
Rose, Gregory V, Waskiewicz Jr, Peter P, Duyck, Alexander H,
Ronciak, John, e1000-devel@lists.sourceforge.net
Cc: davem@davemloft.net
>-----Original Message-----
>From: Koki Sanagi [mailto:sanagi.koki@jp.fujitsu.com]
>Sent: Wednesday, November 23, 2011 7:18 PM
>To: netdev@vger.kernel.org; Kirsher, Jeffrey T; Brandeburg, Jesse;
>Allan, Bruce W; Wyborny, Carolyn; Skidmore, Donald C; Rose, Gregory V;
>Waskiewicz Jr, Peter P; Duyck, Alexander H; Ronciak, John; e1000-
>devel@lists.sourceforge.net
>Cc: davem@davemloft.net
>Subject: [PATCH net-next] 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.
>The situation I encountered is following.
>
>
>1.Both ports connect to switch.
>+---------+ +--------+
>| |-----------| |
>| 82576NS | | switch |
>| |-----------| |
>+---------+ +--------+
>
>2.Detach both cables from switch.
>+---------+ +--------+
>| |------- | |
>| 82576NS | | switch |
>| |------- | |
>+---------+ +--------+
>
>3.Detach one cable from one port.
>+---------+ +--------+
>| |------- | |
>| 82576NS | | switch |
>| | | |
>+---------+ +--------+
>
>4.Attach that cable to the other port.(It means connecting directly each
>port)
>+---------+ +--------+
>| |-------+ | |
>| 82576NS | | | switch |
>| |-------+ | |
>+---------+ +--------+
>
>As a result, NIC doesn't link up sometimes.
>
>Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
>---
> drivers/net/ethernet/intel/igb/igb_main.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
>b/drivers/net/ethernet/intel/igb/igb_main.c
>index bd9b30e..4d4f065 100644
>--- a/drivers/net/ethernet/intel/igb/igb_main.c
>+++ b/drivers/net/ethernet/intel/igb/igb_main.c
>@@ -2496,6 +2496,7 @@ static int igb_open(struct net_device *netdev)
> goto err_setup_rx;
>
> igb_power_up_link(adapter);
>+ igb_reset_phy(hw);
>
> /* before we allocate an interrupt, we must be ready to handle it.
> * Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt
Hello,
This seems reasonable, however it would only cover cases where igb_open is being called. It would be better to integrate the phy_reset call into igb_power_up_link, so that's the default. I can provide an alternate by end of the week.
Thanks,
Carolyn
Carolyn Wyborny
Linux Development
LAN Access Division
Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] igb: reset PHY after recovering from PHY power down
2011-11-28 17:57 ` Wyborny, Carolyn
@ 2011-12-14 5:55 ` Koki Sanagi
0 siblings, 0 replies; 5+ messages in thread
From: Koki Sanagi @ 2011-12-14 5:55 UTC (permalink / raw)
To: Wyborny, Carolyn
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Allan, Bruce W, Brandeburg, Jesse, Ronciak, John,
davem@davemloft.net
(2011/11/29 2:57), Wyborny, Carolyn wrote:
>
>
>> -----Original Message-----
>> From: Koki Sanagi [mailto:sanagi.koki@jp.fujitsu.com]
>> Sent: Wednesday, November 23, 2011 7:18 PM
>> To: netdev@vger.kernel.org; Kirsher, Jeffrey T; Brandeburg, Jesse;
>> Allan, Bruce W; Wyborny, Carolyn; Skidmore, Donald C; Rose, Gregory V;
>> Waskiewicz Jr, Peter P; Duyck, Alexander H; Ronciak, John; e1000-
>> devel@lists.sourceforge.net
>> Cc: davem@davemloft.net
>> Subject: [PATCH net-next] 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.
>> The situation I encountered is following.
>>
>>
>> 1.Both ports connect to switch.
>> +---------+ +--------+
>> | |-----------| |
>> | 82576NS | | switch |
>> | |-----------| |
>> +---------+ +--------+
>>
>> 2.Detach both cables from switch.
>> +---------+ +--------+
>> | |------- | |
>> | 82576NS | | switch |
>> | |------- | |
>> +---------+ +--------+
>>
>> 3.Detach one cable from one port.
>> +---------+ +--------+
>> | |------- | |
>> | 82576NS | | switch |
>> | | | |
>> +---------+ +--------+
>>
>> 4.Attach that cable to the other port.(It means connecting directly each
>> port)
>> +---------+ +--------+
>> | |-------+ | |
>> | 82576NS | | | switch |
>> | |-------+ | |
>> +---------+ +--------+
>>
>> As a result, NIC doesn't link up sometimes.
>>
>> Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
>> ---
>> drivers/net/ethernet/intel/igb/igb_main.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
>> b/drivers/net/ethernet/intel/igb/igb_main.c
>> index bd9b30e..4d4f065 100644
>> --- a/drivers/net/ethernet/intel/igb/igb_main.c
>> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
>> @@ -2496,6 +2496,7 @@ static int igb_open(struct net_device *netdev)
>> goto err_setup_rx;
>>
>> igb_power_up_link(adapter);
>> + igb_reset_phy(hw);
>>
>> /* before we allocate an interrupt, we must be ready to handle it.
>> * Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt
>
> Hello,
>
> This seems reasonable, however it would only cover cases where igb_open is being called. It would be better to integrate the phy_reset call into igb_power_up_link, so that's the default. I can provide an alternate by end of the week.
>
When will the alternate be provided ?
In addition, more general problem which this lack of reset causes is found.
Two machine have 82576NS and each NIC is connected directly each other.
+--------+ +--------+
| | | |
| +-------+ +-------+ |
| | | | | |
|machineA|82576NS|-----------|82576NS|machineB|
| | | | | |
| +-------+ +-------+ |
| | | |
+--------+ +--------+
When attaching and detaching a cable repeatedly on one side port,
that side port becomes not link up.
This is also fixed by adding resetting phy.
Thanks,
Koki Sanagi
> Thanks,
>
> Carolyn
>
> Carolyn Wyborny
> Linux Development
> LAN Access Division
> Intel Corporation
>
>
>
>
------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits?
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH net-next] igb: reset PHY after recovering from PHY power down
2011-11-24 3:18 [PATCH net-next] igb: reset PHY after recovering from PHY power down Koki Sanagi
2011-11-28 17:57 ` Wyborny, Carolyn
@ 2011-12-16 15:53 ` Wyborny, Carolyn
2011-12-18 23:59 ` Koki Sanagi
1 sibling, 1 reply; 5+ messages in thread
From: Wyborny, Carolyn @ 2011-12-16 15:53 UTC (permalink / raw)
To: Koki Sanagi, netdev@vger.kernel.org, Kirsher, Jeffrey T,
Brandeburg, Jesse, Allan, Bruce W, Skidmore, Donald C,
Rose, Gregory V, Waskiewicz Jr, Peter P, Duyck, Alexander H,
Ronciak, John, e1000-devel@lists.sourceforge.net
Cc: davem@davemloft.net
>-----Original Message-----
>From: Koki Sanagi [mailto:sanagi.koki@jp.fujitsu.com]
>Sent: Wednesday, November 23, 2011 7:18 PM
>To: netdev@vger.kernel.org; Kirsher, Jeffrey T; Brandeburg, Jesse;
>Allan, Bruce W; Wyborny, Carolyn; Skidmore, Donald C; Rose, Gregory V;
>Waskiewicz Jr, Peter P; Duyck, Alexander H; Ronciak, John; e1000-
>devel@lists.sourceforge.net
>Cc: davem@davemloft.net
>Subject: [PATCH net-next] 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.
>The situation I encountered is following.
>
>
>1.Both ports connect to switch.
>+---------+ +--------+
>| |-----------| |
>| 82576NS | | switch |
>| |-----------| |
>+---------+ +--------+
>
>2.Detach both cables from switch.
>+---------+ +--------+
>| |------- | |
>| 82576NS | | switch |
>| |------- | |
>+---------+ +--------+
>
>3.Detach one cable from one port.
>+---------+ +--------+
>| |------- | |
>| 82576NS | | switch |
>| | | |
>+---------+ +--------+
>
>4.Attach that cable to the other port.(It means connecting directly each
>port)
>+---------+ +--------+
>| |-------+ | |
>| 82576NS | | | switch |
>| |-------+ | |
>+---------+ +--------+
>
>As a result, NIC doesn't link up sometimes.
>
>Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
>---
> drivers/net/ethernet/intel/igb/igb_main.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
>b/drivers/net/ethernet/intel/igb/igb_main.c
>index bd9b30e..4d4f065 100644
>--- a/drivers/net/ethernet/intel/igb/igb_main.c
>+++ b/drivers/net/ethernet/intel/igb/igb_main.c
>@@ -2496,6 +2496,7 @@ static int igb_open(struct net_device *netdev)
> goto err_setup_rx;
>
> igb_power_up_link(adapter);
>+ igb_reset_phy(hw);
>
> /* before we allocate an interrupt, we must be ready to handle it.
> * Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt
I apologize for the delay in getting back to you. After a review, I see that the needed change is simpler than I thought at first. Can you resubmit with the igb_reset_phy call being added to the end of the igb_power_up_link function instead of after it in igb_open. That way, whenever igb_power_link is called in the code, it will also execute the igb_reset_phy function which is the complete solution. Thank you for your work on the igb driver.
Carolyn
Carolyn Wyborny
Linux Development
LAN Access Division
Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] igb: reset PHY after recovering from PHY power down
2011-12-16 15:53 ` Wyborny, Carolyn
@ 2011-12-18 23:59 ` Koki Sanagi
0 siblings, 0 replies; 5+ messages in thread
From: Koki Sanagi @ 2011-12-18 23:59 UTC (permalink / raw)
To: Wyborny, Carolyn
Cc: netdev@vger.kernel.org, Kirsher, Jeffrey T, Brandeburg, Jesse,
Allan, Bruce W, Skidmore, Donald C, Rose, Gregory V,
Waskiewicz Jr, Peter P, Duyck, Alexander H, Ronciak, John,
e1000-devel@lists.sourceforge.net, davem@davemloft.net
(2011/12/17 0:53), Wyborny, Carolyn wrote:
>
>
>> -----Original Message-----
>> From: Koki Sanagi [mailto:sanagi.koki@jp.fujitsu.com]
>> Sent: Wednesday, November 23, 2011 7:18 PM
>> To: netdev@vger.kernel.org; Kirsher, Jeffrey T; Brandeburg, Jesse;
>> Allan, Bruce W; Wyborny, Carolyn; Skidmore, Donald C; Rose, Gregory V;
>> Waskiewicz Jr, Peter P; Duyck, Alexander H; Ronciak, John; e1000-
>> devel@lists.sourceforge.net
>> Cc: davem@davemloft.net
>> Subject: [PATCH net-next] 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.
>> The situation I encountered is following.
>>
>>
>> 1.Both ports connect to switch.
>> +---------+ +--------+
>> | |-----------| |
>> | 82576NS | | switch |
>> | |-----------| |
>> +---------+ +--------+
>>
>> 2.Detach both cables from switch.
>> +---------+ +--------+
>> | |------- | |
>> | 82576NS | | switch |
>> | |------- | |
>> +---------+ +--------+
>>
>> 3.Detach one cable from one port.
>> +---------+ +--------+
>> | |------- | |
>> | 82576NS | | switch |
>> | | | |
>> +---------+ +--------+
>>
>> 4.Attach that cable to the other port.(It means connecting directly each
>> port)
>> +---------+ +--------+
>> | |-------+ | |
>> | 82576NS | | | switch |
>> | |-------+ | |
>> +---------+ +--------+
>>
>> As a result, NIC doesn't link up sometimes.
>>
>> Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
>> ---
>> drivers/net/ethernet/intel/igb/igb_main.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
>> b/drivers/net/ethernet/intel/igb/igb_main.c
>> index bd9b30e..4d4f065 100644
>> --- a/drivers/net/ethernet/intel/igb/igb_main.c
>> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
>> @@ -2496,6 +2496,7 @@ static int igb_open(struct net_device *netdev)
>> goto err_setup_rx;
>>
>> igb_power_up_link(adapter);
>> + igb_reset_phy(hw);
>>
>> /* before we allocate an interrupt, we must be ready to handle it.
>> * Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt
>
> I apologize for the delay in getting back to you. After a review, I see
> that the needed change is simpler than I thought at first. Can you resubmit
> with the igb_reset_phy call being added to the end of the igb_power_up_link
> function instead of after it in igb_open. That way, whenever igb_power_link
> is called in the code, it will also execute the igb_reset_phy function which
> is the complete solution. Thank you for your work on the igb driver.
>
Thank you for your reply.
O.K. I'll resubmit it soon.
Thanks!
Koki Sanagi
> Carolyn
>
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-19 0:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24 3:18 [PATCH net-next] igb: reset PHY after recovering from PHY power down Koki Sanagi
2011-11-28 17:57 ` Wyborny, Carolyn
2011-12-14 5:55 ` Koki Sanagi
2011-12-16 15:53 ` Wyborny, Carolyn
2011-12-18 23:59 ` Koki Sanagi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).