Subject: wm0 mediachange panic
To: None <current-users@netbsd.org>
From: haad <haaaad@gmail.com>
List: current-users
Date: 12/03/2006 12:02:45
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

When I boot 4.99.4 newly compiled kernel I got this panic message.

wm0_gmii_mediachange: bad media 0x22.

and ddb.

I can produce dump because i have not enought swap space on my notebook:(.

but this error is from line 4121

static int
4095 wm_gmii_mediachange(struct ifnet *ifp)
4096 {
4097 	struct wm_softc *sc = ifp->if_softc;
4098 	struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur;
4099
4100 	if (ifp->if_flags & IFF_UP) {
4101 		sc->sc_ctrl &= ~(CTRL_SPEED_MASK | CTRL_FD);
4102 		sc->sc_ctrl |= CTRL_SLU;
4103 		if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) {
4104 			sc->sc_ctrl |= CTRL_ASDE;
4105 		} else {
4106 			sc->sc_ctrl &= ~CTRL_ASDE;
4107 			sc->sc_ctrl |= CTRL_FRCSPD | CTRL_FRCFDX;
4108 			if (ife->ifm_media & IFM_FDX)
4109 				sc->sc_ctrl |= CTRL_FD;
4110 			switch(IFM_SUBTYPE(ife->ifm_media)) {
4111 			case IFM_10_T:
4112 				sc->sc_ctrl |= CTRL_SPEED_10;
4113 				break;
4114 			case IFM_100_TX:
4115 				sc->sc_ctrl |= CTRL_SPEED_100;
4116 				break;
4117 			case IFM_1000_T:
4118 				sc->sc_ctrl |= CTRL_SPEED_1000;
4119 				break;
4120 			default:
>>>4121<<<		panic("wm_gmii_mediachange: bad media 0x%x",
4122 				    ife->ifm_media);
4123 			}
4124 		}
4125 		CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl);
4126 		mii_mediachg(&sc->sc_mii);
4127 	}
4128 	return (0);
4129 }

from bt I know that this function is called from wm_init.

My functional dmesg:

wm0 at pci2 dev 1 function 0: Intel i82540EP 1000BASE-T Ethernet, rev. 3
wm0: interrupting at irq 9
wm0: 32-bit 33MHz PCI bus
wm0: 64 word (6 address bits) MicroWire EEPROM
wm0: Ethernet address 00:0d:60:37:3d:87
OUI 0x000ac2 model 0x0002 rev 4 at wm0 phy 1 not configured

Regards
- ---------------------------------------------------------------
Adam Hamsik
ICQ 249727910
jabber haad@jabber.org
- ---------------------------------------------------------------
There are 10 kinds of people in the world. Those who understand
binary numbers, and those who don't.
				
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFcq7V9Wt2FT7y228RAiw7AKCGicvcavQ1IUgWWIhtj+MW5HSBuwCgiFpc
XoIFFmtAtStiQeMMa/lMMOU=
=VRhh
-----END PGP SIGNATURE-----