d6e3316a | 14-Jan-2025 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: pcs: xpcs: actively unset DW_VR_MII_DIG_CTRL1_2G5_EN for 1G SGMII
xpcs_config_2500basex() sets DW_VR_MII_DIG_CTRL1_2G5_EN, but xpcs_config_aneg_c37_sgmii() never unsets it. So, on a protocol ch
net: pcs: xpcs: actively unset DW_VR_MII_DIG_CTRL1_2G5_EN for 1G SGMII
xpcs_config_2500basex() sets DW_VR_MII_DIG_CTRL1_2G5_EN, but xpcs_config_aneg_c37_sgmii() never unsets it. So, on a protocol change from 2500base-x to sgmii, the DW_VR_MII_DIG_CTRL1_2G5_EN bit will remain set.
Fixes: f27abde3042a ("net: pcs: add 2500BASEX support for Intel mGbE controller") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20250114164721.2879380-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
2410719c | 03-Jan-2025 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: make xpcs_get_interfaces() static
xpcs_get_interfaces() should no longer be used outside of the XPCS code, so make it static.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlin
net: pcs: xpcs: make xpcs_get_interfaces() static
xpcs_get_interfaces() should no longer be used outside of the XPCS code, so make it static.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/E1tTffk-007Roi-JM@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
b0f88c1b | 03-Jan-2025 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: lynx: fill in PCS supported_interfaces
Fill in the new PCS supported_interfaces member with the interfaces that Lynx supports.
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.co
net: pcs: lynx: fill in PCS supported_interfaces
Fill in the new PCS supported_interfaces member with the interfaces that Lynx supports.
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tTffa-007RoV-Bo@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
b87d4ee1 | 03-Jan-2025 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: mtk-lynxi: fill in PCS supported_interfaces
Fill in the new PCS supported_interfaces member with the interfaces that the Mediatek LynxI supports.
Signed-off-by: Russell King (Oracle) <rmk
net: pcs: mtk-lynxi: fill in PCS supported_interfaces
Fill in the new PCS supported_interfaces member with the interfaces that the Mediatek LynxI supports.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Acked-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/E1tTffV-007RoP-8D@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
484d0170 | 05-Dec-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: implement pcs_inband_caps() method
Report the PCS inband capabilities to phylink for XPCS.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgi
net: pcs: xpcs: implement pcs_inband_caps() method
Report the PCS inband capabilities to phylink for XPCS.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tJ8NW-006L5V-I9@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
520d29bd | 05-Dec-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
Report the PCS in-band capabilities to phylink for the LynxI PCS.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link:
net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
Report the PCS in-band capabilities to phylink for the LynxI PCS.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tJ8NR-006L5P-E3@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
fd4056db | 17-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: remove return statements in void function
While using "return" when calling a void returning function inside a function that returns void doesn't cause a compiler warning, it looks w
net: pcs: xpcs: remove return statements in void function
While using "return" when calling a void returning function inside a function that returns void doesn't cause a compiler warning, it looks weird. Convert the bunch of if() statements to a switch() and remove these return statements.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
11afdf3b | 17-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: rename xpcs_config_usxgmii()
xpcs_config_usxgmii() is only called from the xpcs_link_up() method, so let's name it similarly to the SGMII and 1000BASEX functions.
Signed-off-by: Rus
net: pcs: xpcs: rename xpcs_config_usxgmii()
xpcs_config_usxgmii() is only called from the xpcs_link_up() method, so let's name it similarly to the SGMII and 1000BASEX functions.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
4145921c | 17-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: combine xpcs_link_up_{1000basex,sgmii}()
xpcs_link_up_sgmii() and xpcs_link_up_1000basex() are almost identical with the exception of checking the speed and duplex for 1000BASE-X. Co
net: pcs: xpcs: combine xpcs_link_up_{1000basex,sgmii}()
xpcs_link_up_sgmii() and xpcs_link_up_1000basex() are almost identical with the exception of checking the speed and duplex for 1000BASE-X. Combine the two functions.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
1c17f9d3 | 17-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: replace open-coded mii_bmcr_encode_fixed()
We can now see that we have an open-coded version of mii_bmcr_encode_fixed() when this is called with SPEED_1000:
val = BMCR_SPEED
net: pcs: xpcs: replace open-coded mii_bmcr_encode_fixed()
We can now see that we have an open-coded version of mii_bmcr_encode_fixed() when this is called with SPEED_1000:
val = BMCR_SPEED1000; if (duplex == DUPLEX_FULL) val |= BMCR_FULLDPLX;
Replace this with a call to mii_bmcr_encode_fixed().
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
b61a465a | 17-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: rearrange xpcs_link_up_1000basex()
Rearrange xpcs_link_up_1000basex() to make it more obvious what will happen in the following commit.
Signed-off-by: Russell King (Oracle) <rmk+ker
net: pcs: xpcs: rearrange xpcs_link_up_1000basex()
Rearrange xpcs_link_up_1000basex() to make it more obvious what will happen in the following commit.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
8d2aeab4 | 17-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: remove switch() in xpcs_link_up_1000basex()
Remove an unnecessary switch() statement in xpcs_link_up_1000basex(). The only value this switch statement is interested in is SPEED_1000,
net: pcs: xpcs: remove switch() in xpcs_link_up_1000basex()
Remove an unnecessary switch() statement in xpcs_link_up_1000basex(). The only value this switch statement is interested in is SPEED_1000, all other values lead to an error. Replace this with a simple if() statement.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
bb0b8aec | 04-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: move Wangxun VR_XS_PCS_DIG_CTRL1 configuration
According to commits 2a22b7ae2fa3 ("net: pcs: xpcs: adapt Wangxun NICs for SGMII mode") and 2deea43f386d ("net: pcs: xpcs: add 1000BASE
net: pcs: xpcs: move Wangxun VR_XS_PCS_DIG_CTRL1 configuration
According to commits 2a22b7ae2fa3 ("net: pcs: xpcs: adapt Wangxun NICs for SGMII mode") and 2deea43f386d ("net: pcs: xpcs: add 1000BASE-X AN interrupt support"), Wangxun devices need special VR_XS_PCS_DIG_CTRL1 settings for SGMII and 1000BASE-X. Both SGMII and 1000BASE-X use the same settings.
Rather than placing these in the individual xpcs_config_*() functions, move it to where we already test for the Wangxun devices in xpcs_do_config().
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
5ba56193 | 04-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: correctly place DW_VR_MII_DIG_CTRL1_2G5_EN
Place DW_VR_MII_DIG_CTRL1_2G5_EN with the other DW_VR_MII_DIG_CTRL1 definitions rather than in the middle of a register list.
Signed-off-b
net: pcs: xpcs: correctly place DW_VR_MII_DIG_CTRL1_2G5_EN
Place DW_VR_MII_DIG_CTRL1_2G5_EN with the other DW_VR_MII_DIG_CTRL1 definitions rather than in the middle of a register list.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
acb5fb5a | 04-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: use dev_*() to print messages
Use the dev_*() family of functions to print all messages from the XPCS driver so we know which instance issues the messages.
Signed-off-by: Russell Ki
net: pcs: xpcs: use dev_*() to print messages
Use the dev_*() family of functions to print all messages from the XPCS driver so we know which instance issues the messages.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
d69908fa | 04-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: convert to use read_poll_timeout()
Convert the xpcs driver to use read_poll_timeout() when waiting for reset to complete, rather than open-coding this.
Signed-off-by: Russell King (
net: pcs: xpcs: convert to use read_poll_timeout()
Convert the xpcs driver to use read_poll_timeout() when waiting for reset to complete, rather than open-coding this.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
ce8d6081 | 04-Oct-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: pcs: xpcs: add _modify() accessors
The xpcs driver does a lot of read-modify-write operations on registers, which leads to long-winded code to read the register, check whether the read was succ
net: pcs: xpcs: add _modify() accessors
The xpcs driver does a lot of read-modify-write operations on registers, which leads to long-winded code to read the register, check whether the read was successful, modify the value in some way, and then write it back.
We have a mdiodev _modify() accessor that encapsulates this, and does the register modification under the MDIO bus lock ensuring that the modification is atomic with respect to other bus operations. Convert the xpcs driver to use this accessor.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|