summaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.h
diff options
context:
space:
mode:
authorVernon Sauder <vernoninhand@gmail.com>2009-01-16 13:23:19 +0000
committerDavid S. Miller <davem@davemloft.net>2009-01-21 14:34:52 -0800
commit357fe2c6d2b12482abd1c3f24a086a2f507f03fc (patch)
tree441806c01d65670b98fa6a081dec248ec48f5cb3 /drivers/net/smc91x.h
parent31e2b7bd21035cb3d7cd567dfdf4f82817c4f6fb (diff)
smc91x: enable ethtool EEPROM interface
Signed-off-by: Vernon Sauder <vsauder@inhand.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smc91x.h')
-rw-r--r--drivers/net/smc91x.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index c4ccd121bc9..ed9ae43523a 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -1141,6 +1141,16 @@ static const char * chip_ids[ 16 ] = {
#define SMC_GET_MII(lp) SMC_inw(ioaddr, MII_REG(lp))
+#define SMC_GET_GP(lp) SMC_inw(ioaddr, GP_REG(lp))
+
+#define SMC_SET_GP(lp, x) \
+ do { \
+ if (SMC_MUST_ALIGN_WRITE(lp)) \
+ SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 1)); \
+ else \
+ SMC_outw(x, ioaddr, GP_REG(lp)); \
+ } while (0)
+
#define SMC_SET_MII(lp, x) SMC_outw(x, ioaddr, MII_REG(lp))
#define SMC_GET_MIR(lp) SMC_inw(ioaddr, MIR_REG(lp))