lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Nov 2011 12:18:07 +0900
From:	Koki Sanagi <sanagi.koki@...fujitsu.com>
To:	netdev@...r.kernel.org, jeffrey.t.kirsher@...el.com,
	jesse.brandeburg@...el.com, bruce.w.allan@...el.com,
	carolyn.wyborny@...el.com, donald.c.skidmore@...el.com,
	gregory.v.rose@...el.com, peter.p.waskiewicz.jr@...el.com,
	alexander.h.duyck@...el.com, john.ronciak@...el.com,
	e1000-devel@...ts.sourceforge.net
CC:	davem@...emloft.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@...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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ