netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Gilberto Nunes <gilberto.nunes32@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Fwd: Problem with r8169 module
Date: Mon, 2 Nov 2020 17:50:16 +0100	[thread overview]
Message-ID: <4ee088b0-505b-8567-7af0-3ddd4cb1c778@gmail.com> (raw)
In-Reply-To: <CAOKSTBs6F=RWEWOv5OkLd25GsOk1c9Xf8yX6WSy_sKvLmdX86w@mail.gmail.com>

On 02.11.2020 17:29, Gilberto Nunes wrote:
>>From kernel 5.4
> 
> ethtool -d enp1s0f1
> RealTek RTL8411 registers:
> --------------------------------------------------------
> 0x00: MAC Address                      98:29:a6:e6:e5:6a
> 0x08: Multicast Address Filter     0xffffffff 0xffffffff
> 0x10: Dump Tally Counter Command   0xffffe000 0x00000000
> 0x20: Tx Normal Priority Ring Addr 0xff50b000 0x00000000
> 0x28: Tx High Priority Ring Addr   0x00000000 0x00000000
> 0x30: Flash memory read/write                 0x00000000
> 0x34: Early Rx Byte Count                              0
> 0x36: Early Rx Status                               0x00
> 0x37: Command                                       0x0c
>       Rx on, Tx on
> 0x3C: Interrupt Mask                              0x003f
>       LinkChg RxNoBuf TxErr TxOK RxErr RxOK
> 0x3E: Interrupt Status                            0x0000
> 
> 0x40: Tx Configuration                        0x5f800f80
> 0x44: Rx Configuration                        0x0002cf0f
> 0x48: Timer count                             0x00000000
> 0x4C: Missed packet counter                     0x000000
> 0x50: EEPROM Command                                0x10
> 0x51: Config 0                                      0x00
> 0x52: Config 1                                      0xcf
> 0x53: Config 2                                      0x3c
> 0x54: Config 3                                      0x60
> 0x55: Config 4                                      0x11
> 0x56: Config 5                                      0x02
> 0x58: Timer interrupt                         0x00000000
> 0x5C: Multiple Interrupt Select                   0x0000
> 0x60: PHY access                              0x00000000
> 0x64: TBI control and status                  0x12011025
> 0x68: TBI Autonegotiation advertisement (ANAR)    0xf02c
> 0x6A: TBI Link partner ability (LPAR)             0x8000
> 0x6C: PHY status                                    0xeb

Thanks for the additional info. PHY status 0xeb means that
a link is established at 100Mbps, see following from the
driver source. Having said that the downshift happens also
under 5.4, it's just not reported.

	/* rtl8169_PHYstatus */
	TBI_Enable	= 0x80,
	TxFlowCtrl	= 0x40,
	RxFlowCtrl	= 0x20,
	_1000bpsF	= 0x10,
	_100bps		= 0x08,
	_10bps		= 0x04,
	LinkStatus	= 0x02,
	FullDup		= 0x01,

1Gbps needs all four cable pairs, whilst 100Mbps is happy
with two. Therefore one reason could be a physical problem
(e.g. corrosion) with a pin in a RJ45 port.
(in case you tried other cables already and you can rule out
a cable problem)

> 0x84: PM wakeup frame 0            0x00000000 0x00000000
> 0x8C: PM wakeup frame 1            0x00000000 0x00000000
> 0x94: PM wakeup frame 2 (low)      0x00000000 0x00000000
> 0x9C: PM wakeup frame 2 (high)     0x00000000 0x00000000
> 0xA4: PM wakeup frame 3 (low)      0x00000000 0x00000000
> 0xAC: PM wakeup frame 3 (high)     0x00000000 0x00000001
> 0xB4: PM wakeup frame 4 (low)      0x00000000 0xd205cde1
> 0xBC: PM wakeup frame 4 (high)     0x00000000 0x00000000
> 0xC4: Wakeup frame 0 CRC                          0x0000
> 0xC6: Wakeup frame 1 CRC                          0x0000
> 0xC8: Wakeup frame 2 CRC                          0x0000
> 0xCA: Wakeup frame 3 CRC                          0x0000
> 0xCC: Wakeup frame 4 CRC                          0x0000
> 0xDA: RX packet maximum size                      0x4000
> 0xE0: C+ Command                                  0x2060
>       VLAN de-tagging
>       RX checksumming
> 0xE2: Interrupt Mitigation                        0x0000
>       TxTimer:       0
>       TxPackets:     0
>       RxTimer:       0
>       RxPackets:     0
> 0xE4: Rx Ring Addr                 0xff50f000 0x00000000
> 0xEC: Early Tx threshold                            0x27
> 0xF0: Func Event                              0x0000003f
> 0xF4: Func Event Mask                         0x00000000
> 0xF8: Func Preset State                       0x00000003
> 0xFC: Func Force Event                        0x00000000
> 
>>From kernel 5.9.3
> 
> ethtool -d enp1s0f1
> RealTek RTL8411 registers:
> --------------------------------------------------------
> 0x00: MAC Address                      98:29:a6:e6:e5:6a
> 0x08: Multicast Address Filter     0xffffffff 0xffffffff
> 0x10: Dump Tally Counter Command   0xffffe000 0x00000000
> 0x20: Tx Normal Priority Ring Addr 0xff582000 0x00000000
> 0x28: Tx High Priority Ring Addr   0x00000000 0x00000000
> 0x30: Flash memory read/write                 0x00000000
> 0x34: Early Rx Byte Count                              0
> 0x36: Early Rx Status                               0x00
> 0x37: Command                                       0x0c
>       Rx on, Tx on
> 0x3C: Interrupt Mask                              0x003f
>       LinkChg RxNoBuf TxErr TxOK RxErr RxOK
> 0x3E: Interrupt Status                            0x0000
> 
> 0x40: Tx Configuration                        0x5f800f80
> 0x44: Rx Configuration                        0x0002cf0f
> 0x48: Timer count                             0x00000000
> 0x4C: Missed packet counter                     0x000000
> 0x50: EEPROM Command                                0x10
> 0x51: Config 0                                      0x00
> 0x52: Config 1                                      0xcf
> 0x53: Config 2                                      0x3c
> 0x54: Config 3                                      0x60
> 0x55: Config 4                                      0x11
> 0x56: Config 5                                      0x02
> 0x58: Timer interrupt                         0x00000000
> 0x5C: Multiple Interrupt Select                   0x0000
> 0x60: PHY access                              0x00000000
> 0x64: TBI control and status                  0x12011025
> 0x68: TBI Autonegotiation advertisement (ANAR)    0xf02c
> 0x6A: TBI Link partner ability (LPAR)             0x8000
> 0x6C: PHY status                                    0xeb
> 0x84: PM wakeup frame 0            0x00000000 0x00000000
> 0x8C: PM wakeup frame 1            0x00000000 0x00000000
> 0x94: PM wakeup frame 2 (low)      0x00000000 0x00000000
> 0x9C: PM wakeup frame 2 (high)     0x00000000 0x00000000
> 0xA4: PM wakeup frame 3 (low)      0x00000000 0x00000000
> 0xAC: PM wakeup frame 3 (high)     0x00000000 0x00000001
> 0xB4: PM wakeup frame 4 (low)      0x00000000 0xd21a30de
> 0xBC: PM wakeup frame 4 (high)     0x00000000 0x00000000
> 0xC4: Wakeup frame 0 CRC                          0x0000
> 0xC6: Wakeup frame 1 CRC                          0x0000
> 0xC8: Wakeup frame 2 CRC                          0x0000
> 0xCA: Wakeup frame 3 CRC                          0x0000
> 0xCC: Wakeup frame 4 CRC                          0x0000
> 0xDA: RX packet maximum size                      0x4000
> 0xE0: C+ Command                                  0x2060
>       VLAN de-tagging
>       RX checksumming
> 0xE2: Interrupt Mitigation                        0x0000
>       TxTimer:       0
>       TxPackets:     0
>       RxTimer:       0
>       RxPackets:     0
> 0xE4: Rx Ring Addr                 0xff583000 0x00000000
> 0xEC: Early Tx threshold                            0x27
> 0xF0: Func Event                              0x0000003f
> 0xF4: Func Event Mask                         0x00000000
> 0xF8: Func Preset State                       0x00000003
> 0xFC: Func Force Event                        0x00000000
> 
> 
> I also noticed this message when ran update-initramfs -k all -u when
> installed kernel 5.9.3.
> I had made a git clone from linux-firmware and copied this missed
> firmware but no change!
> 
> W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125b-2.fw for
> module r8169
> 
> 
> 
> ---
> Gilberto Nunes Ferreira
> 
> 
> 
> Em seg., 2 de nov. de 2020 às 10:40, Heiner Kallweit
> <hkallweit1@gmail.com> escreveu:
>>
>> On 02.11.2020 14:20, Gilberto Nunes wrote:
>>> Hi
>>>
>>> ethtool using 5.4
>>>
>> ethtool doesn't know about the actual speed, because the downshift
>> occurs PHY-internally. Please test actual the speed.
>> Alternatively provide the output of ethtool -d <if>, the RTL8169
>> chip family has an internal register refkecting the actual link speed.


      reply	other threads:[~2020-11-02 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOKSTBtcsqFZTzvgF-HQGRmvcd=Qanq7r2PREB2qGmnSQZJ_-A@mail.gmail.com>
2020-11-02  3:36 ` Fwd: Problem with r8169 module Gilberto Nunes
2020-11-02  8:14   ` Heiner Kallweit
2020-11-02 13:20     ` Gilberto Nunes
2020-11-02 13:39       ` Heiner Kallweit
2020-11-02 16:29         ` Gilberto Nunes
2020-11-02 16:50           ` Heiner Kallweit [this message]

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=4ee088b0-505b-8567-7af0-3ddd4cb1c778@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=gilberto.nunes32@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).