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]
Message-Id: <1384347180-3490-1-git-send-email-zonque@gmail.com>
Date:	Wed, 13 Nov 2013 13:53:00 +0100
From:	Daniel Mack <zonque@...il.com>
To:	netdev@...r.kernel.org
Cc:	mugunthanvnm@...com, davem@...emloft.net,
	Daniel Mack <zonque@...il.com>
Subject: [PATCH] net: ethernet: ti/cpsw: do not crash on single-MAC machines during resume

To prevent Oopses, cpsw_suspend() should only soft-reset sliver 1
on dual MAC enabled machines.

Signed-off-by: Daniel Mack <zonque@...il.com>
---
 drivers/net/ethernet/ti/cpsw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index edd3e79..702b063 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2173,8 +2173,11 @@ static int cpsw_suspend(struct device *dev)
 
 	if (netif_running(ndev))
 		cpsw_ndo_stop(ndev);
+
 	soft_reset("sliver 0", &priv->slaves[0].sliver->soft_reset);
-	soft_reset("sliver 1", &priv->slaves[1].sliver->soft_reset);
+	if (priv->data.dual_emac)
+		soft_reset("sliver 1", &priv->slaves[1].sliver->soft_reset);
+
 	pm_runtime_put_sync(&pdev->dev);
 
 	/* Select sleep pin state */
-- 
1.8.4.2

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