-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Odroid M1: resolve low network speed
- Loading branch information
1 parent
37750a7
commit 4367415
Showing
2 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...kernel/archive/rockchip64-6.10/general-net-stmmac-dwmac4-fix_PCS_duplex_mode_decode.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From 85ba108a529d99c82e814eaf782a9443acf5eaed Mon Sep 17 00:00:00 2001 | ||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> | ||
Date: Tue, 6 Aug 2024 14:08:41 +0100 | ||
Subject: net: stmmac: dwmac4: fix PCS duplex mode decode | ||
|
||
dwmac4 was decoding the duplex mode from the GMAC_PHYIF_CONTROL_STATUS | ||
register incorrectly, using GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK (value 1) | ||
rather than GMAC_PHYIF_CTRLSTATUS_LNKMOD (bit 16). Fix this. | ||
|
||
Fixes: 70523e639bf8c ("drivers: net: stmmac: reworking the PCS code.") | ||
Reviewed-by: Andrew Halaney <ahalaney@redhat.com> | ||
Reviewed-by: Andrew Lunn <andrew@lunn.ch> | ||
Reviewed-by: Serge Semin <fancer.lancer@gmail.com> | ||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | ||
Link: https://patch.msgid.link/E1sbJvd-001rGD-E3@rmk-PC.armlinux.org.uk | ||
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ||
--- | ||
drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 -- | ||
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- | ||
2 files changed, 1 insertion(+), 3 deletions(-) | ||
|
||
(limited to 'drivers/net/ethernet/stmicro/stmmac') | ||
|
||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h | ||
index d3c5306f1c41f7..93a78fd0737b6c 100644 | ||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h | ||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h | ||
@@ -573,8 +573,6 @@ static inline u32 mtl_low_credx_base_addr(const struct dwmac4_addrs *addrs, | ||
#define GMAC_PHYIF_CTRLSTATUS_LNKSTS BIT(19) | ||
#define GMAC_PHYIF_CTRLSTATUS_JABTO BIT(20) | ||
#define GMAC_PHYIF_CTRLSTATUS_FALSECARDET BIT(21) | ||
-/* LNKMOD */ | ||
-#define GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK 0x1 | ||
/* LNKSPEED */ | ||
#define GMAC_PHYIF_CTRLSTATUS_SPEED_125 0x2 | ||
#define GMAC_PHYIF_CTRLSTATUS_SPEED_25 0x1 | ||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | ||
index f98741d2607ec4..31c387cc5f269d 100644 | ||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | ||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | ||
@@ -786,7 +786,7 @@ static void dwmac4_phystatus(void __iomem *ioaddr, struct stmmac_extra_stats *x) | ||
else | ||
x->pcs_speed = SPEED_10; | ||
|
||
- x->pcs_duplex = (status & GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK); | ||
+ x->pcs_duplex = (status & GMAC_PHYIF_CTRLSTATUS_LNKMOD); | ||
|
||
pr_info("Link is Up - %d/%s\n", (int)x->pcs_speed, | ||
x->pcs_duplex ? "Full" : "Half"); | ||
-- | ||
cgit 1.2.3-korg | ||
|
52 changes: 52 additions & 0 deletions
52
.../kernel/archive/rockchip64-6.6/general-net-stmmac-dwmac4-fix_PCS_duplex_mode_decode.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From 85ba108a529d99c82e814eaf782a9443acf5eaed Mon Sep 17 00:00:00 2001 | ||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> | ||
Date: Tue, 6 Aug 2024 14:08:41 +0100 | ||
Subject: net: stmmac: dwmac4: fix PCS duplex mode decode | ||
|
||
dwmac4 was decoding the duplex mode from the GMAC_PHYIF_CONTROL_STATUS | ||
register incorrectly, using GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK (value 1) | ||
rather than GMAC_PHYIF_CTRLSTATUS_LNKMOD (bit 16). Fix this. | ||
|
||
Fixes: 70523e639bf8c ("drivers: net: stmmac: reworking the PCS code.") | ||
Reviewed-by: Andrew Halaney <ahalaney@redhat.com> | ||
Reviewed-by: Andrew Lunn <andrew@lunn.ch> | ||
Reviewed-by: Serge Semin <fancer.lancer@gmail.com> | ||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | ||
Link: https://patch.msgid.link/E1sbJvd-001rGD-E3@rmk-PC.armlinux.org.uk | ||
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ||
--- | ||
drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 -- | ||
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- | ||
2 files changed, 1 insertion(+), 3 deletions(-) | ||
|
||
(limited to 'drivers/net/ethernet/stmicro/stmmac') | ||
|
||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h | ||
index d3c5306f1c41f7..93a78fd0737b6c 100644 | ||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h | ||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h | ||
@@ -573,8 +573,6 @@ static inline u32 mtl_low_credx_base_addr(const struct dwmac4_addrs *addrs, | ||
#define GMAC_PHYIF_CTRLSTATUS_LNKSTS BIT(19) | ||
#define GMAC_PHYIF_CTRLSTATUS_JABTO BIT(20) | ||
#define GMAC_PHYIF_CTRLSTATUS_FALSECARDET BIT(21) | ||
-/* LNKMOD */ | ||
-#define GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK 0x1 | ||
/* LNKSPEED */ | ||
#define GMAC_PHYIF_CTRLSTATUS_SPEED_125 0x2 | ||
#define GMAC_PHYIF_CTRLSTATUS_SPEED_25 0x1 | ||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | ||
index f98741d2607ec4..31c387cc5f269d 100644 | ||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | ||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | ||
@@ -786,7 +786,7 @@ static void dwmac4_phystatus(void __iomem *ioaddr, struct stmmac_extra_stats *x) | ||
else | ||
x->pcs_speed = SPEED_10; | ||
|
||
- x->pcs_duplex = (status & GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK); | ||
+ x->pcs_duplex = (status & GMAC_PHYIF_CTRLSTATUS_LNKMOD); | ||
|
||
pr_info("Link is Up - %d/%s\n", (int)x->pcs_speed, | ||
x->pcs_duplex ? "Full" : "Half"); | ||
-- | ||
cgit 1.2.3-korg | ||
|