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: <4e090d470903232347g2b6e91a7o385af2e66f05a936@mail.gmail.com>
Date:	Tue, 24 Mar 2009 14:47:25 +0800
From:	Richard Zhao <linuxzsc@...il.com>
To:	steve.glendinning@...c.com, netdev@...r.kernel.org
Cc:	linux-arm-kernel@...ts.arm.linux.org.uk, kernel@...gutronix.de
Subject: [PATCH 3/3] smsc911x: add flag SMSC911X_USE_INTERPHY

mx31pdk board don't have external PHY, but it wrongly pull up MDIO.
So, add flag SMSC911X_USE_INTERPHY to force using internal PHY.

Signed-off-by: Richard Zhao <linuxzsc@...il.com>

diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index d1590ac..60f7b74 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -831,10 +831,12 @@ static int __devinit smsc911x_mii_init(struct
platform_device *pdev,
 	case 0x01150000:
 	case 0x117A0000:
 	case 0x115A0000:
-		/* External PHY supported, try to autodetect */
-		if (smsc911x_phy_initialise_external(pdata) < 0) {
-			SMSC_TRACE(HW, "No external PHY detected, "
-				"using internal PHY");
+		if (!(pdata->config & SMSC911X_USE_INTERPHY)) {
+			/* External PHY supported, try to autodetect */
+			if (smsc911x_phy_initialise_external(pdata) < 0) {
+				SMSC_TRACE(HW, "No external PHY detected, "
+					"using internal PHY");
+			}
 		}
 		break;
 	default:
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h
index 1cbf031..42b088d 100644
--- a/include/linux/smsc911x.h
+++ b/include/linux/smsc911x.h
@@ -43,5 +43,6 @@ struct smsc911x_platform_config {
 /* Constants for flags */
 #define SMSC911X_USE_16BIT 			(BIT(0))
 #define SMSC911X_USE_32BIT 			(BIT(1))
+#define SMSC911X_USE_INTERPHY 			(BIT(2))

 #endif /* __LINUX_SMSC911X_H__ */
-- 
1.5.6.3
--
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