Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Feb 2016 21:21:06 +0100
From:      "Stefan Kohl" <freebsd@go4more.de>
To:        "Marius Strobl" <marius@alchemy.franken.de>
Cc:        pyunyh@gmail.com, freebsd-current@freebsd.org
Subject:   Aw: Re: Re: Realtek 8168/8111 if_re not working in current r295091
Message-ID:  <trinity-a49eae45-5e3d-4266-85b3-879e0fa63602-1455394866661@3capp-1and1-bs02>
In-Reply-To: <20160205212912.GI15359@alchemy.franken.de>
References:  <trinity-abb68349-1869-4b8c-801b-254057609ec8-1454529421824@3capp-webde-bap08> <20160204005132.GA1181@michelle.fasterthan.co.kr> <trinity-5e50b480-a0ec-4575-9d20-ee627a61cdbd-1454702642706@3capp-webde-bs04>,  <20160205212912.GI15359@alchemy.franken.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Marius,

I finally got my RT 8168 Ethernet Card (Zotac Ri323) working after
patching if_re=2Ec (r295601)=2E Contrary to the assumption that
HWREV_8168E_VL with Chip Rev 0x2c800000 should not require RTL8168G
handling as soon as I expand the sc->rl_flags for the respective
HWREV and define the (ominous) 8168G_Plus Flag for RL_HWREV_8168E_VL
the card is functioning correctly=2E

/usr/src/sys/dev/re # svn diff if_re=2Ec
Index: if_re=2Ec
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- if_re=2Ec	(revision 295601)
+++ if_re=2Ec	(working copy)
@@ -1473,6 +1473,8 @@
 		    RL_FLAG_WOL_MANLINK;
 		break;
 	case RL_HWREV_8168E_VL:
+		sc->rl_flags |=3D RL_FLAG_8168G_PLUS;
+		/* FALLTHROUGH */
 	case RL_HWREV_8168F:
 		sc->rl_flags |=3D RL_FLAG_EARLYOFF;
 		/* FALLTHROUGH */

My system: FreeBSD kartal=2Enet=2Ehayat 11=2E0-CURRENT FreeBSD 11=2E0-CURR=
ENT #0
r295601: Sat Feb 13 19:11:05 CET 2016
root@kartal=2Enet=2Ehayat:/usr/obj/usr/src/sys/KARTAL  amd64

When broken (without the patch) I got the following tcpdump output:

19:18:46=2E299360 00:00:00:00:00:00 (oui Ethernet) > 00:00:00:00:00:00
(oui Ethernet) Null Information, send seq 0, rcv seq 0, Flags [Command],
length 84

Regards, Stefan

Gesendet:=C2=A0Freitag, 05=2E Februar 2016 um 22:29 Uhr
Von:=C2=A0"Marius Strobl" <marius@alchemy=2Efranken=2Ede>
An:=C2=A0s=2Eo=2Ek@web=2Ede
Cc:=C2=A0pyunyh@gmail=2Ecom, freebsd-current@freebsd=2Eorg
Betreff:=C2=A0Re: Re: Realtek 8168/8111 if_re not working in current r2950=
91
On Fri, Feb 05, 2016 at 09:04:02PM +0100, s=2Eo=2Ek@web=2Ede wrote:
> Hi Marius and Pyun,
>
> actually it is Chip rev=2E 0x2c800000 (I have overlooked that informatio=
n in my first post)
>
> re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0x=
e000-0xe0ff mem 0xf0104000-0xf0104fff,0xf0100000-0xf0103fff irq 19 at devic=
e 0=2E0 on pci2
> re0: Using 1 MSI-X message
> re0: turning off MSI enable bit=2E
> re0: Chip rev=2E 0x2c800000
> re0: MAC rev=2E 0x00100000
> miibus0: <MII bus> on re0
> rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibu=
s0
>
> Does that help in any way? Thanks Stefan
>

Unfortunately, it doesn't make a whole lot of sense to me; 0x2c800000
translates to RL_HWREV_8168E_VL, which is an older chip that should
never have required the handling of RTL8168G and later revisions (or
may not actually work when applying it)=2E So r290566 should only make
a positive difference, if it changes anyting for that revision all=2E
Did the interface work before r290151, or actually before r281337?
Does reverting r290946 and r290566 locally make it work again?
Another candidate causing that breakage would be r291676 if the PHY
is an RTL8211F one=2E If you boot verbosely, you'll have a line in the
dmesg(8) output with "OUI 0x00e04c" in it=2E If the "rev=2E" number in
that line is 6, you have an RTL8211F=2E

Marius

_______________________________________________
freebsd-current@freebsd=2Eorg mailing list
https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd=2Eor=
g"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-a49eae45-5e3d-4266-85b3-879e0fa63602-1455394866661>