netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] macb: Kconfig net device compat fixup
@ 2009-04-17  7:24 Ben Nizette
  2009-04-17  7:46 ` Haavard Skinnemoen
  2009-04-17  7:54 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Ben Nizette @ 2009-04-17  7:24 UTC (permalink / raw)
  To: Haavard Skinnemoen; +Cc: jgarzik, netdev, linux-kernel


The macb driver hasn't been updated to use net_device_ops and as such
should select COMPAT_NET_DEV_OPS to avoid build breakage.

Of course really macb should be updated but in the mean time, this at
least avoid randconfig problems.

Signed-off-by: Ben Nizette <bn@niasdigital.com>
---
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 9e7baec..dfe1254 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -221,6 +221,7 @@ config MACB
 	tristate "Atmel MACB support"
 	depends on AVR32 || ARCH_AT91SAM9260 || ARCH_AT91SAM9263 || ARCH_AT91SAM9G20 || ARCH_AT91CAP9
 	select PHYLIB
+	select COMPAT_NET_DEV_OPS
 	help
 	  The Atmel MACB ethernet interface is found on many AT32 and AT91
 	  parts. Say Y to include support for the MACB chip.



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] macb: Kconfig net device compat fixup
  2009-04-17  7:24 [PATCH] macb: Kconfig net device compat fixup Ben Nizette
@ 2009-04-17  7:46 ` Haavard Skinnemoen
  2009-04-17  8:33   ` Haavard Skinnemoen
  2009-04-17  7:54 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Haavard Skinnemoen @ 2009-04-17  7:46 UTC (permalink / raw)
  To: Ben Nizette; +Cc: Ferre, Nicolas, jgarzik, netdev, linux-kernel

Ben Nizette wrote:
> 
> The macb driver hasn't been updated to use net_device_ops and as such
> should select COMPAT_NET_DEV_OPS to avoid build breakage.

Hmmm...no other drivers do that...

> Of course really macb should be updated but in the mean time, this at
> least avoid randconfig problems.

It doesn't look all that difficult. Could you try the below instead?

Haavard

=============[cut here]=====================
From: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Date: Fri, 17 Apr 2009 09:43:14 +0200
Subject: [PATCH] macb: convert to net_device_ops

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
---
 drivers/net/macb.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index d473540..5656e02 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -1084,6 +1084,18 @@ static int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 	return phy_mii_ioctl(phydev, if_mii(rq), cmd);
 }
 
+static const struct net_device_ops macb_netdev_ops = {
+	.ndo_open		= macb_open,
+	.ndo_stop		= macb_close,
+	.ndo_start_xmit		= macb_start_xmit,
+	.ndo_get_stats		= macb_get_stats,
+	.ndo_set_multicast_list	= macb_set_rx_mode,
+	.ndo_do_ioctl		= macb_ioctl,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address	= eth_mac_addr,
+};
+
 static int __init macb_probe(struct platform_device *pdev)
 {
 	struct eth_platform_data *pdata;
@@ -1159,12 +1171,7 @@ static int __init macb_probe(struct platform_device *pdev)
 		goto err_out_iounmap;
 	}
 
-	dev->open = macb_open;
-	dev->stop = macb_close;
-	dev->hard_start_xmit = macb_start_xmit;
-	dev->get_stats = macb_get_stats;
-	dev->set_multicast_list = macb_set_rx_mode;
-	dev->do_ioctl = macb_ioctl;
+	dev->netdev_ops = &macb_netdev_ops;
 	netif_napi_add(dev, &bp->napi, macb_poll, 64);
 	dev->ethtool_ops = &macb_ethtool_ops;
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] macb: Kconfig net device compat fixup
  2009-04-17  7:24 [PATCH] macb: Kconfig net device compat fixup Ben Nizette
  2009-04-17  7:46 ` Haavard Skinnemoen
@ 2009-04-17  7:54 ` David Miller
  2009-04-17  9:11   ` Ben Nizette
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2009-04-17  7:54 UTC (permalink / raw)
  To: bn; +Cc: hskinnemoen, jgarzik, netdev, linux-kernel

From: Ben Nizette <bn@niasdigital.com>
Date: Fri, 17 Apr 2009 17:24:05 +1000

> The macb driver hasn't been updated to use net_device_ops and as such
> should select COMPAT_NET_DEV_OPS to avoid build breakage.
> 
> Of course really macb should be updated but in the mean time, this at
> least avoid randconfig problems.
> 
> Signed-off-by: Ben Nizette <bn@niasdigital.com>

There's about 26 drivers that fall into this category, it's senseless
to pepper the tree over with this kind of annotation that we'll just
release come next release.

We do have enough drivers converted that powerpc, sparc64, and x86
allmodconfig and allyesconfig builds pass even with the compat option
disabled.

And I think the others can just cope with this for now.

Actually, in the net-next-2.6 tree this driver has in fact been
converted :-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] macb: Kconfig net device compat fixup
  2009-04-17  7:46 ` Haavard Skinnemoen
@ 2009-04-17  8:33   ` Haavard Skinnemoen
  0 siblings, 0 replies; 5+ messages in thread
From: Haavard Skinnemoen @ 2009-04-17  8:33 UTC (permalink / raw)
  To: Ben Nizette; +Cc: Ferre, Nicolas, jgarzik, netdev, linux-kernel

Haavard Skinnemoen wrote:
> > Of course really macb should be updated but in the mean time, this at
> > least avoid randconfig problems.  
> 
> It doesn't look all that difficult. Could you try the below instead?

Better yet, try this one:

http://patchwork.ozlabs.org/patch/25861/

which is the one that has been applied to -next.

Haavard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] macb: Kconfig net device compat fixup
  2009-04-17  7:54 ` David Miller
@ 2009-04-17  9:11   ` Ben Nizette
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Nizette @ 2009-04-17  9:11 UTC (permalink / raw)
  To: David Miller; +Cc: hskinnemoen, jgarzik, netdev, linux-kernel

On Fri, 2009-04-17 at 00:54 -0700, David Miller wrote:

> Actually, in the net-next-2.6 tree this driver has in fact been
> converted :-)

Ah trufax, thx.
	--Ben.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-17  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17  7:24 [PATCH] macb: Kconfig net device compat fixup Ben Nizette
2009-04-17  7:46 ` Haavard Skinnemoen
2009-04-17  8:33   ` Haavard Skinnemoen
2009-04-17  7:54 ` David Miller
2009-04-17  9:11   ` Ben Nizette

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).