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:   Tue,  7 Nov 2017 21:06:32 -0600
From:   "Steven J. Hill" <steven.hill@...ium.com>
To:     netdev@...r.kernel.org
Cc:     "Steven J. Hill" <Steven.Hill@...ium.com>
Subject: [PATCH] staging: octeon: Fix stopping of the interface.

Before disconnecting the PHY when a port is being taken down,
a call to phy_stop() is necessary.

Signed-off-by: Steven J. Hill <Steven.Hill@...ium.com>
Acked-by: David Daney <david.daney@...ium.com>
---
 drivers/staging/octeon/ethernet-mdio.c | 4 +++-
 drivers/staging/octeon/ethernet.c      | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index 691e4a5..b9d67c9 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -124,8 +124,10 @@ int cvm_oct_common_stop(struct net_device *dev)
 
 	priv->poll = NULL;
 
-	if (dev->phydev)
+	if (dev->phydev) {
+		phy_stop(dev->phydev);
 		phy_disconnect(dev->phydev);
+	}
 
 	if (priv->last_link) {
 		link_info.u64 = 0;
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 429e24a..53d961d 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -463,8 +463,10 @@ int cvm_oct_common_init(struct net_device *dev)
 
 void cvm_oct_common_uninit(struct net_device *dev)
 {
-	if (dev->phydev)
+	if (dev->phydev) {
+		phy_stop(dev->phydev);
 		phy_disconnect(dev->phydev);
+	}
 }
 
 int cvm_oct_common_open(struct net_device *dev,
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ