public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Timo Teräs" <timo.teras@iki•fi>
To: Francois Romieu <romieu@fr•zoreil.com>,
	Ivan Vecera <ivecera@redhat•com>,
	netdev@vger•kernel.org
Subject: r8169 mac reading/writing broken
Date: Sat, 27 Mar 2010 12:28:07 +0200	[thread overview]
Message-ID: <4BADDDB7.4010005@iki.fi> (raw)

It seems that my r8169 mac address is lost when r8169 module is reloaded,
or system is soft rebooted. Hard power reset recovers the mac address again.
The commit cc098dc705895f6b0109b7e8e026ac2b8ae1c0a1 (r8169: restore mac addr
in rtl8169_remove_one and rtl_shutdown) seems to have broken it. The first four
bytes of mac address go zeroes because of this.

I did some more testing, and added debugging info to rtl_rar_set(). It would
appear that even if I write any mac address (with ifconfig) and reread the
MAC0..MAC5 register, the first four bytes get zeroed. So it would sounds like
the hardware is faulty, or that the rtl_rar_set function is buggy.

Any suggestions to fix this?

The hardware in question is a 3-in-1 NIC. Each three PCI devices shows up as
something like:

00:09.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet [10ec:8167] (rev 10)
	Subsystem: Jetway Information Co., Ltd. Device [16f3:10ec]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64 (8000ns min, 16000ns max), Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 18
	Region 0: I/O ports at f200 [size=256]
	Region 1: Memory at fdfff000 (32-bit, non-prefetchable) [size=256]
	[virtual] Expansion ROM at 3c000000 [disabled] [size=128K]
	Capabilities: [dc] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Kernel driver in use: r8169

And the kernel drivers prints the following at startup:

r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
r8169 0000:00:09.0: PCI->APIC IRQ transform: INT A -> IRQ 18
r8169 0000:00:09.0: no PCI Express capability
eth0: RTL8169sc/8110sc at 0xf81ae000, 00:30:18:a6:2b:6c, XID 18000000 IRQ 18
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
r8169 0000:00:0b.0: PCI->APIC IRQ transform: INT A -> IRQ 19
r8169 0000:00:0b.0: no PCI Express capability
eth1: RTL8169sc/8110sc at 0xf81b2000, 00:30:18:a6:2b:6d, XID 18000000 IRQ 19
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
r8169 0000:00:0c.0: PCI->APIC IRQ transform: INT A -> IRQ 16
r8169 0000:00:0c.0: no PCI Express capability
eth2: RTL8169sc/8110sc at 0xf81b6000, 00:30:18:a6:2b:6e, XID 18000000 IRQ 16

- Timo

             reply	other threads:[~2010-03-27 10:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-27 10:28 Timo Teräs [this message]
2010-03-27 11:40 ` r8169 mac reading/writing broken François Romieu
2010-03-27 11:46   ` Timo Teräs
2010-03-27 12:03     ` François Romieu
2010-03-27 12:16       ` Timo Teräs
2010-03-27 12:25         ` Timo Teräs
2010-03-27 12:26         ` François Romieu
2010-03-27 12:32           ` Timo Teräs
2010-03-27 20:37             ` Timo Teräs
2010-03-27 21:11               ` François Romieu
2010-03-27 23:20                 ` Ben Hutchings
2010-03-27 23:30                   ` David Miller
2010-03-28  0:31                     ` [PATCH] r8169: fix broken register writes François Romieu
2010-03-28  0:47                       ` Ben Hutchings
2010-03-28 21:28                         ` François Romieu
2010-03-28 22:19                           ` Al Viro
2010-03-29  1:03                             ` Al Viro
2010-03-29  2:17                               ` Al Viro
2010-03-31 20:27                                 ` =?unknown-8bit?B?RnJhbsOnb2lz?= Romieu
2010-03-29 21:11                             ` François Romieu
2010-03-28  2:38                       ` David Miller
2010-03-28 22:04                         ` François Romieu

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=4BADDDB7.4010005@iki.fi \
    --to=timo.teras@iki$(echo .)fi \
    --cc=ivecera@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=romieu@fr$(echo .)zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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