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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401111639-11507-5-git-send-email-alexander.stein@systec-electronic.com>
Date:	Mon, 26 May 2014 15:40:38 +0200
From:	Alexander Stein <alexander.stein@...tec-electronic.com>
To:	"David S. Miller" <davem@...emloft.net>
Cc:	Daniel Krueger <daniel.krueger@...tec-electronic.com>,
	netdev@...r.kernel.org,
	Alexander Stein <alexander.stein@...tec-electronic.com>
Subject: [PATCH 5/6] pch_gbe: reset PHY before first configuration

From: Daniel Krueger <daniel.krueger@...tec-electronic.com>

It is a good idea to perform a PHY software reset, but is should be done
before performing the first configuration.

Signed-off-by: Daniel Krueger <daniel.krueger@...tec-electronic.com>
Signed-off-by: Alexander Stein <alexander.stein@...tec-electronic.com>
---
 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c
index 3fa9a8f..dc9f0d3 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c
@@ -316,6 +316,8 @@ void pch_gbe_phy_init_setting(struct pch_gbe_hw *hw)
 	if (ret)
 		netdev_err(adapter->netdev, "Error: mii_ethtool_gset\n");
 
+	pch_gbe_phy_sw_reset(hw);
+
 	ethtool_cmd_speed_set(&cmd, hw->mac.link_speed);
 	cmd.duplex = hw->mac.link_duplex;
 	cmd.advertising = hw->phy.autoneg_advertised;
@@ -324,8 +326,6 @@ void pch_gbe_phy_init_setting(struct pch_gbe_hw *hw)
 	if (ret)
 		netdev_err(adapter->netdev, "Error: mii_ethtool_sset\n");
 
-	pch_gbe_phy_sw_reset(hw);
-
 	pch_gbe_phy_read_reg_miic(hw, PHY_PHYSP_CONTROL, &mii_reg);
 	mii_reg |= PHYSP_CTRL_ASSERT_CRS_TX;
 	pch_gbe_phy_write_reg_miic(hw, PHY_PHYSP_CONTROL, mii_reg);
-- 
1.8.5.5

--
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