All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>, Andrew Lunn <andrew@lunn.ch>
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/2] net: phy: add phy_speed_down and phy_speed_up
Date: Thu, 12 Jul 2018 12:53:01 -0700	[thread overview]
Message-ID: <65c83e10-e819-85d7-7c4e-db74098345fd@gmail.com> (raw)
In-Reply-To: <1ddf575d-b894-e20c-b9af-016021eaf33e@gmail.com>



On 07/12/2018 12:25 PM, Florian Fainelli wrote:
> 
> 
> On 07/12/2018 12:10 PM, Heiner Kallweit wrote:
>> On 12.07.2018 21:09, Andrew Lunn wrote:
>>>> Like r8169 also tg3 driver doesn't wait for the speed-down-renegotiation
>>>> to finish. Therefore, even though I share Andrew's concerns, there seem
>>>> to be chips where it's safe to not wait for the renegotiation to finish
>>>> (e.g. because device is in PCI D3 already and can't generate an interrupt).
>>>> Having said that I'd keep the sync parameter for phy_speed_down so that
>>>> the driver can decide.
>>>
>>> Hi Heiner
>>>
>>> Please put a big fat comment about the dangers of sync=false in the
>>> function header. We want people to known it is dangerous by default,
>>> and should only be used in special conditions, when it is known to be
>>> safe.
>>> 	Andrew
>>>
>> OK ..
> 
> What part do you find dangerous? Magic Packets are UDP packets and they
> are not routed (unless specifically taken care of) so there is already
> some "lossy" behavior involved with waking-up an Ethernet MAC, I don't
> think that is too bad to retry several times until the link comes up.

I see the concern with the comment from v2, and indeed you could get an
interrupt signaling the PHY auto-negotiated the link before or at the
time we are suspending causing potentially an early wake-up. Not that
this should be a problem though since there is usually a point of not
return past which you can't do early wake-up anyway.
-- 
Florian

  reply	other threads:[~2018-07-12 20:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 20:29 [PATCH net-next 0/2] net: phy: add functionality to speed down PHY when waiting for WoL packet Heiner Kallweit
2018-07-11 20:30 ` [PATCH net-next 1/2] net: phy: add helper phy_config_aneg Heiner Kallweit
2018-07-11 20:38   ` Andrew Lunn
2018-07-11 21:04   ` Florian Fainelli
2018-07-11 20:31 ` [PATCH net-next 2/2] net: phy: add phy_speed_down and phy_speed_up Heiner Kallweit
2018-07-11 20:55   ` Andrew Lunn
2018-07-11 21:08     ` Heiner Kallweit
2018-07-11 21:33       ` Florian Fainelli
2018-07-11 21:59         ` Heiner Kallweit
2018-07-12 19:00           ` Heiner Kallweit
2018-07-12 19:09             ` Andrew Lunn
2018-07-12 19:10               ` Heiner Kallweit
2018-07-12 19:25                 ` Florian Fainelli
2018-07-12 19:53                   ` Florian Fainelli [this message]
2018-07-12 20:01                     ` Heiner Kallweit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65c83e10-e819-85d7-7c4e-db74098345fd@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.