From 95617c00d708c106e7a5df4e4f1b1bcf4ae5fc2b Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 29 Aug 2002 14:33:03 +0000 Subject: Experimentation shows the hme chip is SIMPLEX if used in full-duplex mode, but not otherwise. This fixes PR 17523. --- sys/dev/ic/hme.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c index f26522a6cac..5d1c519437a 100644 --- a/sys/dev/ic/hme.c +++ b/sys/dev/ic/hme.c @@ -1,4 +1,4 @@ -/* $NetBSD: hme.c,v 1.29 2002/05/05 03:02:38 thorpej Exp $ */ +/* $NetBSD: hme.c,v 1.30 2002/08/29 14:33:03 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.29 2002/05/05 03:02:38 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.30 2002/08/29 14:33:03 martin Exp $"); #define HMEDEBUG @@ -1139,11 +1139,16 @@ hme_mii_statchg(dev) bus_space_write_4(t, mif, HME_MIFI_CFG, v); /* Set the MAC Full Duplex bit appropriately */ + /* Apparently the hme chip is SIMPLEX if working in full duplex mode, + but not otherwise. */ v = bus_space_read_4(t, mac, HME_MACI_TXCFG); - if ((IFM_OPTIONS(sc->sc_mii.mii_media_active) & IFM_FDX) != 0) + if ((IFM_OPTIONS(sc->sc_mii.mii_media_active) & IFM_FDX) != 0) { v |= HME_MAC_TXCFG_FULLDPLX; - else + sc->sc_ethercom.ec_if.if_flags |= IFF_SIMPLEX; + } else { v &= ~HME_MAC_TXCFG_FULLDPLX; + sc->sc_ethercom.ec_if.if_flags &= ~IFF_SIMPLEX; + } bus_space_write_4(t, mac, HME_MACI_TXCFG, v); /* If an external transceiver is selected, enable its MII drivers */ -- cgit