FEC driver doesn't compile
Hi all,
I was trying to compile the FEC driver without MDIO for PHY configuration, it gives an error as follows:
I am using linux kernel 2.4.20 from kernel.org.
make[2]: Entering directory `/build/usr/nikunj/work/atca/src/linux-2.4.20/arch/ppc/8xx_io' powerpc-linux-gcc -D__KERNEL__ -I/build/usr/nikunj/work/atca/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/build/usr/nikunj/work/atca/src/linux-2.4.20/arch/ppc -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring
-mcpu=860 -nostdinc -iwithprefix include -DKBUILD_BASENAME=fec -c -o
fec.o fec.cfec.c: In function `fec_enet_init':
fec.c:1911: structure has no member named `old_status' fec.c: At top level:
fec.c:1373: warning: `mii_link_interrupt' defined but not used make[2]: *** [fec.o] Error 1
A quick look into the code of arch/ppc/8xx_io/fec.c, the fec_enet_private structure has defined old_status under the CONFIG_USE_MDIO define and in function fec_enet_init the variable fec->old_status is accessed outside CONFIG_USE_MDIO.
I guess the old_status variable could be kept outside the CONFIG_USE_MDIO in the structure declaration.
Is there any patch avaiable for the same?
Am I missing something?
Please comment
Thanks
Nikunj
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 24 lines · Nikunj A. Dadhania
Hi all,
I was trying to compile the FEC driver without MDIO for PHY configuration, it gives an error as follows:
I am using linux kernel 2.4.20 from kernel.org.
make[2]: Entering directory `/build/usr/nikunj/work/atca/src/linux-2.4.20/arch/ppc/8xx_io' powerpc-linux-gcc -D__KERNEL__
(quoted diff) +0
-6-I/build/usr/nikunj/work/atca/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/build/usr/nikunj/work/atca/src/linux-2.4.20/arch/ppc -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -mcpu=860 -nostdinc -iwithprefix include -DKBUILD_BASENAME=fec -c -ofec.o
fec.cfec.c: In function `fec_enet_init':
fec.c:1911: structure has no member named `old_status'fec.c: At top level:
fec.c:1373: warning: `mii_link_interrupt' defined but not used make[2]: *** [fec.o] Error 1
Quoted 7 lines
A quick look into the code of
arch/ppc/8xx_io/fec.c, thefec_enet_privatestructure has definedold_statusunder theCONFIG_USE_MDIOdefine and in functionfec_enet_initthe variablefec->old_statusis accessed outsideCONFIG_USE_MDIO.I guess the
old_statusvariable could be kept outside theCONFIG_USE_MDIOin the structure declaration.
It's the other way around actually. This is fixed in 2.4.21-rc1.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/