--- a/src/r8125.h
+++ b/src/r8125.h
-@@ -1672,6 +1672,8 @@ enum RTL8125_register_content {
+@@ -1687,6 +1687,9 @@ enum RTL8125_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
+#define RTL8125_FULL_DUPLEX_MASK (_2500bpsF | _1000bpsF | FullDup)
++#define RTL8125_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
+
/* DBG_reg */
Fix_Nak_1 = (1 << 4),
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
-@@ -5116,6 +5117,38 @@ rtl8125_link_down_patch(struct net_devic
+@@ -5023,6 +5024,38 @@ rtl8125_link_down_patch(struct net_devic
#endif
}
-+static unsigned int rtl8125_phy_duplex(u16 status)
++static unsigned int rtl8125_phy_duplex(u32 status)
+{
+ unsigned int duplex = DUPLEX_UNKNOWN;
+
+ return duplex;
+}
+
-+static int rtl8125_phy_speed(u16 status)
++static int rtl8125_phy_speed(u32 status)
+{
+ int speed = SPEED_UNKNOWN;
+
+ if (status & LinkStatus) {
+ if (status & _2500bpsF)
+ speed = SPEED_2500;
-+ else if (status & _1000bpsF)
++ else if (status & RTL8125_SPEED_1000_MASK)
+ speed = SPEED_1000;
+ else if (status & _100bps)
+ speed = SPEED_100;
static void
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
{
-@@ -5128,11 +5161,18 @@ _rtl8125_check_link_status(struct net_de
+@@ -5035,11 +5068,18 @@ _rtl8125_check_link_status(struct net_de
if (link_state == R8125_LINK_STATE_ON) {
rtl8125_link_on_patch(dev);
- if (netif_msg_ifup(tp))
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
+ if (netif_msg_ifup(tp)) {
-+ const u16 phy_status = RTL_R16(tp, PHYstatus);
++ const u32 phy_status = RTL_R32(tp, PHYstatus);
+ const unsigned int phy_duplex = rtl8125_phy_duplex(phy_status);
+ const int phy_speed = rtl8125_phy_speed(phy_status);
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",