Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 2006 20:38:17 +0300
From:      "Alexander I. Mogilny" <amogilny@gmail.com>
To:        freebsd-current@freebsd.org
Cc:        glebius@freebsd.org, sg@astral.ntu-kpi.kiev.ua
Subject:   [patch] buildkernel crash [brgphy.c.patch]
Message-ID:  <20060823173817.GA37159@astral.ntu-kpi.kiev.ua>

next in thread | raw e-mail | index | archive | help

--liOOAslEiF7prFVr
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline

I have just tried to migrate from i386 to amd64 architecture on my
nx6125 laptop and failed to build kernel:

make TARGET_ARCH=amd64 buildkernel

error was:

/usr/src/sys/dev/mii/brgphy.c: In function `brgphy_reset':
/usr/src/sys/dev/mii/brgphy.c:646: error: structure has no member named `bge_no_3_led'
*** Error code 1

Stop in /usr/obj/amd64/usr/src/sys/GENERIC.
*** Error code 1

I have checked recent commits to bge driver and found that glebius made
some changes to if_bgereg.h file which removed bge_no_3_led field from
bge_softc struct.

Here is the patch fixing it:


--- brgphy.c.orig	Wed Aug 23 20:18:28 2006
+++ brgphy.c	Wed Aug 23 20:35:37 2006
@@ -643,7 +643,7 @@
 		PHY_WRITE(sc, BRGPHY_MII_AUXCTL, val | (1 << 15) | (1 << 4));
 
 		/* Enable Link LED on Dell boxes */
-		if (bge_sc->bge_no_3_led) {
+		if (bge_sc->bge_flags & BGE_FLAG_NO3LED) {
 			PHY_WRITE(sc, BRGPHY_MII_PHY_EXTCTL, 
 		    	PHY_READ(sc, BRGPHY_MII_PHY_EXTCTL)
 			    & ~BRGPHY_PHY_EXTCTL_3_LED);

-- 
AIM-UANIC             +-----[ FreeBSD ]-----+
Alexander Mogilny     | The Power to Serve! |
<> sg@portaone.com    +---------------------+

--liOOAslEiF7prFVr
Content-Type: text/plain; charset=koi8-r
Content-Disposition: attachment; filename="brgphy.c.patch"

--- brgphy.c.orig	Wed Aug 23 20:18:28 2006
+++ brgphy.c	Wed Aug 23 20:35:37 2006
@@ -643,7 +643,7 @@
 		PHY_WRITE(sc, BRGPHY_MII_AUXCTL, val | (1 << 15) | (1 << 4));
 
 		/* Enable Link LED on Dell boxes */
-		if (bge_sc->bge_no_3_led) {
+		if (bge_sc->bge_flags & BGE_FLAG_NO3LED) {
 			PHY_WRITE(sc, BRGPHY_MII_PHY_EXTCTL, 
 		    	PHY_READ(sc, BRGPHY_MII_PHY_EXTCTL)
 			    & ~BRGPHY_PHY_EXTCTL_3_LED);

--liOOAslEiF7prFVr--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060823173817.GA37159>