Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Oliver Neukum <oliver@neukum.org>
Cc: Anca Emanuel <anca.emanuel@gmail.com>,
	piotr@hosowicz.com, LKML <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org, Francois Romieu <romieu@fr.zoreil.com>,
	David Miller <davem@davemloft.net>
Subject: [PATCH] r8169: fix a bug in rtl8169_init_phy()
Date: Sat, 19 Mar 2011 16:39:11 +0100	[thread overview]
Message-ID: <1300549151.2831.32.camel@edumazet-laptop> (raw)
In-Reply-To: <1300548821.2831.28.camel@edumazet-laptop>

Le samedi 19 mars 2011 à 16:33 +0100, Eric Dumazet a écrit :
> Le samedi 19 mars 2011 à 16:31 +0100, Oliver Neukum a écrit :
> > Am Samstag, 19. März 2011, 16:18:50 schrieb Eric Dumazet:
> > 
> > > Problem comes from commit 54405cde762408b00a445466a40da4f7f33a8479
> > > (r8169: support control of advertising.)
> > > 
> > > Reverting it brings back NIC for me
> > 
> > Odd. It worked for me. Are you testing on a gigabit switch? Could you send
> > me dmesg? Does it work if you use ethtool to advertise a lower speed?
> > 
> > 	Regards
> > 		Oliver
> 
> I found the bug, I am sending a patch in two minutes.
> 

Here it is

[PATCH] r8169: fix a bug in rtl8169_init_phy()

commit 54405cde7624 (r8169: support control of advertising.)
introduced a bug in rtl8169_init_phy()

Reported-by: Piotr Hosowicz <piotr@hosowicz.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: Francois Romieu <romieu@fr.zoreil.com>
---
 drivers/net/r8169.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 5e40351..493b0de 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2685,9 +2685,9 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
 	rtl8169_set_speed(dev, AUTONEG_ENABLE, SPEED_1000, DUPLEX_FULL,
 		ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full |
 		ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full |
-		tp->mii.supports_gmii ?
+		(tp->mii.supports_gmii ?
 			ADVERTISED_1000baseT_Half |
-			ADVERTISED_1000baseT_Full : 0);
+			ADVERTISED_1000baseT_Full : 0));
 
 	if (RTL_R8(PHYstatus) & TBI_Enable)
 		netif_info(tp, link, dev, "TBI auto-negotiating\n");

  reply	other threads:[~2011-03-19 15:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4D84A46B.1000407@example.com>
     [not found] ` <AANLkTi=qrK2L+MA5F5fQ6S76LLPXkYhyLg7JL4_vrkRe@mail.gmail.com>
     [not found]   ` <4D84A9F6.8080402@example.com>
2011-03-19 14:08     ` No networking since git3 Anca Emanuel
2011-03-19 15:18       ` Eric Dumazet
2011-03-19 15:31         ` Oliver Neukum
2011-03-19 15:33           ` Eric Dumazet
2011-03-19 15:39             ` Eric Dumazet [this message]
2011-03-19 15:41               ` [PATCH] r8169: fix a bug in rtl8169_init_phy() Oliver Neukum
2011-03-19 15:44                 ` Eric Dumazet
2011-03-19 15:52                 ` Piotr Hosowicz
2011-03-19 19:41                 ` Francois Romieu
2011-03-19 15:49               ` Piotr Hosowicz
2011-03-19 16:04                 ` Eric Dumazet
2011-03-19 16:27                   ` Piotr Hosowicz
2011-03-19 16:38                     ` Anca Emanuel
2011-03-19 16:41                       ` Eric Dumazet
2011-03-19 17:03                       ` Piotr Hosowicz
2011-03-19 16:03               ` Piotr Hosowicz
2011-03-19 17:20               ` Anca Emanuel
2011-03-19 18:59               ` Piotr Hosowicz
2011-03-19 20:38               ` 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=1300549151.2831.32.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=anca.emanuel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=piotr@hosowicz.com \
    --cc=romieu@fr.zoreil.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