Thread (5 messages) 5 messages, 3 authors, 2009-03-24
STALE6321d

[PATCH 3/3] smsc911x: add flag SMSC911X_USE_INTERPHY

From: Richard Zhao <hidden>
Date: 2009-03-24 06:47:26
Subsystem: networking drivers, smsc911x ethernet driver, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Steve Glendinning, Linus Torvalds

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 <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help