netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [r8169] About the "PHY reset until link up" warning
@ 2013-07-22 10:42 Peter Wu
  2013-07-22 21:43 ` Francois Romieu
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Wu @ 2013-07-22 10:42 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev, Realtek linux nic maintainers

Hi,

When a cable is not connected while an interface goes up, the "PHY reset until 
link up" warning is logged. Looking back in the history, this warning was 
added in:

commit a7154cb8326c6015b6c5d9ce482d2a1f4c268d99
Author: François Romieu <romieu@fr.zoreil.com>
Date:   Wed Jun 2 12:03:02 2004 -0400

    [PATCH] r8169: link handling and phy reset rework
    
    Link handling changes (Andy Lutomirski <luto@myrealbox.com>):
    - removed rtl8169_hw_phy_reset() and its busy loop;
    - RTL8169_PHY_TIMEOUT is x10 to account for the removal of the
      phy_link_down_cnt loop in rtl8169_phy_timer();
    - added spinlocking in timer context for rtl8169_phy_timer to avoid
      messing with the {set/get}_settings commands issued via ethtool;
    - more TBI stuff.
    
    This patch differs from the former version on the following points:
    - the LinkChg irq does not enable the phy timer when the link goes
      down any more;
    - the phy timer is not enabled in rtl8169_set_speed();
    - removal of the initial renegotiation hack.
(via git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git)

If this is a (hardware) bug workaround, can't it be restricted to that specific 
hardware or removed altogether (perhaps firmware / other updates fixed it 
already?). Otherwise, what about removing this debug message?

Manually running "ip link set eth1 down" brings the interface down and no 
resets are being attempted. Another way to stop resetting the interface is 
inserting a cable, wait for link up and remove it again. This presumably works 
because rtl8169_down() removes the reset timer.

Regards,
Peter

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [r8169] About the "PHY reset until link up" warning
  2013-07-22 10:42 [r8169] About the "PHY reset until link up" warning Peter Wu
@ 2013-07-22 21:43 ` Francois Romieu
  2013-07-22 21:48   ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Francois Romieu @ 2013-07-22 21:43 UTC (permalink / raw)
  To: Peter Wu; +Cc: netdev, Realtek linux nic maintainers

Peter Wu <lekensteyn@gmail.com> :
[...]
> If this is a (hardware) bug workaround, can't it be restricted to that
> specific hardware or removed altogether (perhaps firmware / other updates
> fixed it already?).

It tastes of QA nightmare. It can't be proven safe easily.

Link failure sucks. If nowhere else, I'll play safe, shamanic with the phy
and I want big pesky messages when something goes unusual.

> Otherwise, what about removing this debug message?

It can be disabled with the msglvl option of ethtool.

It should stop after a few seconds if runtime power management is enabled.

I can change my mind but I haven't seen much need for a policy change yet.

-- 
Ueimor

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [r8169] About the "PHY reset until link up" warning
  2013-07-22 21:43 ` Francois Romieu
@ 2013-07-22 21:48   ` David Miller
  2013-07-22 22:45     ` Francois Romieu
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2013-07-22 21:48 UTC (permalink / raw)
  To: romieu; +Cc: lekensteyn, netdev, nic_swsd

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Mon, 22 Jul 2013 23:43:58 +0200

> I can change my mind but I haven't seen much need for a policy
> change yet.

In every case where this issue has popped up, we have decided that
printing messages when the cable is simply unplugged is very
undesirable.

I used to print messages on link failure in all the early drivers I
wrote, it was a bad decision.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [r8169] About the "PHY reset until link up" warning
  2013-07-22 21:48   ` David Miller
@ 2013-07-22 22:45     ` Francois Romieu
  0 siblings, 0 replies; 4+ messages in thread
From: Francois Romieu @ 2013-07-22 22:45 UTC (permalink / raw)
  To: David Miller; +Cc: lekensteyn, netdev, nic_swsd

David Miller <davem@davemloft.net> :
> From: Francois Romieu <romieu@fr.zoreil.com>
[...]
> > I can change my mind but I haven't seen much need for a policy
> > change yet.
> 
> In every case where this issue has popped up, we have decided that
> printing messages when the cable is simply unplugged is very
> undesirable.

I could agree if there had not been any progress made with runtime
power management.

> I used to print messages on link failure in all the early drivers I
> wrote, it was a bad decision.

I know something is very wrong when it repeats itself a lot in a PR.

Feel free to take any message silenting patch if someone feels it
worth.

-- 
Ueimor

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-22 22:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-22 10:42 [r8169] About the "PHY reset until link up" warning Peter Wu
2013-07-22 21:43 ` Francois Romieu
2013-07-22 21:48   ` David Miller
2013-07-22 22:45     ` Francois Romieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).