Skip to contentSkip to conversation

next-20081209: build problem at arch/ia64/hp/sim/simeth.c

PATCH In review Alexander Beregalov 3 participants 8 messages Dec 9, 2008 – Dec 16, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

CC arch/ia64/hp/sim/simeth.o
arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'
arch/ia64/hp/sim/simeth.c:213: error: 'struct net_device' has no member named 'stop'
arch/ia64/hp/sim/simeth.c:214: error: 'struct net_device' has no member named 'hard_start_xmit' arch/ia64/hp/sim/simeth.c:215: error: 'struct net_device' has no member named 'get_stats' arch/ia64/hp/sim/simeth.c:216: error: 'struct net_device' has no member named 'set_multicast_list'

#1 lore raw

PATCH 1/1 simnet: convert to net_device_ops

Quoted 3 lines · Alexander Beregalov

CC arch/ia64/hp/sim/simeth.o
arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'

[PATCH] simeth: convert to net_device_ops

---

 arch/ia64/hp/sim/simeth.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
arch/ia64/hp/sim/simeth.c +10 -5
@@ -167,6 +167,15 @@ netdev_read(int fd, unsigned char *buf, unsigned int len)
 	return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV);
 }
 
+static const struct net_device_ops simeth_netdev_ops = {
+	.ndo_open		= simeth_open,
+	.ndo_stop		= simeth_close,
+	.ndo_start_xmit		= simeth_tx,
+	.ndo_get_stats		= simeth_get_stats,
+	.ndo_set_multicast_list	= set_multicast_list, /* not yet used */
+
+};
+
 /*
  * Function shared with module code, so cannot be in init section
  *
@@ -209,11 +218,7 @@ simeth_probe1(void)
 	local = netdev_priv(dev);
 	local->simfd = fd; /* keep track of underlying file descriptor */
 
-	dev->open		= simeth_open;
-	dev->stop		= simeth_close;
-	dev->hard_start_xmit	= simeth_tx;
-	dev->get_stats		= simeth_get_stats;
-	dev->set_multicast_list = set_multicast_list; /* no yet used */
+	dev->netdev_ops = &simeth_netdev_ops;
 
 	err = register_netdev(dev);
 	if (err) {
maintainer
#2 lore raw

Re: [PATCH] simnet: convert to net_device_ops

From: Alexey Dobriyan <[email protected]>
Date: Tue, 9 Dec 2008 18:08:27 +0300

Quoted 8 lines · Alexander Beregalov
Quoted 3 lines

CC arch/ia64/hp/sim/simeth.o
arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'

[PATCH] simeth: convert to net_device_ops

This doesn't explain the build failure.

Using ->open() and friends should work perfectly fine for drivers not yet converted to netdev_ops. The code protected by COMPAT_NET_DEV_OPS provides this, and we force that Kconfig option to always be on.

I don't want to add this patch and just shrug off this build failure. If this build failures, we should be seeing 200 other drivers not build too.

I suspect something is messed up with this person's kernel config or similar.

#3 lore raw

Re: [PATCH] simnet: convert to net_device_ops

2008/12/10 David Miller <[email protected]>:

Quoted 18 lines

From: Alexey Dobriyan <[email protected]>
Date: Tue, 9 Dec 2008 18:08:27 +0300

Quoted 8 lines · Alexander Beregalov
Quoted 3 lines

CC arch/ia64/hp/sim/simeth.o
arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'

[PATCH] simeth: convert to net_device_ops

This doesn't explain the build failure.

Using ->open() and friends should work perfectly fine for drivers not yet converted to netdev_ops. The code protected by COMPAT_NET_DEV_OPS provides this, and we force that Kconfig option to always be on.

Quoted 7 lines

I don't want to add this patch and just shrug off this build failure. If this build failures, we should be seeing 200 other drivers not build too.

I suspect something is messed up with this person's kernel config or similar.

Thanks for explanation.
Is it better?

 arch/ia64/hp/sim/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/ia64/hp/sim/Kconfig +1 -0
index f92306b..8d513a8 100644
@@ -4,6 +4,7 @@ menu "HP Simulator drivers"
 
 config HP_SIMETH
        bool "Simulated Ethernet "
+       depends on NET
 
 config HP_SIMSERIAL
        bool "Simulated serial driver support"
 arch/ia64/hp/sim/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/ia64/hp/sim/Kconfig +1 -0
index f92306b..8d513a8 100644
@@ -4,6 +4,7 @@ menu "HP Simulator drivers"
 
 config HP_SIMETH
 	bool "Simulated Ethernet "
+	depends on NET
 
 config HP_SIMSERIAL
 	bool "Simulated serial driver support"
maintainer
#4 lore raw

Re: [PATCH] simnet: convert to net_device_ops

From: "Alexander Beregalov" <[email protected]>
Date: Wed, 10 Dec 2008 14:21:46 +0300

Quoted 23 lines

2008/12/10 David Miller <[email protected]>:

Quoted 22 lines

From: Alexey Dobriyan <[email protected]>
Date: Tue, 9 Dec 2008 18:08:27 +0300

Quoted 8 lines · Alexander Beregalov
Quoted 3 lines

CC arch/ia64/hp/sim/simeth.o
arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'

[PATCH] simeth: convert to net_device_ops

This doesn't explain the build failure.

Using ->open() and friends should work perfectly fine for drivers not yet converted to netdev_ops. The code protected by COMPAT_NET_DEV_OPS provides this, and we force that Kconfig option to always be on.

I don't want to add this patch and just shrug off this build failure. If this build failures, we should be seeing 200 other drivers not build too.

Quoted 6 lines
Quoted 3 lines

I suspect something is messed up with this person's kernel config or similar.

Thanks for explanation.
Is it better?

Good fix, except that your email client corrupted the patch by turning tab characters into spaces.

I fixed this up and applied your patch. But please next time provide a proper Signed-off-by line too.

#5 lore raw

Re: [PATCH] simnet: convert to net_device_ops

In reply to David Miller
Quoted 8 lines · David Miller

From: Alexey Dobriyan <[email protected]>
Date: Tue, 9 Dec 2008 18:08:27 +0300

Quoted 5 lines · Alexander Beregalov
Quoted 3 lines

CC arch/ia64/hp/sim/simeth.o
arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'

Quoted 5 lines
Quoted 3 lines

[PATCH] simeth: convert to net_device_ops

This doesn't explain the build failure.

I triggered it manually.

And most certainly forgot .ndo_validate_addr, so patch needs resend anyway.

Quoted 10 lines

Using ->open() and friends should work perfectly fine for drivers not yet converted to netdev_ops. The code protected by COMPAT_NET_DEV_OPS provides this, and we force that Kconfig option to always be on.

I don't want to add this patch and just shrug off this build failure. If this build failures, we should be seeing 200 other drivers not build too.

I suspect something is messed up with this person's kernel config or similar.

maintainer
#6 lore raw

Re: [PATCH] simnet: convert to net_device_ops

In reply to Alexey Dobriyan

From: Alexey Dobriyan <[email protected]>
Date: Tue, 9 Dec 2008 18:08:27 +0300

Quoted 8 lines · Alexander Beregalov
Quoted 3 lines

CC arch/ia64/hp/sim/simeth.o
arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'

[PATCH] simeth: convert to net_device_ops

Now that the kconfig badness has been fixed, I've applied this.

Thanks Alexey.

maintainer
#7 lore raw
In reply to Alexander Beregalov

From: "Alexander Beregalov" <[email protected]>
Date: Tue, 9 Dec 2008 17:11:17 +0300

Quoted 4 lines

CC arch/ia64/hp/sim/simeth.o
arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'

Quoted 8 lines

arch/ia64/hp/sim/simeth.c:213: error: 'struct net_device' has no member named 'stop'
arch/ia64/hp/sim/simeth.c:214: error: 'struct net_device' has no member named 'hard_start_xmit' arch/ia64/hp/sim/simeth.c:215: error: 'struct net_device' has no member named 'get_stats' arch/ia64/hp/sim/simeth.c:216: error: 'struct net_device' has no member named 'set_multicast_list'

The only way for this to happen is if CONFIG_COMPAT_NET_DEV_OPS is not set.

And we force it on in net/Kconfig:

config COMPAT_NET_DEV_OPS
def_bool y

Perhaps you simply need to update your config properly or something like that.