From 03b23138a0ec738ed2c51ae379e25fcd0dff20a6 Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Thu, 28 Sep 2000 18:33:00 +0000 Subject: If this is a Davicom DM9102A and we're enabling the homePNA link, force dc_link to 1 and don't activate the tick routine. Without this, dc_start() always thinks the link is down and never transmits in homePNA mode; from FreeBSD. --- sys/dev/ic/dc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index e37af1acd4d..dcf11873e29 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.12 2000/09/13 00:29:34 aaron Exp $ */ +/* $OpenBSD: dc.c,v 1.13 2000/09/28 18:32:59 aaron Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2377,10 +2377,14 @@ void dc_init(xsc) timeout_set(&sc->dc_tick_tmo, dc_tick, sc); - if (sc->dc_flags & DC_21143_NWAY) - timeout_add(&sc->dc_tick_tmo, hz / 10); - else - timeout_add(&sc->dc_tick_tmo, hz); + if (IFM_SUBTYPE(mii->mii_media.ifm_media) == IFM_HPNA_1) + sc->dc_link = 1; + else { + if (sc->dc_flags & DC_21143_NWAY) + timeout_add(&sc->dc_tick_tmo, hz / 10); + else + timeout_add(&sc->dc_tick_tmo, hz); + } return; } -- cgit v1.2.3