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:	Wed, 17 Feb 2016 15:49:45 -0800
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Andrew Lunn <andrew@...n.ch>, David Miller <davem@...emloft.net>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 2/2] phy: marvell: Add support for phy packet
 generator

On 17/02/2016 12:32, Andrew Lunn wrote:
> +static int marvell_pkt_gen(struct phy_device *phydev,
> +			   struct ethtool_phy_pkt_gen *pkt_gen)
> +{
> +	int err, oldpage, reg, max_loop = 100;
> +	u32 phy_id = phydev->drv->phy_id;
> +	bool has_ipg = false;

[snip]


> +
> +	do {
> +		usleep_range(3000, 4000);
> +		reg = phy_read(phydev, MII_88E1540_PKT_GEN);
> +	} while (max_loop-- && (reg & MII_88E1540_PKT_GEN_ENABLE));
> +
> +	if (!max_loop)
> +		err = -ETIMEDOUT;

If I am a HW engineer trying to qualify a PHY after enabling the random
packet generator built into it, I might prefer a "start generation" and
"stop generation" (this echoes back to Ben's comments on the ethtool
API) as opposed to calling the same function multiple times, because the
duration will vary based on link speed, and potentially models of PHYs too.
--
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ