From f85c9074a9fdbfb8b702ca40f56450fc06e45088 Mon Sep 17 00:00:00 2001 From: Tim Mattox Date: Fri, 9 Apr 2004 08:54:06 -0400 Subject: [PATCH] [netdrvr tulip] add MII support for Comet chips Add MII support for ADMtek Comet (Linksys LNE100TX v4.1 & others): * tulip_core.c: add HAS_MII flag to COMET entry in tulip_tbl[] * timer.c (comet_timer): add missing call to tulip_check_duplex() and replace inl() calls with tulip_mdio_read() calls Changes modeled after Donald Becker's tulip.c:v0.98 1/8/2004 --- drivers/net/tulip/timer.c | 8 +++++++- drivers/net/tulip/tulip_core.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c index 84c0ca3fe530d..b6b61cb7db680 100644 --- a/drivers/net/tulip/timer.c +++ b/drivers/net/tulip/timer.c @@ -159,10 +159,16 @@ void comet_timer(unsigned long data) if (tulip_debug > 1) printk(KERN_DEBUG "%s: Comet link status %4.4x partner capability " "%4.4x.\n", - dev->name, inl(ioaddr + 0xB8), inl(ioaddr + 0xC8)); + dev->name, + tulip_mdio_read(dev, tp->phys[0], 1), + tulip_mdio_read(dev, tp->phys[0], 5)); /* mod_timer synchronizes us with potential add_timer calls * from interrupts. */ + if (tulip_check_duplex(dev) < 0) + { netif_carrier_off(dev); } + else + { netif_carrier_on(dev); } mod_timer(&tp->timer, RUN_AT(next_tick)); } diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index b9bffe4a6f267..acfb9fbc1a1d7 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c @@ -178,7 +178,7 @@ struct tulip_chip_table tulip_tbl[] = { /* COMET */ { "ADMtek Comet", 256, 0x0001abef, - MC_HASH_ONLY | COMET_MAC_ADDR, comet_timer }, + HAS_MII | MC_HASH_ONLY | COMET_MAC_ADDR, comet_timer }, /* COMPEX9881 */ { "Compex 9881 PMAC", 128, 0x0001ebef, -- 2.53.0