* next-20081209: build problem at arch/ia64/hp/sim/simeth.c
@ 2008-12-09 14:11 Alexander Beregalov
2008-12-09 15:08 ` [PATCH] simnet: convert to net_device_ops Alexey Dobriyan
2008-12-10 6:41 ` next-20081209: build problem at arch/ia64/hp/sim/simeth.c David Miller
0 siblings, 2 replies; 8+ messages in thread
From: Alexander Beregalov @ 2008-12-09 14:11 UTC (permalink / raw)
To: linux-next, Netdev, linux-ia64
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'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] simnet: convert to net_device_ops
2008-12-09 14:11 next-20081209: build problem at arch/ia64/hp/sim/simeth.c Alexander Beregalov
@ 2008-12-09 15:08 ` Alexey Dobriyan
2008-12-10 6:57 ` David Miller
2008-12-16 9:56 ` David Miller
2008-12-10 6:41 ` next-20081209: build problem at arch/ia64/hp/sim/simeth.c David Miller
1 sibling, 2 replies; 8+ messages in thread
From: Alexey Dobriyan @ 2008-12-09 15:08 UTC (permalink / raw)
To: Alexander Beregalov, davem; +Cc: linux-next, Netdev, linux-ia64
On Tue, Dec 09, 2008 at 05:11:17PM +0300, Alexander Beregalov wrote:
> 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
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
arch/ia64/hp/sim/simeth.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -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) {
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: next-20081209: build problem at arch/ia64/hp/sim/simeth.c
2008-12-09 14:11 next-20081209: build problem at arch/ia64/hp/sim/simeth.c Alexander Beregalov
2008-12-09 15:08 ` [PATCH] simnet: convert to net_device_ops Alexey Dobriyan
@ 2008-12-10 6:41 ` David Miller
1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2008-12-10 6:41 UTC (permalink / raw)
To: a.beregalov; +Cc: linux-next, netdev, linux-ia64
From: "Alexander Beregalov" <a.beregalov@gmail.com>
Date: Tue, 9 Dec 2008 17:11:17 +0300
> 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'
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] simnet: convert to net_device_ops
2008-12-09 15:08 ` [PATCH] simnet: convert to net_device_ops Alexey Dobriyan
@ 2008-12-10 6:57 ` David Miller
2008-12-10 11:21 ` Alexander Beregalov
2008-12-10 11:54 ` Alexey Dobriyan
2008-12-16 9:56 ` David Miller
1 sibling, 2 replies; 8+ messages in thread
From: David Miller @ 2008-12-10 6:57 UTC (permalink / raw)
To: adobriyan; +Cc: a.beregalov, linux-next, netdev, linux-ia64
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Tue, 9 Dec 2008 18:08:27 +0300
> On Tue, Dec 09, 2008 at 05:11:17PM +0300, Alexander Beregalov wrote:
> > 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
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] simnet: convert to net_device_ops
2008-12-10 6:57 ` David Miller
@ 2008-12-10 11:21 ` Alexander Beregalov
2008-12-10 23:25 ` David Miller
2008-12-10 11:54 ` Alexey Dobriyan
1 sibling, 1 reply; 8+ messages in thread
From: Alexander Beregalov @ 2008-12-10 11:21 UTC (permalink / raw)
To: David Miller; +Cc: adobriyan, linux-next, netdev, linux-ia64
[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]
2008/12/10 David Miller <davem@davemloft.net>:
> From: Alexey Dobriyan <adobriyan@gmail.com>
> Date: Tue, 9 Dec 2008 18:08:27 +0300
>
>> On Tue, Dec 09, 2008 at 05:11:17PM +0300, Alexander Beregalov wrote:
>> > 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
>>
>> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
>
> 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.
>
Thanks for explanation.
Is it better?
arch/ia64/hp/sim/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/ia64/hp/sim/Kconfig b/arch/ia64/hp/sim/Kconfig
index f92306b..8d513a8 100644
--- a/arch/ia64/hp/sim/Kconfig
+++ b/arch/ia64/hp/sim/Kconfig
@@ -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"
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: hp-sim-kconfig.patch --]
[-- Type: text/x-patch; name=hp-sim-kconfig.patch, Size: 417 bytes --]
arch/ia64/hp/sim/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/ia64/hp/sim/Kconfig b/arch/ia64/hp/sim/Kconfig
index f92306b..8d513a8 100644
--- a/arch/ia64/hp/sim/Kconfig
+++ b/arch/ia64/hp/sim/Kconfig
@@ -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"
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] simnet: convert to net_device_ops
2008-12-10 6:57 ` David Miller
2008-12-10 11:21 ` Alexander Beregalov
@ 2008-12-10 11:54 ` Alexey Dobriyan
1 sibling, 0 replies; 8+ messages in thread
From: Alexey Dobriyan @ 2008-12-10 11:54 UTC (permalink / raw)
To: David Miller; +Cc: a.beregalov, linux-next, netdev, linux-ia64
On Tue, Dec 09, 2008 at 10:57:28PM -0800, David Miller wrote:
> From: Alexey Dobriyan <adobriyan@gmail.com>
> Date: Tue, 9 Dec 2008 18:08:27 +0300
>
> > On Tue, Dec 09, 2008 at 05:11:17PM +0300, Alexander Beregalov wrote:
> > > 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
> >
> > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
>
> This doesn't explain the build failure.
I triggered it manually.
And most certainly forgot .ndo_validate_addr, so patch needs resend anyway.
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] simnet: convert to net_device_ops
2008-12-10 11:21 ` Alexander Beregalov
@ 2008-12-10 23:25 ` David Miller
0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2008-12-10 23:25 UTC (permalink / raw)
To: a.beregalov; +Cc: adobriyan, linux-next, netdev, linux-ia64
From: "Alexander Beregalov" <a.beregalov@gmail.com>
Date: Wed, 10 Dec 2008 14:21:46 +0300
> 2008/12/10 David Miller <davem@davemloft.net>:
> > From: Alexey Dobriyan <adobriyan@gmail.com>
> > Date: Tue, 9 Dec 2008 18:08:27 +0300
> >
> >> On Tue, Dec 09, 2008 at 05:11:17PM +0300, Alexander Beregalov wrote:
> >> > 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
> >>
> >> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> >
> > 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.
> >
>
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] simnet: convert to net_device_ops
2008-12-09 15:08 ` [PATCH] simnet: convert to net_device_ops Alexey Dobriyan
2008-12-10 6:57 ` David Miller
@ 2008-12-16 9:56 ` David Miller
1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2008-12-16 9:56 UTC (permalink / raw)
To: adobriyan; +Cc: a.beregalov, linux-next, netdev, linux-ia64
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Tue, 9 Dec 2008 18:08:27 +0300
> On Tue, Dec 09, 2008 at 05:11:17PM +0300, Alexander Beregalov wrote:
> > 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
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Now that the kconfig badness has been fixed, I've applied
this.
Thanks Alexey.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-12-16 9:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09 14:11 next-20081209: build problem at arch/ia64/hp/sim/simeth.c Alexander Beregalov
2008-12-09 15:08 ` [PATCH] simnet: convert to net_device_ops Alexey Dobriyan
2008-12-10 6:57 ` David Miller
2008-12-10 11:21 ` Alexander Beregalov
2008-12-10 23:25 ` David Miller
2008-12-10 11:54 ` Alexey Dobriyan
2008-12-16 9:56 ` David Miller
2008-12-10 6:41 ` next-20081209: build problem at arch/ia64/hp/sim/simeth.c David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).