cvs commit: src/share/man/man4 re.4 src/sys/dev/re if_re.c
src/sys/dev/mii rgephy.c src/sys/pci if_rlreg.h
Giorgos Keramidas
keramida at freebsd.org
Wed Jun 28 14:42:55 UTC 2006
On 2006-06-28 12:01, Giorgos Keramidas <keramida at freebsd.org> wrote:
> Attached are two files, with `dmesg -v' output:
>
> * The `dmesg.nodriver.txt' file is with a kernel built from sources
> checked out at 2006.06.27.08.04.55 (including the changes of the
> commit above).
>
> * The `dmesg.txt' file is with a kernel build from the same source
> tree, but with if_re.c, rgephy.c and if_rlreg.h reverted to:
>
> src/sys/dev/re/if_re.c,v 1.67
> src/sys/dev/mii/rgephy.c,v 1.8
> src/sys/pci/if_rlreg.h,v 1.56
I think I got it :)
A modified if_re.c to include this diff ...
%%%
=== if_re.c
==================================================================
--- if_re.c (revision 143)
+++ if_re.c (local)
@@ -866,6 +866,12 @@
sc = device_get_softc(dev);
while (t->rl_name != NULL) {
+ if (bootverbose)
+ device_printf(dev, "dev 0x%04x:0x%04x "
+ "try @ %p 0x%04x:0x%04x:0x%x:%s\n",
+ pci_get_vendor(dev), pci_get_device(dev), t,
+ t->rl_vid, t->rl_did, t->rl_basetype, t->rl_name);
+
if ((pci_get_vendor(dev) == t->rl_vid) &&
(pci_get_device(dev) == t->rl_did)) {
/*
@@ -880,6 +886,11 @@
continue;
}
+ device_printf(dev, "dev 0x%04x:0x%04x "
+ "matches @ %p 0x%04x:0x%04x:0x%x:%s\n",
+ pci_get_vendor(dev), pci_get_device(dev), t,
+ t->rl_vid, t->rl_did, t->rl_basetype, t->rl_name);
+
/*
* Temporarily map the I/O space
* so we can read the chip ID register.
@@ -901,6 +912,11 @@
device_set_desc(dev, t->rl_name);
return (BUS_PROBE_DEFAULT);
}
+ device_printf(dev, "dev 0x%04x:0x%04x hw 0x%x "
+ "!= re @ %p 0x%04x:0x%04x:0x%x:%s\n",
+ pci_get_vendor(dev), pci_get_device(dev), hwrev,
+ t, t->rl_vid, t->rl_did, t->rl_basetype,
+ t->rl_name);
}
t++;
}
%%%
prints the following at verbose-boot time with the current HEAD version
of files:
# [...]
# pci2: <ACPI PCI bus> on pcib3
# pci2: physical bus=2
# found-> vendor=0x10ec, dev=0x8168, revid=0x01
# bus=2, slot=0, func=0
# class=02-00-00, hdrtype=0x00, mfdev=0
# cmdreg=0x0007, statreg=0x0010, cachelnsz=4 (dwords)
# lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
# intpin=a, irq=10
# powerspec 2 supports D0 D1 D2 D3 current D0
# MSI supports 2 messages, 64 bit
# map[10]: type 4, range 32, base 0000c800, size 8, enabled
# pcib3: (null) requested I/O range 0xc800-0xc8ff: in range
# map[18]: type 1, range 64, base e7eff000, size 12, enabled
# pcib3: (null) requested memory range 0xe7eff000-0xe7efffff: good
# pcib3: matched entry for 2.0.INTA (src \\_SB_.LNKD:0)
# pcib3: slot 0 INTA routed to irq 10 via \\_SB_.LNKD
# re0: dev 0x10ec:0x8168 try @ 0xc071ffc0 0x1186:0x4300:0x4000000:D-Link DGE-528(T) Gigabit Ethernet Adapter
# re0: dev 0x10ec:0x8168 try @ 0xc071ffcc 0x10ec:0x8139:0x74800000:RealTek 8139C+ 10/100BaseTX
# re0: dev 0x10ec:0x8168 try @ 0xc071ffd8 0x10ec:0x8136:0x34000000:RealTek 8101E PCIe 10/100baseTX
# re0: dev 0x10ec:0x8168 try @ 0xc071ffe4 0x10ec:0x8168:0x38000000:RealTek 8168B/8111B PCIe Gigabit Ethernet
# re0: dev 0x10ec:0x8168 matches @ 0xc071ffe4 0x10ec:0x8168:0x38000000:RealTek 8168B/8111B PCIe Gigabit Ethernet
# re0: Reserved 0x100 bytes for rid 0x10 type 4 at 0xc800
# re0: dev 0x10ec:0x8168 hw 0x30000000 != re @ 0xc071ffe4 0x10ec:0x8168:0x38000000:RealTek 8168B/8111B PCIe Gigabit Ethernet
# re0: dev 0x10ec:0x8168 try @ 0xc071fff0 0x10ec:0x8169:0x0:RealTek 8169 Gigabit Ethernet
# re0: dev 0x10ec:0x8168 try @ 0xc071fffc 0x10ec:0x8169:0x4000000:RealTek 8169S Single-chip Gigabit Ethernet
# re0: dev 0x10ec:0x8168 try @ 0xc0720008 0x10ec:0x8169:0x10000000:RealTek 8169SB/8110SB Single-chip Gigabit Ethernet
# re0: dev 0x10ec:0x8168 try @ 0xc0720014 0x10ec:0x8169:0x18000000:RealTek 8169SC/8110SC Single-chip Gigabit Ethernet
# re0: dev 0x10ec:0x8168 try @ 0xc0720020 0x10ec:0x8169:0x800000:RealTek 8110S Single-chip Gigabit Ethernet
# re0: dev 0x10ec:0x8168 try @ 0xc072002c 0x1259:0xc107:0x4000000:Corega CG-LAPCIGT (RTL8169S) Gigabit Ethernet
# re0: dev 0x10ec:0x8168 try @ 0xc0720038 0x1737:0x1032:0x4000000:Linksys EG1032 (RTL8169S) Gigabit Ethernet
# pci2: <network, ethernet> at device 0.0 (no driver attached)
# [...]
Sure enough, the latest changes included a change in the hwrev of
RL_HWREV_8168 from 0x30000000 to 0x38000000 [in revision 1.57 of
src/sys/pci/if_rlreg.h].
I'm not sure if this is the correct fix, but switching back to
0x30000000 fixes probing of my re(4) interface here.
The change I did (on top of the bootverbose changes shown above) was:
%%%
=== if_rlreg.h
==================================================================
--- if_rlreg.h (revision 143)
+++ if_rlreg.h (local)
@@ -154,7 +154,7 @@
#define RL_HWREV_8169_8110SC 0x18000000
#define RL_HWREV_8100E 0x30800000
#define RL_HWREV_8101E 0x34000000
-#define RL_HWREV_8168 0x38000000
+#define RL_HWREV_8168 0x30000000
#define RL_HWREV_8139 0x60000000
#define RL_HWREV_8139A 0x70000000
#define RL_HWREV_8139AG 0x70800000
%%%
Then, verbose boot shows the device probing as it used to:
# pci2: <ACPI PCI bus> on pcib3
# pci2: physical bus=2
# found-> vendor=0x10ec, dev=0x8168, revid=0x01
# bus=2, slot=0, func=0
# class=02-00-00, hdrtype=0x00, mfdev=0
# cmdreg=0x0007, statreg=0x0010, cachelnsz=4 (dwords)
# lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
# intpin=a, irq=10
# powerspec 2 supports D0 D1 D2 D3 current D0
# MSI supports 2 messages, 64 bit
# map[10]: type 4, range 32, base 0000c800, size 8, enabled
# pcib3: (null) requested I/O range 0xc800-0xc8ff: in range
# map[18]: type 1, range 64, base e7eff000, size 12, enabled
# pcib3: (null) requested memory range 0xe7eff000-0xe7efffff: good
# pcib3: matched entry for 2.0.INTA (src \\_SB_.LNKD:0)
# pcib3: slot 0 INTA routed to irq 10 via \\_SB_.LNKD
# re0: dev 0x10ec:0x8168 try @ 0xc071ffc0 0x1186:0x4300:0x4000000:D-Link DGE-528(T) Gigabit Ethernet Adapter
# re0: dev 0x10ec:0x8168 try @ 0xc071ffcc 0x10ec:0x8139:0x74800000:RealTek 8139C+ 10/100BaseTX
# re0: dev 0x10ec:0x8168 try @ 0xc071ffd8 0x10ec:0x8136:0x34000000:RealTek 8101E PCIe 10/100baseTX
# re0: dev 0x10ec:0x8168 try @ 0xc071ffe4 0x10ec:0x8168:0x30000000:RealTek 8168B/8111B PCIe Gigabit Ethernet
# re0: dev 0x10ec:0x8168 matches @ 0xc071ffe4 0x10ec:0x8168:0x30000000:RealTek 8168B/8111B PCIe Gigabit Ethernet
# re0: Reserved 0x100 bytes for rid 0x10 type 4 at 0xc800
# re0: dev 0x10ec:0x8168 try @ 0xc071ffc0 0x1186:0x4300:0x4000000:D-Link DGE-528(T) Gigabit Ethernet Adapter
# re0: dev 0x10ec:0x8168 try @ 0xc071ffcc 0x10ec:0x8139:0x74800000:RealTek 8139C+ 10/100BaseTX
# re0: dev 0x10ec:0x8168 try @ 0xc071ffd8 0x10ec:0x8136:0x34000000:RealTek 8101E PCIe 10/100baseTX
# re0: dev 0x10ec:0x8168 try @ 0xc071ffe4 0x10ec:0x8168:0x30000000:RealTek 8168B/8111B PCIe Gigabit Ethernet
# re0: dev 0x10ec:0x8168 matches @ 0xc071ffe4 0x10ec:0x8168:0x30000000:RealTek 8168B/8111B PCIe Gigabit Ethernet
# pcib3: re0 requested I/O range 0xc800-0xc8ff: in range
# re0: <RealTek 8168B/8111B PCIe Gigabit Ethernet> port 0xc800-0xc8ff mem 0xe7eff000-0xe7efffff irq 10 at device 0.0 on pci2
# pcib3: re0 requested I/O range 0xc800-0xc8ff: in range
# miibus0: <MII bus> on re0
# rgephy0: <RTL8169S/8110S media interface> on miibus0
# rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto
# re0: bpf attached
# re0: Ethernet address: 00:15:f2:b9:84:61
# re0: [MPSAFE]
# re0: [FAST]
Does this change back to hwrev of 0x30000000 look like the correct thing
to do?
More information about the cvs-src
mailing list