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, 11 Nov 2014 15:21:46 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	brian@...ston-radar.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] net: phy: Correctly handle MII ioctl which changes
 autonegotiation.

From: Brian Hill <brian@...ston-radar.com>
Date: Tue, 11 Nov 2014 07:53:39 -0700

> 
> When advertised capabilities are changed with mii-tool, such as:
> mii-tool -A 10baseT
> the existing handler has two errors.
> 
> - An actual PHY register value is provided by mii-tool, and this
>   must be mapped to internal state with mii_adv_to_ethtool_adv_t().
> - The PHY state machine needs to be told that autonegotiation has
>   again been performed.  If not, the MAC will not be notified of
>   the new link speed and duplex, resulting in a possible config
>   mismatch.
> 
> Signed-off-by: Brian Hill <Brian@...ston-radar.com>
> Acked-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  drivers/net/phy/phy.c |   36 ++++++++++++++++++++++++------------
>  1 file changed, 24 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index c94e2a2..ee9f0c9 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -352,6 +352,7 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)
>  {
>  	struct mii_ioctl_data *mii_data = if_mii(ifr);
>  	u16 val = mii_data->val_in;
> +	int change_autoneg = 0;

As Florian asked, please use bool/true/false for 'change_autoneg'.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ