Subject: Re: [PATCH] net: fix ethtool->set_flags not intended -EINVAL return value

From: Stanislaw Gruszka <[email-masked]>
Date: Mon, 28 Mar 2011 16:48:37 +0200

On Mon, Mar 28, 2011 at 09:21:57AM -0500, Jon Mason wrote:
> > -	if (data & ~ETH_FLAG_RXHASH)
> > -		return -EOPNOTSUPP;
> > +	if (ethtool_invalid_flags(dev, data, ETH_FLAG_RXHASH))
> > +		return -EINVAL;
> 
> The return code value is being changed, which is not relevant to this
> patch.  Perhaps a secondary patch should be created to make all driver
> set_flags calls return EOPNOTSUPP for unsupported flag setting.

Linux network developers agree some time ago that EINVAL should be used
in this case.

Stanislaw