Date: Sun, 18 Nov 2007 17:37:03 +0800 From: "Quan Qiu" <jackqqpro@gmail.com> To: freebsd-current@freebsd.org Cc: "Aryeh M. Friedman" <aryeh.friedman@gmail.com> Subject: Re: Onboard RTL8111C not attached to by re(4) Message-ID: <890a507f0711180137r5517eae9h9fdbefb42d3cd0d7@mail.gmail.com> In-Reply-To: <473DAEB9.5080304@gmail.com> References: <890a507f0711160615i371a60e1o1b8695176e92dcda@mail.gmail.com> <473DAEB9.5080304@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 16, 2007 10:52 PM, Aryeh M. Friedman <aryeh.friedman@gmail.com> wrote:
>
> Something else must be going on because on my Mobo (MSI Neo-F
> [P35/IHC9]) I have no issue with this (and never have [except for some
> re(4) issues that have nothing to do with reconizing the nic]):
>
>
> re0@pci0:4:0:0: class=0x020000 card=0x360c1462 chip=0x816810ec
> rev=0x01 hdr=0x00
> vendor = 'Realtek Semiconductor'
> device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC'
> class = network
> subclass = ethernet
>
>
> re0: <RealTek 8168/8111B PCIe Gigabit Ethernet> port 0xe800-0xe8ff mem
> 0xfcfff000-0xfcffffff irq 17 at device 0.0 on pci4
> re0: Using 2 MSI messages
> miibus0: <MII bus> on re0
> re0: Ethernet address: 00:19:db:b5:f8:0f
> re0: [FILTER]
> re0: [FILTER]
>
> FreeBSD monster 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Thu Nov 15
> 19:17:50 EST 2007
> aryeh@monster:/usr/obj/FreeBSD/FreeBSD-current/src/sys/MONSTER amd64
>
>
>
Your card is discovered as card=0x360c1462, mine as card=0xe0001458. I
think yours is really a 8168/8111B, while mine is a 8111C.
Accroding to the followling line in /sys/dev/re/if_re.c, re_attach(dev),
hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV;
and the definition in /sys/pci/if_rlreg.h,
#define RL_TXCFG_HWREV 0x7CC00000
I traced a debug kernel and found that
CSR_READ_4(sc, RL_TXCFG)
for my card is
0x3f2000c0
so the masked hwrev should be
0x3c000000
I added this line in /sys/pci/if_rlreg.h,
#define RL_HWREV_8111C 0x3c000000
and these lines to the table in /sys/dev/re/if_re.c,
{ RT_VENDORID, RT_DEVICEID_8168, RL_HWREV_8111C,
"RealTek 8111C Single-Chip PCIe Gigabit Ethernet" },
and these to the table in the same .c.
{ RL_HWREV_8111C, RL_8169, "8111C"},
After reboot, re(4) successfully recognized the chip. However, it
failed with the following error:
re0: MII without any phy!
I traced the mii_phy_probe() function in /sys/dev/mii/mii.c, only to
find all the bmsr values read by MIIBUS_READREG was:
0, 0xffff, 0, 0, ... (all 0's)
so that mii_phy_probe() did not find any PHY.
What's the problem?
--
Quan Qiu <jackqqpro@gmail.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?890a507f0711180137r5517eae9h9fdbefb42d3cd0d7>
