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, 10 Jul 2018 22:44:07 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Realtek linux nic maintainers <nic_swsd@...ltek.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 07/10] r8169: migrate speed_down function to
 phylib

>  static void rtl_speed_down(struct rtl8169_private *tp)
>  {
> -	u32 adv;
> -	int lpa;
> +	struct phy_device *phydev = tp->dev->phydev;
> +	u32 adv = phydev->lp_advertising & phydev->supported;
>  
> -	rtl_writephy(tp, 0x1f, 0x0000);
> -	lpa = rtl_readphy(tp, MII_LPA);
> +	if (adv & BASET10)
> +		phydev->advertising &= ~(BASET100 | BASET1000);
> +	else if (adv & BASET100)
> +		phydev->advertising &= ~BASET1000;

Please use phy_set_max_speed(). We need MAC drivers to stop directly
accessing phydev members. Otherwise we are going to have problems
supporting 2.5G PHYs.

	   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ