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:   Thu, 4 Oct 2018 17:22:37 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Quentin Schulz <quentin.schulz@...tlin.com>
Cc:     davem@...emloft.net, f.fainelli@...il.com,
        allan.nielsen@...rochip.com, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, thomas.petazzoni@...tlin.com,
        alexandre.belloni@...tlin.com,
        Raju Lakkaraju <Raju.Lakkaraju@...rosemi.com>
Subject: Re: [PATCH net-next v2 2/6] net: phy: mscc: add ethtool statistics
 counters

On Thu, Oct 04, 2018 at 02:47:24PM +0200, Quentin Schulz wrote:

Hi Quentin

> +static u64 vsc85xx_get_stat(struct phy_device *phydev, int i)
> +{
> +	struct vsc8531_private *priv = phydev->priv;
> +	int val, oldpage;
> +	u64 ret;
> +
> +	oldpage = phy_select_page(phydev, priv->hw_stats[i].page);
> +
> +	val = __phy_read(phydev, priv->hw_stats[i].reg);
> +	if (val < 0) {
> +		ret = U64_MAX;
> +		goto out;
> +	}

phy_read_paged() should work here as well.

> +
> +	val = val & priv->hw_stats[i].mask;
> +	priv->stats[i] += val;
> +	ret = priv->stats[i];

Otherwise this looks good.

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ