Bug 253251 - Hardware Revision Realtek 8117
Summary: Hardware Revision Realtek 8117
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.2-STABLE
Hardware: amd64 Any
: --- Affects Many People
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-04 16:04 UTC by Christian Gutzler
Modified: 2023-11-25 01:51 UTC (History)
6 users (show)

See Also:


Attachments
Patch (1.31 KB, patch)
2021-02-11 20:42 UTC, Christian Gutzler
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Gutzler 2021-02-04 16:04:40 UTC
My builtin Realtek 8117 is not attached (return 6) due to unknown HW revision / Chip rev. 0x54800000, Mac rev. 0x00200000.

As far as I understood, this seems to happen from time to time with new Realtek chips and the new HW ID maybe just needs to be included in the list.

I just added a photo of the screen, since I was sitting in front of it. Let me know if you need the output as text or anything else.

Greetings from Mannheim
Christian
Comment 1 Christian Gutzler 2021-02-11 20:42:28 UTC
Created attachment 222373 [details]
Patch

My first patch ever, hope I did everything right.
Please review.

THX
Comment 2 Christian Gutzler 2021-02-11 20:44:01 UTC
Comment on attachment 222373 [details]
Patch

My first patch ever. Hope I did everything right. Pls review. THX. Christian
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2021-02-12 17:35:58 UTC
Hi, a couple of notes:
- the description string "8168H/8111H" is duplicated, it should probably be "8117"
- I think the RL_HWREV_8117 driver flags are probably close to RL_HWREV_8168EP.  The 8169 NICs are quite old.

Presumably the driver is basically functional with your patch applied?
Comment 4 Christian Gutzler 2021-02-16 21:21:25 UTC
Hi,correct. It´s basically functional. Copied tha values from 0x54000000 assuming 0x54800000 would be a revision of this.

I´ll test with the changes proposed by you.
Comment 5 Christian Gutzler 2021-05-03 09:59:04 UTC
(Finally) Tested your proposals and it seems to work but the MAC looks odd :

re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
        ether 00:00:00:00:00:00
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Comment 6 Christian Gutzler 2021-05-03 10:01:51 UTC
(In reply to Christian Gutzler from comment #5)

P.S. Did this on FreeBSD 13.0 RELEASE
Comment 7 Christian Gutzler 2022-10-16 15:38:21 UTC
Any development on this?
Comment 8 Torfinn Ingolfsen 2023-07-13 22:01:19 UTC
I met this problem on a HP ProDesk 405 G6 Desktop Mini PC. Relevant dmesg output
pci3: <unknown> at device 0.0 (no driver attached)
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0x2200-0x22ff mem 0xfc511000-0xfc511fff,0xfc504000-0xfc507fff at device 0.1 on pci3
re0: Using 1 MSI-X message
re0: turning off MSI enable bit.
re0: ASPM disabled
re0: Chip rev. 0x54800000
re0: MAC rev. 0x00300000
re0: Unknown H/W revision: 0x54800000
device_attach: re0 attach returned 6

This is on FreeBSD 13.2-release-p1:
root@kg-vm5:~ # freebsd-version -ku
13.2-RELEASE-p1
13.2-RELEASE-p1
root@kg-vm5:~ # uname -a
FreeBSD kg-vm5.kg4.no 13.2-RELEASE-p1 FreeBSD 13.2-RELEASE-p1 GENERIC amd64

I will try the patch in this PR (building from source as I am writing this).
Comment 9 Torfinn Ingolfsen 2023-07-13 23:08:46 UTC
Yes - the patch works. With the patch, my dmesg output is
```
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0x2200-0x22ff mem 0xfc511000-0xfc511fff,0xfc504000-0xfc507fff at device 0.1 on pci3
re0: Using 1 MSI-X message
re0: ASPM disabled
re0: Chip rev. 0x54800000
re0: MAC rev. 0x00300000
miibus0: <MII bus> on re0
rgephy0: <RTL8251/8153 1000BASE-T media interface> PHY 1 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Using defaults for TSO: 65518/35/2048
re0: Ethernet address: e0:70:ea:ae:9b:d6
re0: netmap queues/slots: TX 1/256, RX 1/256
```
ifconfig output
```
root@kg-vm5:~ # ifconfig re0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
	ether e0:70:ea:ae:9b:d6
	inet 10.1.161.20 netmask 0xffff0000 broadcast 10.1.255.255
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```
this is on FreeBSD 13.2-release-p1
```
root@kg-vm5:~ # freebsd-version -ku
13.2-RELEASE-p1
13.2-RELEASE-p1
root@kg-vm5:~ # uname -a
FreeBSD kg-vm5.kg4.no 13.2-RELEASE-p1 FreeBSD 13.2-RELEASE-p1 #1 releng/13.2-n254621-08b87f63a046-dirty: Fri Jul 14 00:30:35 CEST 2023     root@kg-vm5.kg4.no:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
```
Comment 10 Brad Smith 2023-11-25 00:35:50 UTC
This can be closed. This has been fixed in -current and will be backported to the -stable branches soon.