generic: 6.12: sync Realtek PHY patches with upstream

- Fix order of patches (3d483a10327f was merged before 34d5a86ff7bb).
- Reorganize patch numbers now that < 6.12 patches are no longer needed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas 2025-05-05 13:01:55 +02:00
parent 732d6e9332
commit 81e46d2a23
19 changed files with 8 additions and 16 deletions

View file

@ -1,7 +1,7 @@
From 081c9c0265c91b8333165aa6230c20bcbc6f7cbf Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 10 Oct 2024 14:07:16 +0100
Subject: [PATCH 3/5] net: phy: realtek: read duplex and gbit master from PHYSR
Subject: [PATCH] net: phy: realtek: read duplex and gbit master from PHYSR
register
The PHYSR MMD register is present and defined equally for all RTL82xx

View file

@ -1,8 +1,7 @@
From 68d5cd09e8919679ce13b85950debea4b2e98e04 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 10 Oct 2024 14:07:26 +0100
Subject: [PATCH 4/5] net: phy: realtek: change order of calls in C22
read_status()
Subject: [PATCH] net: phy: realtek: change order of calls in C22 read_status()
Always call rtlgen_read_status() first, so genphy_read_status() which
is called by it clears bits in case auto-negotiation has not completed.

View file

@ -1,7 +1,7 @@
From 5cb409b3960e75467cbb0a8e1e5596b4490570e3 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 10 Oct 2024 14:07:39 +0100
Subject: [PATCH 5/5] net: phy: realtek: clear 1000Base-T link partner
Subject: [PATCH] net: phy: realtek: clear 1000Base-T link partner
advertisement
Clear 1000Base-T link partner advertisement bits in Clause-45

View file

@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -1023,23 +1023,20 @@ static int rtl822x_c45_read_status(struc
@@ -1031,23 +1031,20 @@ static int rtl822x_c45_read_status(struc
{
int ret, val;

View file

@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -1038,8 +1038,10 @@ static int rtl822x_c45_read_status(struc
@@ -1046,8 +1046,10 @@ static int rtl822x_c45_read_status(struc
if (ret < 0)
return ret;

View file

@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -952,15 +952,15 @@ static int rtl822x_read_status(struct ph
@@ -960,15 +960,15 @@ static int rtl822x_read_status(struct ph
{
int lpadv, ret;

View file

@ -56,7 +56,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+#endif /* REALTEK_H */
--- /dev/null
+++ b/drivers/net/phy/realtek/realtek_hwmon.c
@@ -0,0 +1,86 @@
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * HWMON support for Realtek PHY's
@ -73,13 +73,6 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+#define RTL822X_VND2_TSRR 0xbd84
+#define RTL822X_VND2_TSSR 0xb54c
+
+static umode_t rtl822x_hwmon_is_visible(const void *drvdata,
+ enum hwmon_sensor_types type,
+ u32 attr, int channel)
+{
+ return 0444;
+}
+
+static int rtl822x_hwmon_get_temp(int raw)
+{
+ if (raw >= 512)
@ -112,7 +105,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+}
+
+static const struct hwmon_ops rtl822x_hwmon_ops = {
+ .is_visible = rtl822x_hwmon_is_visible,
+ .visible = 0444,
+ .read = rtl822x_hwmon_read,
+};
+