From: Francois Romieu <romieu@fr.zoreil.com>
To: Chunhao Lin <hau@realtek.com>
Cc: netdev@vger.kernel.org, nic_swsd@realtek.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] r8169:Remove unnecessary phy reset for pcie nic when setting link spped.
Date: Wed, 9 Mar 2016 00:48:55 +0100 [thread overview]
Message-ID: <20160308234855.GA6182@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1457427065-3699-1-git-send-email-hau@realtek.com>
Chunhao Lin <hau@realtek.com> :
> For pcie nic, after setting link speed and thers is no link driver does not need
> to do phy reset untill link up.
>
> For some pcie nics, to do this will also reset phy speed down counter and prevent
> phy from auto speed down.
>
> This patch fix the issue reported in following link.
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1547151
>
> Signed-off-by: Chunhao Lin <hau@realtek.com>
> ---
> drivers/net/ethernet/realtek/r8169.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index dd2cf37..94f08f1 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -1999,7 +1999,8 @@ static int rtl8169_set_speed(struct net_device *dev,
> goto out;
>
> if (netif_running(dev) && (autoneg == AUTONEG_ENABLE) &&
> - (advertising & ADVERTISED_1000baseT_Full)) {
> + (advertising & ADVERTISED_1000baseT_Full) &&
> + !pci_is_pcie(tp->pci_dev)) {
> mod_timer(&tp->timer, jiffies + RTL8169_PHY_TIMEOUT);
> }
> out:
Can you clarify:
- actually this patch does not care about the link at all. So when there's
link no phy reset is needed either, right ?
- does "this" in "to do this" means that
1. phy reset prevents phy from auto speed down
2. avoiding phy reset prevents phy from auto speed down
I would expect 1. from the rtl_wol_pll_power_down + rtl_speed_down +
rtl8169_set_speed combo (i.e. we want the driver to allow auto speed down)
but it's a bit ambiguous.
--
Ueimor
next prev parent reply other threads:[~2016-03-08 23:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 8:51 Chunhao Lin
2016-03-08 23:48 ` Francois Romieu [this message]
2016-03-09 16:48 ` Hau
2016-03-09 21:44 ` Francois Romieu
2016-03-10 21:18 ` David Miller
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=20160308234855.GA6182@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=hau@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®