Date: Thu, 15 Nov 2001 20:40:02 -0800 (PST) From: "Matthew Emmerton" <matt@gsicomp.on.ca> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/31839: ex0 panic if NIC not cabled Message-ID: <200111160440.fAG4e2952780@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/31839; it has been noted by GNATS.
From: "Matthew Emmerton" <matt@gsicomp.on.ca>
To: <freebsd-gnats-submit@FreeBSD.org>, <clear@netaxs.com>
Cc:
Subject: Re: kern/31839: ex0 panic if NIC not cabled
Date: Thu, 15 Nov 2001 23:39:28 -0500
Looks like the code that detects the media type doesn't allow for IFM_NONE.
The below patch should fix the problem.
--- sys/dev/ex/if_ex.c.orig Thu Nov 15 23:13:41 2001
+++ sys/dev/ex/if_ex.c Thu Nov 15 23:26:28 2001
@@ -252,6 +252,8 @@
ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_10_2, 0, NULL);
if (temp & EE_W5_PORT_AUI)
ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_10_5, 0, NULL);
+ if (!(temp & (EE_W5_PORT_TPE | EE_W5_PORT_BNC | EE_W5_PORT_AUI)))
+ ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_NONE, 0, NULL);
ifmedia_set(&sc->ifmedia, ex_get_media(sc->iobase));
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111160440.fAG4e2952780>
