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]
Message-ID: <f8802230-9e7d-a749-e787-ba80794f4e62@gmail.com>
Date:   Tue, 10 Jul 2018 21:32:01 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
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 02/10] r8169: use phy_resume/phy_suspend

On 10.07.2018 21:15, Andrew Lunn wrote:
>>  static void r8168_pll_power_down(struct rtl8169_private *tp)
>>  {
>>  	if (r8168_check_dash(tp))
>> @@ -4503,7 +4462,8 @@ static void r8168_pll_power_down(struct rtl8169_private *tp)
>>  	if (rtl_wol_pll_power_down(tp))
>>  		return;
>>  
>> -	r8168_phy_power_down(tp);
>> +	/* cover the case that PHY isn't connected */
>> +	phy_suspend(mdiobus_get_phy(tp->mii_bus, 0));
> 
> I don't particularly like this, because no other MAC driver does it.
> 
I have to agree, it doesn't look too nice.
In general quite few network drivers seem to use runtime pm.

> Why is it powered up, but not connected? Is it powered down before it
> is disconnected? Is it the bootloader which is powering it up?
> 
Exactly, if the device is active when driver is loaded and the
interface isn't used and therefore not brought up, then, when runtime-
suspending, we face this situation.

This could be changed by connecting the PHY in probe() already instead
of doing it in open(). I had this in the beginning, based on a
recommendation from Florian or you (don't remember) I changed this to
connect in open() only.

Do you have any preference or see a good way to deal with the situation?

Heiner

>    Andrew
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ