Module Name:    src
Committed By:   kiyohara
Date:           Mon Nov 23 09:41:53 UTC 2009

Modified Files:
        src/sys/dev/ic: lan9118.c

Log Message:
- Wait the ready 5sec, not 5msec.
- Set IFM_ACTIVE to ifm_status instead of ifm_active.  ifconfig(8) always said
  'no carrier'...


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/lan9118.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/lan9118.c
diff -u src/sys/dev/ic/lan9118.c:1.1 src/sys/dev/ic/lan9118.c:1.2
--- src/sys/dev/ic/lan9118.c:1.1	Sun Aug  9 06:40:10 2009
+++ src/sys/dev/ic/lan9118.c	Mon Nov 23 09:41:53 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: lan9118.c,v 1.1 2009/08/09 06:40:10 kiyohara Exp $	*/
+/*	$NetBSD: lan9118.c,v 1.2 2009/11/23 09:41:53 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.1 2009/08/09 06:40:10 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.2 2009/11/23 09:41:53 kiyohara Exp $");
 
 /*
  * The LAN9118 Family
@@ -503,7 +503,7 @@
 	s = splnet();
 
 	/* wait for PMT_CTRL[READY] */
-	timo = mstohz(5);	/* XXXX 5sec */
+	timo = mstohz(5000);	/* XXXX 5sec */
 	while (!(bus_space_read_4(sc->sc_iot, sc->sc_ioh, LAN9118_PMT_CTRL) &
 	    LAN9118_PMT_CTRL_READY)) {
 		bus_space_write_4(sc->sc_iot, sc->sc_ioh, LAN9118_BYTE_TEST,
@@ -770,7 +770,7 @@
 		ifmr->ifm_active |= IFM_NONE;
 		return;
 	}
-	ifmr->ifm_active |= IFM_ACTIVE;
+	ifmr->ifm_status |= IFM_ACTIVE;
 	physcs = lan9118_mii_readreg(sc, LAN9118_IPHY_ADDR, LAN9118_PHYSCSR);
 	if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) {
 		if (!(physcs & LAN9118_PHYSCSR_AUTODONE)) {

Reply via email to