Re: weird realtek gigabit ethernet issue

From: Giangiacomo Mariotti
Date: Fri Dec 12 2008 - 04:21:07 EST


On Thu, Dec 11, 2008 at 11:00 PM, Francois Romieu <romieu@xxxxxxxxxxxxx> wrote:
> (Ccing l-k as it may be of wider interest)
>
> Giangiacomo Mariotti <giangiacomo.mariotti@xxxxxxxxx> :
>> 2008/12/11 Francois Romieu <romieu@xxxxxxxxxxxxx>:
>> > Giangiacomo Mariotti <giangiacomo.mariotti@xxxxxxxxx> :
>> > [...]
>> >> Dec 7 10:13:56 debian-hell kernel: [ 4.064402] eth0: RTL8169 at
>> >> 0xffffc2000062a000, 00:1f:d0:ae:41:0e, XID 281000c0 IRQ 1270
>> >> Dec 7 10:13:56 debian-hell kernel: [ 5.325793] eth1: RTL8169 at
>> >> 0xffffc20000630000, 00:1f:d0:ae:41:10, XID 281000c0 IRQ 1269
>> >> Dec 8 06:09:31 debian-hell kernel: [ 6.253241] eth0:
>> >> RTL8168d/8111d at 0xffffc2000064e000, 00:1f:d0:ae:41:0e, XID 281000c0
>> >> IRQ 1270
>> >> Dec 8 06:09:31 debian-hell kernel: [ 6.258123] eth1:
>> >> RTL8168d/8111d at 0xffffc20000652000, 00:1f:d0:ae:41:10, XID 281000c0
>> >> IRQ 1269
> [...]
>> On Dec 8, at 06, I booted 2.6.28-rc7, while on Dec 7, at 10, I booted
>> 2.6.26-1-amd64(debian, based on 2.6.26.8). I can't find any log for
>> 2.6.27.8.
>
> Ok. Looking at your logs and at the r8169.c code, here is the story.
>
> 1. On December 7, the r8169.c driver identifies your network card as an
> (old) "RTL8169" i.e. RTL_GIGA_MAC_VER_01 in r8169.c. This is the default
> choice when there is no specific match for the XID. You can check this
> in r8169.c::rtl8169_get_mac_version. Below RTL_GIGA_MAC_VER_06, the
> driver assumes that the device includes a "RxMissed" register (see
> r8169.c::rtl8169_rx_missed). This assumption is false for your device
> - as it is on nearly all new 816x flavors nowadays - and you will
> experience a broken rx missed counter in ifconfig's output.
>
> 2. On December 8, the r8169 driver identifies your network card as a more
> modern "RTL8168d/8111d" i.e. RTL_GIGA_MAC_VER_25. As far as I know, it
> should be the adequate choice given the XID. r8169.c::rtl8169_rx_missed
> will not try to access the non-existant RxMissed register and your
> stats should be fine.
>
> While the fix for the RxMissed register access is in the stable branch,
> it is useless if the adapter is (mis-)detected as an old RTL8169.
>
> So, currently, your rx missed counters should be broken on anything
> older than 2.6.28-rc1. If they were vanilla kernel (I have not checked
> the content of Debian's kernel), Dec 7 should be broken and Dec 8 should
> be ok.
>
> Does the explanation above match your observations ?
>
Yes.

> Btw I should probably push new RTL_GIGA_MAC_VER_XX into -stable.
>
> --
> Ueimor
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/