* [PATCH, net-next] r8169: Deny functions membet of array rtl_work
@ 2015-08-29 10:43 Corcodel Marian
2015-08-29 11:26 ` Francois Romieu
0 siblings, 1 reply; 3+ messages in thread
From: Corcodel Marian @ 2015-08-29 10:43 UTC (permalink / raw)
To: netdev; +Cc: Corcodel Marian
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.
Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 2d712a4..fc2fe38 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -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();
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH, net-next] r8169: Deny functions membet of array rtl_work
2015-08-29 10:43 [PATCH, net-next] r8169: Deny functions membet of array rtl_work Corcodel Marian
@ 2015-08-29 11:26 ` Francois Romieu
[not found] ` <CAGg4U=HQwGhQ95+FNumjLOH0m5Bnm8-3kOgfbMUGOV=Lzsyd6A@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Francois Romieu @ 2015-08-29 11:26 UTC (permalink / raw)
To: Corcodel Marian; +Cc: netdev
Corcodel Marian <corcodel.marian@gmail.com> :
> 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.
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.
--
Ueimor
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, net-next] r8169: Deny functions membet of array rtl_work
[not found] ` <CAGg4U=HQwGhQ95+FNumjLOH0m5Bnm8-3kOgfbMUGOV=Lzsyd6A@mail.gmail.com>
@ 2015-08-30 8:13 ` Francois Romieu
0 siblings, 0 replies; 3+ messages in thread
From: Francois Romieu @ 2015-08-30 8:13 UTC (permalink / raw)
To: Marian Corcodel; +Cc: netdev
Marian Corcodel <corcodel.marian@gmail.com> :
> 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 on rtl_open with small exceptions.
>
> 2015-08-29 14:26 GMT+03:00 Francois Romieu <romieu@fr.zoreil.com>:
[...]
> > Please don't send me private only e-mail.
$ cat >> ~/.procmailrc<<EOD
:0:
* From.*corcodel.marian@gmail.com
/dev/null
EOD
Messages that make their way through mailing-lists will proceed normally.
--
Ueimor
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-30 8:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-29 10:43 [PATCH, net-next] r8169: Deny functions membet of array rtl_work Corcodel Marian
2015-08-29 11:26 ` Francois Romieu
[not found] ` <CAGg4U=HQwGhQ95+FNumjLOH0m5Bnm8-3kOgfbMUGOV=Lzsyd6A@mail.gmail.com>
2015-08-30 8:13 ` Francois Romieu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox