From: Russell King (Oracle) <hidden> Date: 2024-07-03 12:27:36
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.
Thanks to Abhishek Chauhan for providing a response on this issue.
Signed-off-by: Russell King (Oracle) <redacted>
---
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Andrew Lunn <andrew@lunn.ch> Date: 2024-07-03 14:07:58
On Wed, Jul 03, 2024 at 01:24:40PM +0100, Russell King (Oracle) wrote:
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.
This appears to be the only use of
GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK. Maybe it should be removed after
this change?
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
On Wed, Jul 03, 2024 at 01:24:40PM +0100, Russell King (Oracle) wrote:
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.
Thanks to Abhishek Chauhan for providing a response on this issue.
Signed-off-by: Russell King (Oracle) <redacted>
Right. The PHYIF_CTRLSTATUS CSR has the link status bits defined
starting from 16-bit position. So the method has improperly detected
duplex mode. Bit zero is occupied with the TC-flag (transmit RGMII,
SMII, SGMII configs) which is never set and which means the method
always reported the half-duplex link mode.
Reviewed-by: Serge Semin <redacted>
-Serge(y)
From: Andrew Halaney <hidden> Date: 2024-07-03 15:01:18
On Wed, Jul 03, 2024 at 01:24:40PM GMT, Russell King (Oracle) wrote:
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.
Thanks to Abhishek Chauhan for providing a response on this issue.
Signed-off-by: Russell King (Oracle) <redacted>
Fixes: 70523e639bf8c ("drivers: net: stmmac: reworking the PCS code.")
Reviewed-by: Andrew Halaney <redacted>
On Wed, Jul 03, 2024 at 04:06:54PM +0200, Andrew Lunn wrote:
On Wed, Jul 03, 2024 at 01:24:40PM +0100, Russell King (Oracle) wrote:
quoted
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.
This appears to be the only use of
GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK. Maybe it should be removed after
this change?
There is a PCS-refactoring work initiated by Russell, which besides of
other things may eventually imply dropping this macro:
https://lore.kernel.org/netdev/20240624132802.14238-6-fancer.lancer@gmail.com/
So unless it is strongly required I guess there is no much need in
respinning this patch or implementing additional one for now.
-Serge(y)
From: "Russell King (Oracle)" <linux@armlinux.org.uk> Date: 2024-07-03 15:30:07
On Wed, Jul 03, 2024 at 06:07:54PM +0300, Serge Semin wrote:
On Wed, Jul 03, 2024 at 04:06:54PM +0200, Andrew Lunn wrote:
quoted
On Wed, Jul 03, 2024 at 01:24:40PM +0100, Russell King (Oracle) wrote:
quoted
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.
This appears to be the only use of
GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK. Maybe it should be removed after
this change?
There is a PCS-refactoring work initiated by Russell, which besides of
other things may eventually imply dropping this macro:
https://lore.kernel.org/netdev/20240624132802.14238-6-fancer.lancer@gmail.com/
So unless it is strongly required I guess there is no much need in
respinning this patch or implementing additional one for now.
Nevertheless, a respin is worth doing with Andrew's suggested change
because this patch will impact the refactoring work even without that
change. We might as well have a complete patch for this change.
(Besides, I've already incorporated Andrew's feedback!)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
On Wed, Jul 03, 2024 at 04:29:24PM +0100, Russell King (Oracle) wrote:
On Wed, Jul 03, 2024 at 06:07:54PM +0300, Serge Semin wrote:
quoted
On Wed, Jul 03, 2024 at 04:06:54PM +0200, Andrew Lunn wrote:
quoted
On Wed, Jul 03, 2024 at 01:24:40PM +0100, Russell King (Oracle) wrote:
quoted
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.
This appears to be the only use of
GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK. Maybe it should be removed after
this change?
There is a PCS-refactoring work initiated by Russell, which besides of
other things may eventually imply dropping this macro:
https://lore.kernel.org/netdev/20240624132802.14238-6-fancer.lancer@gmail.com/
So unless it is strongly required I guess there is no much need in
respinning this patch or implementing additional one for now.
Nevertheless, a respin is worth doing with Andrew's suggested change
because this patch will impact the refactoring work even without that
change. We might as well have a complete patch for this change.
(Besides, I've already incorporated Andrew's feedback!)
Ok. I just noted that that the respinning wasn't required due to the
same change implied by another patchset. But since you have already
implemented the change to make the patch more complete, then it's even
better than waiting for our STMMAC PCS discussions over.
-Serge(y)
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.
Thanks to Abhishek Chauhan for providing a response on this issue.
Signed-off-by: Russell King (Oracle) <redacted>
---
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)