Subject: Re: wm+makphy
To: None <current-users@netbsd.org>
From: SAITOH Masanobu <masanobu@iij.ad.jp>
List: current-users
Date: 02/21/2007 00:25:38
> Please test following patch if you have any trouble with wm (and/or makphy).
>
> e.g. i82573
Patch for igphy(+wm) users:
=========
Index: igphy.c
===================================================================
RCS file: /cvsroot/src/sys/dev/mii/igphy.c,v
retrieving revision 1.10
diff -u -r1.10 igphy.c
--- igphy.c 16 Nov 2006 21:24:07 -0000 1.10
+++ igphy.c 20 Feb 2007 15:21:04 -0000
@@ -272,6 +272,18 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
+#if 1
+ reg = PHY_READ(sc, MII_IGPHY_PORT_CTRL);
+ if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) {
+ reg |= PSCR_AUTO_MDIX;
+ reg &= ~PSCR_FORCE_MDI_MDIX;
+ PHY_WRITE(sc, MII_IGPHY_PORT_CTRL, reg);
+ } else {
+ reg &= ~(PSCR_AUTO_MDIX | PSCR_FORCE_MDI_MDIX);
+ PHY_WRITE(sc, MII_IGPHY_PORT_CTRL, reg);
+ }
+#endif
+
mii_phy_setmedia(sc);
break;
=========
This patch fixes the problem that "ifconfig wm0 media 100BaseTX" doesn't
link up.
Use with previous wm's patch.
Regards.
----------------------------------------------------------
SAITOH Masanobu (masanobu@iij.ad.jp
msaitoh@netbsd.org)