Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix register access to MII in lan9118_mii_readreg...
details: https://anonhg.NetBSD.org/src/rev/1a8b74c26f84
branches: trunk
changeset: 749414:1a8b74c26f84
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sun Nov 29 05:07:49 2009 +0000
description:
Fix register access to MII in lan9118_mii_readreg()/lan9118_mii_writereg().
diffstat:
sys/dev/ic/lan9118.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (39 lines):
diff -r 4113b196646c -r 1a8b74c26f84 sys/dev/ic/lan9118.c
--- a/sys/dev/ic/lan9118.c Sun Nov 29 04:19:55 2009 +0000
+++ b/sys/dev/ic/lan9118.c Sun Nov 29 05:07:49 2009 +0000
@@ -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);
}
Home |
Main Index |
Thread Index |
Old Index