Re: [PATCHv3 2/7] ethtool: Call ethtool's get/set_settingscallbacks with cleaned data

From: Ben Hutchings
Date: Wed Apr 27 2011 - 22:04:14 EST


On Wed, 2011-04-27 at 18:27 -0700, David Decotigny wrote:
> This makes sure that when a driver calls the ethtool's
> get/set_settings() callback of another driver, the data passed to it
> is clean. This guarantees that speed_hi will be zeroed correctly if
> the called callback doesn't explicitely set it: we are sure we don't
> get a corrupted speed from the underlying driver. We also take care of
> setting the cmd field appropriately (ETHTOOL_GSET/SSET).
>
> This applies to dev_ethtool_get_settings(), which now makes sure it
> sets up that ethtool command parameter correctly before passing it to
> drivers. This also means that whoever calls dev_ethtool_get_settings()
> does not have to clean the ethtool command parameter. This function
> also becomes an exported symbol instead of an inline.
>
> All drivers visible to make allyesconfig under x86_64 have been
> updated.
>
> Signed-off-by: David Decotigny <decot@xxxxxxxxxx>
Reviewed-by: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>

--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/