2011-03-19 12:48:06

by Piotr Hosowicz

[permalink] [raw]
Subject: No networking since git3

Hello,

I wrote lately, the problem persists, that's why I write again. I tested
git7 just now and it still does not work.

What are the the symptoms? Straight after booting (Debian 6) mii-tool
shows no link for the NICs. I attach ethtool eth0 output from this
moment, also a good boot with git3 marked as GOOD. I attach also lspci
output, with -vv and with no options.

I tried to bisect the kernel from Linus GIT, but the more I tried the
less I understood. Desperately I riped mii.c and r8169.c from git3,
packed into git6 kernel, built to see that this does not work either.

Please, help.

Regards,

Piotr Hosowicz
--
"[Oleksy] dotkn?? naszych dom?w, naszych ?on, naszych dzieci,
naszych ps?w, naszych ?WINEK MORSKICH, on po prostu wkroczy?
swoim g?upim gadaniem w sfer? prywatn?, kt?ra musi by? chro-
niona dla dobra ka?dego z nas" - powiedzia? Kwa?niewski.
NP: Banda Do Sol - Tempo
NB: 2.6.38-git3


Attachments:
eth0.et.BAD.txt (555.00 B)
eth0.et.GOOD.txt (887.00 B)
lspci.txt (2.15 kB)
lspci-vv.txt (32.23 kB)
Download all attachments

2011-03-19 12:56:51

by Anca Emanuel

[permalink] [raw]
Subject: Re: No networking since git3

2011/3/19 Piotr Hosowicz <[email protected]>:
> Hello,
>
> I wrote lately, the problem persists, that's why I write again. I tested
> git7 just now and it still does not work.

Same problem here:

[ 12.923685] r8169 0000:04:00.0: eth0: link down
[ 12.923941] ADDRCONF(NETDEV_UP): eth0: link is not ready

dmesg attached.


Attachments:
39git7.txt (50.80 kB)

2011-03-19 13:05:05

by Piotr Hosowicz

[permalink] [raw]
Subject: Re: No networking since git3

On 19.03.2011 13:56, Anca Emanuel wrote:
> 2011/3/19 Piotr Hosowicz<[email protected]>:
>> Hello,
>>
>> I wrote lately, the problem persists, that's why I write again. I tested
>> git7 just now and it still does not work.
>
> Same problem here:
>
> [ 12.923685] r8169 0000:04:00.0: eth0: link down
> [ 12.923941] ADDRCONF(NETDEV_UP): eth0: link is not ready
>
> dmesg attached.

Nice to hear that I am not the only person with this problem. I forgot
about the dmesg.

Regards,

Piotr Hosowicz

--
- Jasiu, jakie jest najszybsze zwierze na swiecie?
- Gepard, pszepani.
- A najszybszy ptak?
- Ptak geparda.
NP: Banda Do Sol - Fabito
NB: 2.6.38-git3

2011-03-19 14:08:20

by Anca Emanuel

[permalink] [raw]
Subject: Re: No networking since git3

2011/3/19 Piotr Hosowicz <[email protected]>:
> On 19.03.2011 13:56, Anca Emanuel wrote:
>>
>> 2011/3/19 Piotr Hosowicz<[email protected]>:
>>>
>>> Hello,
>>>
>>> I wrote lately, the problem persists, that's why I write again. I tested
>>> git7 just now and it still does not work.
>>
>> Same problem here:
>>
>> [ ? 12.923685] r8169 0000:04:00.0: eth0: link down
>> [ ? 12.923941] ADDRCONF(NETDEV_UP): eth0: link is not ready
>>
>> dmesg attached.
>
> Nice to hear that I am not the only person with this problem. I forgot about
> the dmesg.
>
> Regards,
>
> Piotr Hosowicz

Added CCs

2011-03-19 14:42:04

by Piotr Hosowicz

[permalink] [raw]
Subject: Re: No networking since git3

On 19.03.2011 13:41, Piotr Hosowicz wrote:
> Hello,
>
> I wrote lately, the problem persists, that's why I write again. I tested
> git7 just now and it still does not work.
>
> What are the the symptoms? Straight after booting (Debian 6) mii-tool
> shows no link for the NICs. I attach ethtool eth0 output from this
> moment, also a good boot with git3 marked as GOOD. I attach also lspci
> output, with -vv and with no options.

I attach my dmesgs now. BAD (still) is for git8, GOOD is for git3.

Regards,

Piotr Hosowicz

--
Miss World 2006: Jestem szcz??liwa, ?e mog? wspaniale uczestniczy? w
prze?yciu najpi?kniejszych kobiet tutaj w Warszawie, gdzie Jan Pawe? II,
papie?, w Polsce, sk?d pochodzi. Spotka?am si? z Ko?cio?em Mariackim
w Krakowie, kt?ry ciep?o ludzi i wielka przyja??. Po?owa mojego serca
zostanie w Polsce, a druga po?owa pojedzie ze mn? do mojego kraju.
NP: Big Big Train - Master James Of St George
NB: 2.6.38-git3


Attachments:
dmesg.BAD.txt (85.91 kB)
dmesg.GOOD.txt (85.87 kB)
Download all attachments

2011-03-19 15:18:59

by Eric Dumazet

[permalink] [raw]
Subject: Re: No networking since git3

Le samedi 19 mars 2011 à 16:08 +0200, Anca Emanuel a écrit :
> 2011/3/19 Piotr Hosowicz <[email protected]>:
> > On 19.03.2011 13:56, Anca Emanuel wrote:
> >>
> >> 2011/3/19 Piotr Hosowicz<[email protected]>:
> >>>
> >>> Hello,
> >>>
> >>> I wrote lately, the problem persists, that's why I write again. I tested
> >>> git7 just now and it still does not work.
> >>
> >> Same problem here:
> >>
> >> [ 12.923685] r8169 0000:04:00.0: eth0: link down
> >> [ 12.923941] ADDRCONF(NETDEV_UP): eth0: link is not ready
> >>
> >> dmesg attached.
> >
> > Nice to hear that I am not the only person with this problem. I forgot about
> > the dmesg.
> >
> > Regards,
> >
> > Piotr Hosowicz
>
> Added CCs

Hi

Problem comes from commit 54405cde762408b00a445466a40da4f7f33a8479
(r8169: support control of advertising.)

Reverting it brings back NIC for me


2011-03-19 15:30:35

by Oliver Neukum

[permalink] [raw]
Subject: Re: No networking since git3

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

2011-03-19 15:33:55

by Eric Dumazet

[permalink] [raw]
Subject: Re: No networking since git3

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.

2011-03-19 15:39:19

by Eric Dumazet

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

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 <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Oliver Neukum <[email protected]>
Cc: Francois Romieu <[email protected]>
---
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");

2011-03-19 15:41:07

by Oliver Neukum

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

Am Samstag, 19. März 2011, 16:39:11 schrieben Sie:
> 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()

Thank you. I feel like banging my head against something.

Regards
Oliver

2011-03-19 15:44:10

by Eric Dumazet

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

Le samedi 19 mars 2011 à 16:41 +0100, Oliver Neukum a écrit :

> Thank you. I feel like banging my head against something.
>

Well, it happens, dont worry ;)

2011-03-19 15:52:19

by Piotr Hosowicz

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

On 19.03.2011 16:41, Oliver Neukum wrote:
> Am Samstag, 19. März 2011, 16:39:11 schrieben Sie:
>> 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()
>
> Thank you. I feel like banging my head against something.

If it will work I will be banging against the wall. I am missing for a
fresh new kernel with networking.

--
Szef TVN24 do dziennikarzy: Kochani, przez dwa lata waliliśmy w obóz
rządzący. Tak dalej byc nie może. Jesteśmy telewizją niezależną i to
zobowiązuje. Teraz będziemy kopać w opozycję.
NP: Big Big Train - Victorian Brickwork
NB: 2.6.38-git3

2011-03-19 16:04:23

by Eric Dumazet

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

Le samedi 19 mars 2011 à 16:49 +0100, Piotr Hosowicz a écrit :

> I do not understand. I reverted the commit you mentioned and am building
> now. Will it suffice?
>

Either you

1) Revert the commit

OR

2) apply my patch


;)

2011-03-19 16:16:37

by Piotr Hosowicz

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

On 19.03.2011 16:39, Eric Dumazet wrote:
> 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.

I do not understand. I reverted the commit you mentioned and am building
now. Will it suffice?

Regards,

Piotr Hosowicz

--
TV: "W tej chwili, że się tak wyrażę, zaliczonych mamy 17 zawodniczek."
NP: Big Big Train - Victorian Brickwork
NB: 2.6.38-git3

2011-03-19 16:27:14

by Piotr Hosowicz

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

On 19.03.2011 17:04, Eric Dumazet wrote:
> Le samedi 19 mars 2011 à 16:49 +0100, Piotr Hosowicz a écrit :
>
>> I do not understand. I reverted the commit you mentioned and am building
>> now. Will it suffice?
>>
>
> Either you
>
> 1) Revert the commit

OK. This is what I've done and everything is OK, net works as usual. But
what should I do next? Will the revert be done on the GIT server? And
when? I try not to clone to much and wastefuly. And am new to GIT so
sorry for the question.

>
> OR
>
> 2) apply my patch

Regards and thanks,

Piotr Hosowicz

--
Jest jedna korzyść z posiadania TV - jak dobrze
rozregulujesz odbiornik, trafisz na promieniowanie
mikrofalowe z początków Wszechświata.
NP: Big Big Train - Master James Of St George
NB: 2.6.38-20110319-1638-net+

2011-03-19 16:30:30

by Piotr Hosowicz

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

On 19.03.2011 16:39, Eric Dumazet wrote:
> 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.

I do not understand. I reverted the commit you mentioned and am building
now. Will it suffice?

Regards,

Piotr Hosowicz

--
TV: "W tej chwili, że się tak wyrażę, zaliczonych mamy 17 zawodniczek."
NP: Big Big Train - Victorian Brickwork
NB: 2.6.38-git3

2011-03-19 16:38:11

by Anca Emanuel

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

On Sat, Mar 19, 2011 at 6:27 PM, Piotr Hosowicz <[email protected]> wrote:
> On 19.03.2011 17:04, Eric Dumazet wrote:
>>
>> Le samedi 19 mars 2011 ? 16:49 +0100, Piotr Hosowicz a ?crit :
>>
>>> I do not understand. I reverted the commit you mentioned and am building
>>> now. Will it suffice?
>>>
>>
>> Either you
>>
>> 1) Revert the commit
>
> OK. This is what I've done and everything is OK, net works as usual. But
> what should I do next? Will the revert be done on the GIT server? And when?
> I try not to clone to much and wastefuly. And am new to GIT so sorry for the
> question.

Next: Test Eric's patch, and send and email with Tested-by tag.

2011-03-19 16:42:06

by Eric Dumazet

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

Le samedi 19 mars 2011 à 18:38 +0200, Anca Emanuel a écrit :

> Next: Test Eric's patch, and send and email with Tested-by tag.

Well, my patch was actually tested on one of my machines ;)


2011-03-19 17:03:49

by Piotr Hosowicz

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

On 19.03.2011 17:38, Anca Emanuel wrote:
> On Sat, Mar 19, 2011 at 6:27 PM, Piotr Hosowicz<[email protected]> wrote:
>> On 19.03.2011 17:04, Eric Dumazet wrote:
>>>
>>> Le samedi 19 mars 2011 à 16:49 +0100, Piotr Hosowicz a écrit :
>>>
>>>> I do not understand. I reverted the commit you mentioned and am building
>>>> now. Will it suffice?
>>>>
>>>
>>> Either you
>>>
>>> 1) Revert the commit
>>
>> OK. This is what I've done and everything is OK, net works as usual. But
>> what should I do next? Will the revert be done on the GIT server? And when?
>> I try not to clone to much and wastefuly. And am new to GIT so sorry for the
>> question.
>
> Next: Test Eric's patch, and send and email with Tested-by tag.

I just built the kernel with the commit reverted as Eric said in the
beginning and it works. Should I build again with patching in place of
reverting and report it? Is the method same as ordinary patching?

Regards,

Piotr Hosowicz

--
Sygnaturka utworzona wyłącznie ze zrecyklingowanych literek
najwyższej jakości poddanych procesowi starannej selekcji.
NP: Big Big Train - The Underfall Yard
NB: 2.6.38-20110319-1638-net+

2011-03-19 17:20:14

by Anca Emanuel

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

On Sat, Mar 19, 2011 at 5:39 PM, Eric Dumazet <[email protected]> wrote:
> 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 <[email protected]>
> Signed-off-by: Eric Dumazet <[email protected]>
> Cc: Oliver Neukum <[email protected]>
> Cc: Francois Romieu <[email protected]>
> ---
> ?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");
>
>
>

Thanks Eric, It Woks now !

My r8169 was not working see:
https://lkml.org/lkml/2011/3/19/19

Tested-by: Anca Emanuel <[email protected]>

2011-03-19 18:59:14

by Piotr Hosowicz

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

On 19.03.2011 16:39, Eric Dumazet wrote:
> 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<[email protected]>
> Signed-off-by: Eric Dumazet<[email protected]>
> Cc: Oliver Neukum<[email protected]>
> Cc: Francois Romieu<[email protected]>

Tested-by: Piotr Hosowicz<[email protected]>

Works OK now.

Regards,

Piotr Hosowicz

--
Parafrazując Einsteina: w socjaliźmie są dwa zawody z przy-
szłością: piekarz i urzędnik, chociaż co do pierwszego to
nie mam pewności. (by Kubarek, http://blog.kubarek.info/)
NP: Karmakanic - Send a message from the heart
NB: 2.6.38-20110319-1638-net++

2011-03-19 19:46:53

by Francois Romieu

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

Hayes Cced.

Oliver Neukum <[email protected]> :
[wrong operator priority fixed by Eric]
> Thank you. I feel like banging my head against something.

Spare your walls : I added the test and I was quite satisfied
after testing ... with an always gigabit capable peer :o/

--
Ueimor

2011-03-19 20:38:04

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] r8169: fix a bug in rtl8169_init_phy()

From: Eric Dumazet <[email protected]>
Date: Sat, 19 Mar 2011 16:39:11 +0100

> [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 <[email protected]>
> Signed-off-by: Eric Dumazet <[email protected]>

Applied to net-2.6, thanks Eric.

Linus, this is definitely the bug you were seeing too.

> Cc: Oliver Neukum <[email protected]>
> Cc: Francois Romieu <[email protected]>
> ---
> 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");
>
>