> From: Ben Hutchings [mailto:bhutchings@solarflare.com]Hi Ben, I'm not suggesting nuking ethtool_ops::get_flags. What I was suggesting is *always* calling ethtool_ops_get_flags from dev_ethtool for case ETHTOOL_GFLAGS, but doing something like this simple patch: diff --git a/net/core/ethtool.c b/net/core/ethtool.c index a0f4964..f5da6ed 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -139,8 +139,9 @@ u32 ethtool_op_get_flags(struct net_device *dev) * handling for flags which are not so easily handled * by a simple masking operation */ - - return dev->features & flags_dup_features; + return (dev->ethtool_ops->get_flags ? + dev->ethtool_ops->get_flags(dev) : + dev->features) & flags_dup_features; } EXPORT_SYMBOL(ethtool_op_get_flags); @@ -1495,9 +1496,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) break; case ETHTOOL_GFLAGS: rc = ethtool_get_value(dev, useraddr, ethcmd, - (dev->ethtool_ops->get_flags ? - dev->ethtool_ops->get_flags : - ethtool_op_get_flags)); + ethtool_op_get_flags); break; case ETHTOOL_SFLAGS: rc = ethtool_set_value(dev, useraddr, Plus nuking all such code in the netdev drivers: .get_flags = ethtool_op_get_flags, This is still pretty fragile and could lead to infinite recursion if some drivers are missed. But you get the idea. Thanks - Bhavesh -- 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
| Greg KH | Og dreams of kernels |
| Jens Axboe | [PATCH 31/33] Fusion: sg chaining support |
| Arnd Bergmann | Re: finding your own dead "CONFIG_" variables |
| Mark Brown | [PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset |
| Tony Breeds | [LGUEST] Look in object dir for .config |
git: | |
| Brian Downing | Re: Git in a Nutshell guide |
| John Benes | Re: master has some toys |
| Matthias Lederhofer | [PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree |
| Alexander Sulfrian | [RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set |
| Junio C Hamano | Re: Rss produced by git is not valid xml? |
| Linux Kernel Mailing List | iSeries: fix section mismatch in iseries_veth |
| Linux Kernel Mailing List | ixbge: remove TX lock and redo TX accounting. |
| Linux Kernel Mailing List | ixgbe: fix several counter register errata |
| Linux Kernel Mailing List | b43: fix build with CONFIG_SSB_PCIHOST=n |
| Linux Kernel Mailing List |
