linux-next: net/smsc911x compile error on next-20120106

2 messages, 2 authors, 2012-01-07 · open the first message on its own page

linux-next: net/smsc911x compile error on next-20120106

From: Shawn Guo <hidden>
Date: 2012-01-07 05:55:41

Hi Stephen, David,

I just ran into the following compile error when building
next-20120106 with imx_v6_v7_defconfig.

  CC      drivers/net/ethernet/smsc/smsc911x.o
drivers/net/ethernet/smsc/smsc911x.c: In function
‘smsc911x_phy_disable_energy_detect’:
drivers/net/ethernet/smsc/smsc911x.c:1329:32: error:
‘MII_LAN83C185_CTRL_STATUS’ undeclared (first use in this function)
drivers/net/ethernet/smsc/smsc911x.c:1329:32: note: each undeclared
identifier is reported only once for each function it appears in
drivers/net/ethernet/smsc/smsc911x.c:1340:12: error:
‘MII_LAN83C185_EDPWRDOWN’ undeclared (first use in this function)
drivers/net/ethernet/smsc/smsc911x.c:1341:13: error:
‘MII_LAN83C185_ENERGYON’ undeclared (first use in this function)
drivers/net/ethernet/smsc/smsc911x.c: In function
‘smsc911x_phy_enable_energy_detect’:
drivers/net/ethernet/smsc/smsc911x.c:1364:32: error:
‘MII_LAN83C185_CTRL_STATUS’ undeclared (first use in this function)
drivers/net/ethernet/smsc/smsc911x.c:1372:13: error:
‘MII_LAN83C185_EDPWRDOWN’ undeclared (first use in this function)

-- 
Regards,
Shawn

linux-next: net/smsc911x compile error on next-20120106

From: davem@davemloft.net (David Miller)
Date: 2012-01-07 20:22:31

From: Shawn Guo <redacted>
Date: Sat, 7 Jan 2012 13:55:41 +0800
Hi Stephen, David,

I just ran into the following compile error when building
next-20120106 with imx_v6_v7_defconfig.
I just commited the following to fix this, thanks:

--------------------
smsc911x: Unconditionally include linux/smscphy.h in smsc911x.h

The energy detect enable/disable code in the driver uses some
register defines in this header unconditionally, so guarding
the smscphy.h header include with CONFIG_SMSC_PHY leads to
build failures in some configurations.

Reported-by: Shawn Guo <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/ethernet/smsc/smsc911x.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/smsc/smsc911x.h b/drivers/net/ethernet/smsc/smsc911x.h
index 938ecf2..9ad5e5d 100644
--- a/drivers/net/ethernet/smsc/smsc911x.h
+++ b/drivers/net/ethernet/smsc/smsc911x.h
@@ -401,8 +401,6 @@
 #include <asm/smsc911x.h>
 #endif
 
-#ifdef CONFIG_SMSC_PHY
 #include <linux/smscphy.h>
-#endif
 
 #endif				/* __SMSC911X_H__ */
-- 
1.7.6.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help