Module Name: src Committed By: kiyohara Date: Sun Nov 29 05:07:50 UTC 2009
Modified Files: src/sys/dev/ic: lan9118.c Log Message: Fix register access to MII in lan9118_mii_readreg()/lan9118_mii_writereg(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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.5 src/sys/dev/ic/lan9118.c:1.6 --- src/sys/dev/ic/lan9118.c:1.5 Sat Nov 28 13:20:41 2009 +++ src/sys/dev/ic/lan9118.c Sun Nov 29 05:07:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118.c,v 1.5 2009/11/28 13:20:41 kiyohara Exp $ */ +/* $NetBSD: lan9118.c,v 1.6 2009/11/29 05:07:49 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.5 2009/11/28 13:20:41 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.6 2009/11/29 05:07:49 kiyohara Exp $"); /* * The LAN9118 Family @@ -854,7 +854,7 @@ while (lan9118_mac_readreg(sc, LAN9118_MII_ACC) & LAN9118_MII_ACC_MIIBZY); - acc = LAN9118_MII_ACC_MIIRINDA(phy) | LAN9118_MII_ACC_PHYA(reg); + acc = LAN9118_MII_ACC_PHYA(phy) | LAN9118_MII_ACC_MIIRINDA(reg); lan9118_mac_writereg(sc, LAN9118_MII_ACC, acc); while (lan9118_mac_readreg(sc, LAN9118_MII_ACC) & LAN9118_MII_ACC_MIIBZY); @@ -868,9 +868,10 @@ while (lan9118_mac_readreg(sc, LAN9118_MII_ACC) & LAN9118_MII_ACC_MIIBZY); - acc = LAN9118_MII_ACC_MIIRINDA(phy) | LAN9118_MII_ACC_PHYA(reg) | + acc = LAN9118_MII_ACC_PHYA(phy) | LAN9118_MII_ACC_MIIRINDA(reg) | LAN9118_MII_ACC_MIIWNR; lan9118_mac_writereg(sc, LAN9118_MII_DATA, val); + lan9118_mac_writereg(sc, LAN9118_MII_ACC, acc); while (lan9118_mac_readreg(sc, LAN9118_MII_ACC) & LAN9118_MII_ACC_MIIBZY); }