lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Jun 2012 17:42:27 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Giuseppe CAVALLARO <peppe.cavallaro@...com>
CC:	<netdev@...r.kernel.org>, <rayagond@...avyalabs.com>,
	<davem@...emloft.net>, <yuvalmin@...adcom.com>
Subject: Re: [net-next.git 4/4 (v4)] stmmac: add the Energy Efficient
 Ethernet support

On Tue, 2012-06-12 at 14:45 +0200, Giuseppe CAVALLARO wrote:
> This patch adds the Energy Efficient Ethernet support to the stmmac.
> 
> Please see the driver's documentation for further details about this support
> in the driver.
[...]
> +static int stmmac_ethtool_op_set_eee(struct net_device *dev,
> +				     struct ethtool_eee *edata)
> +{
> +	struct stmmac_priv *priv = netdev_priv(dev);
> +
> +	priv->eee_enabled = edata->eee_enabled;
> +
> +	if (!priv->eee_enabled)
> +		stmmac_disable_eee_mode(priv);
> +	else {
> +		/* We are asking for enabling the EEE but it is safe
> +		 * to verify all by invoking the eee_init function.
> +		 * In case of failure it will return an error.
> +		 */

It would be better if you could avoid changing any settings in the case
of failure, though.

> +		priv->tx_lpi_timer = edata->tx_lpi_timer;
> +		priv->eee_enabled = stmmac_eee_init(priv);
> +		if (!priv->eee_enabled)
> +			return -EPERM;
[...]

Surely -EOPNOTSUPP?

Ben.

-- 
Ben Hutchings, Staff 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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists