r8169: Deny functions membet of array rtl_work
PATCH 1/1 r8169: Deny functions membet of array rtl_work
Deny functions member of array rtl_work to run when link is
ok.After rtl8169_init_phy exist 10 sec timeout.On many cases link is ok and no need to destroy all work.
drivers/net/ethernet/realtek/r8169.c +7 -3
@@ -4377,17 +4377,17 @@ static void rtl_phy_work(struct rtl8169_private *tp)assert (tp->mac_version >RTL_GIGA_MAC_VER_01 ); +if (tp->link_ok (ioaddr)) +return ; +if (tp->phy_reset_pending (tp)) {/* * A busy loop could burn quite a few cycles on nowadays CPU. * Let's delay the execution of the timer for a few ticks. */ - timeout =HZ /10 ; goto out_mod_timer; } -if (tp->link_ok (ioaddr)) -return ;netif_dbg (tp, link, tp->dev,"PHY reset until link up\n" );
@@ -6890,8 +6890,12 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)static void rtl_reset_work (struct rtl8169_private *tp) {struct net_device *dev = tp->dev; +void __iomem *ioaddr = tp->mmio_addr;int i; +if (tp->link_ok (ioaddr)) +return ; +napi_disable (&tp->napi);netif_stop_queue (dev);synchronize_sched ();
Signature · 1 line
2.1.4
Corcodel Marian <[email protected]> :
Quoted 3 lines
Deny functions member of array
rtl_workto run when link is ok.Afterrtl8169_init_phyexist 10 sec timeout.On many cases link is ok and no need to destroy all work.
I won't figure what happens outside of the "many cases" statement.
rtl_reset_work is a hard reset. It isn't supposed to go shopping just because the link seems to be established. Moreover you don't explain why you need to vandalize rtl_phy_work (unrelated to any 10 sec timeout).
As usual nobody knows how it was tested (suspend/resume, change location and port, etc.).
Please don't send me private only e-mail.
Signature · 1 line
Ueimor
A message that is not in the archive (sent off-list or not yet received): CAGg4U=HQwGhQ95+FNumjLOH0m5Bnm8-3kOgfbMUGOV=Lzsyd6A@mail.gmail.com
Marian Corcodel <[email protected]> :
Quoted 5 lines
Late may add another exceptions . Hard reset is also on close function and probe function not need to be present after
link ok.rtl_reset_work figure like mirror onrtl_openwith small exceptions.2015-08-29 14:26 GMT+03:00 Francois Romieu <[email protected]>:
[...]
Quoted 1 line
Quoted 1 line
Please don't send me private only e-mail.
$ cat >> ~/.procmailrc<<EOD
:0:
* From.*[email protected]/dev/null
EOD
Messages that make their way through mailing-lists will proceed normally.
Signature · 1 line
Ueimor