Patchwork [-next/-mm/mainline] net/hp-plus: fix link errors

login
register
mail settings
Submitter Randy Dunlap
Date Nov. 21, 2008, 5:17 a.m.
Message ID <20081120211724.09b94026.randy.dunlap@oracle.com>
Download mbox | patch
Permalink /patch/9939/
State Accepted
Delegated to: David Miller
Headers show

Comments

Randy Dunlap - Nov. 21, 2008, 5:17 a.m.
From: Randy Dunlap <randy.dunlap@oracle.com>

Fix hp-plus driver link errors.
Builds as loadable module and kernel image driver.
All drivers that use 8390.o or 8390p.o that will build on
i386 with MCA/PCI/EISA/ISA were built successfully both
=m and =y.

drivers/built-in.o: In function `hpp_open':
hp-plus.c:(.text+0xac06c): undefined reference to `eip_interrupt'
hp-plus.c:(.text+0xac0d7): undefined reference to `eip_open'
drivers/built-in.o: In function `hpp_close':
hp-plus.c:(.text+0xac1bb): undefined reference to `eip_close'
drivers/built-in.o: In function `hpp_probe1':
hp-plus.c:(.init.text+0xa98a): undefined reference to `NS8390p_init'
drivers/built-in.o: In function `hp_plus_probe':
(.init.text+0xa9fe): undefined reference to `__alloc_eip_netdev'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/net/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 22, 2008, 12:33 a.m.
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Thu, 20 Nov 2008 21:17:24 -0800

> Fix hp-plus driver link errors.
> Builds as loadable module and kernel image driver.
> All drivers that use 8390.o or 8390p.o that will build on
> i386 with MCA/PCI/EISA/ISA were built successfully both
> =m and =y.
> 
> drivers/built-in.o: In function `hpp_open':
> hp-plus.c:(.text+0xac06c): undefined reference to `eip_interrupt'
> hp-plus.c:(.text+0xac0d7): undefined reference to `eip_open'
> drivers/built-in.o: In function `hpp_close':
> hp-plus.c:(.text+0xac1bb): undefined reference to `eip_close'
> drivers/built-in.o: In function `hpp_probe1':
> hp-plus.c:(.init.text+0xa98a): undefined reference to `NS8390p_init'
> drivers/built-in.o: In function `hp_plus_probe':
> (.init.text+0xa9fe): undefined reference to `__alloc_eip_netdev'
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Applied, thanks Randy.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Randy Dunlap - Nov. 25, 2008, 5:59 p.m.
On Fri, 21 Nov 2008 16:33:35 -0800 (PST) David Miller wrote:

> From: Randy Dunlap <randy.dunlap@oracle.com>
> Date: Thu, 20 Nov 2008 21:17:24 -0800
> 
> > Fix hp-plus driver link errors.
> > Builds as loadable module and kernel image driver.
> > All drivers that use 8390.o or 8390p.o that will build on
> > i386 with MCA/PCI/EISA/ISA were built successfully both
> > =m and =y.
> > 
> > drivers/built-in.o: In function `hpp_open':
> > hp-plus.c:(.text+0xac06c): undefined reference to `eip_interrupt'
> > hp-plus.c:(.text+0xac0d7): undefined reference to `eip_open'
> > drivers/built-in.o: In function `hpp_close':
> > hp-plus.c:(.text+0xac1bb): undefined reference to `eip_close'
> > drivers/built-in.o: In function `hpp_probe1':
> > hp-plus.c:(.init.text+0xa98a): undefined reference to `NS8390p_init'
> > drivers/built-in.o: In function `hp_plus_probe':
> > (.init.text+0xa9fe): undefined reference to `__alloc_eip_netdev'
> > 
> > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Applied, thanks Randy.
> --

Dave,
I'm seeing build problems (still/again) in linux-next like

WARNING: drivers/net/8390p: 'ei_set_multicast_list' exported twice. Previous export was in drivers/net/8390.ko
WARNING: drivers/net/8390p: 'ei_get_stats' exported twice. Previous export was in drivers/net/8390.ko
WARNING: drivers/net/8390p: 'ei_start_xmit' exported twice. Previous export was in drivers/net/8390.ko
WARNING: drivers/net/8390p: 'ei_tx_timeout' exported twice. Previous export was in drivers/net/8390.ko

and

build-r6464.out:(.text+0x1050): multiple definition of `ei_get_stats'
build-r6464.out:(.text+0x1150): multiple definition of `ei_start_xmit'
build-r6464.out:(.text+0xef0): multiple definition of `ei_tx_timeout'
build-r6464.out:(.text+0x1100): multiple definition of `ei_set_multicast_list'


which I guess (have not yet verified) are caused by this ($subject) patch.

You might want to drop/revert it until I see what's going on.

---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alan Cox - Nov. 25, 2008, 6:18 p.m.
> WARNING: drivers/net/8390p: 'ei_set_multicast_list' exported twice. Previous export was in drivers/net/8390.ko
> WARNING: drivers/net/8390p: 'ei_get_stats' exported twice. Previous export was in drivers/net/8390.ko
> WARNING: drivers/net/8390p: 'ei_start_xmit' exported twice. Previous export was in drivers/net/8390.ko
> WARNING: drivers/net/8390p: 'ei_tx_timeout' exported twice. Previous export was in drivers/net/8390.ko

bash-3.2$ grep ei_set_multicast drivers/net/*c
bash-3.2$ grep ei_set_multicast  drivers/net/*h
bash-3.2$ grep ei_set_multicast  include/linux/*h
bash-3.2$ 

bash-3.2$ nm drivers/net/*o|grep ei_set_mu
nm: Warning: 'drivers/net/chelsio' is not an ordinary file
nm: Warning: 'drivers/net/hamradio' is not an ordinary file


Confused of South Wales

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 25, 2008, 9:41 p.m.
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Tue, 25 Nov 2008 18:18:00 +0000

> > WARNING: drivers/net/8390p: 'ei_set_multicast_list' exported twice. Previous export was in drivers/net/8390.ko
> > WARNING: drivers/net/8390p: 'ei_get_stats' exported twice. Previous export was in drivers/net/8390.ko
> > WARNING: drivers/net/8390p: 'ei_start_xmit' exported twice. Previous export was in drivers/net/8390.ko
> > WARNING: drivers/net/8390p: 'ei_tx_timeout' exported twice. Previous export was in drivers/net/8390.ko
> 
> bash-3.2$ grep ei_set_multicast drivers/net/*c
> bash-3.2$ grep ei_set_multicast  drivers/net/*h
> bash-3.2$ grep ei_set_multicast  include/linux/*h
> bash-3.2$ 

Wrong tree.

We added code that splits the struct netdev function pointers out into
a seperate structure.  In order to make initialization of the
netdev_ops members work inside of the driver (and keep it const), we
exported some of these 8390 library symbols.

Anyways, Stephen you have to do something about this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alan Cox - Nov. 25, 2008, 10:13 p.m.
> We added code that splits the struct netdev function pointers out into
> a seperate structure.  In order to make initialization of the
> netdev_ops members work inside of the driver (and keep it const), we
> exported some of these 8390 library symbols.

Then probably they want __ sticking in front of them and wrapping in
8390.c and 8390p.c which is how the other symbols were done.

Alan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
stephen hemminger - Nov. 25, 2008, 10:20 p.m.
On Tue, 25 Nov 2008 22:13:28 +0000
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> > We added code that splits the struct netdev function pointers out into
> > a seperate structure.  In order to make initialization of the
> > netdev_ops members work inside of the driver (and keep it const), we
> > exported some of these 8390 library symbols.
> 
> Then probably they want __ sticking in front of them and wrapping in
> 8390.c and 8390p.c which is how the other symbols were done.
> 
> Alan

Actually, all the 8390 based drivers need to get converted to netdev_ops
then it will be fixed.  
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- mmotm-2008-1120-1703.orig/drivers/net/Makefile
+++ mmotm-2008-1120-1703/drivers/net/Makefile
@@ -113,7 +113,7 @@  obj-$(CONFIG_EL2) += 3c503.o 8390p.o
 obj-$(CONFIG_NE2000) += ne.o 8390p.o
 obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o
 obj-$(CONFIG_HPLAN) += hp.o 8390p.o
-obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390.o
+obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390p.o
 obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
 obj-$(CONFIG_ULTRAMCA) += smc-mca.o 8390.o
 obj-$(CONFIG_ULTRA32) += smc-ultra32.o 8390.o