mbox series

[net-next,00/12] mtk_eth_soc phylink updates

Message ID YoUIX+BN/ZbyXzTT@shell.armlinux.org.uk (mailing list archive)
Headers show
Series mtk_eth_soc phylink updates | expand

Message

Russell King (Oracle) May 18, 2022, 2:53 p.m. UTC
Hi,

This series ultimately updates mtk_eth_soc to use phylink_pcs, with some
fixes along the way.

Previous attempts to update this driver (which is now marked as legacy)
have failed due to lack of testing. I am hoping that this time will be
different; Marek can test RGMII modes, but not SGMII. So all that we
know is that this patch series probably doesn't break RGMII.

1) remove unused mac_mode and sgmii flags members from structures.
2) remove unnecessary interpretation of speed when configuring 1000
   and 2500 Base-X
3) move configuration of SGMII duplex setting from mac_config() to
   link_up()
4) only pass in interface mode to mtk_sgmii_setup_mode_force()
5) move decision about which mtk_sgmii_setup_mode_*() function to call
   into mtk_sgmii.c
6) add a fixme comment for RGMII explaning why the call to
   mtk_gmac0_rgmii_adjust() is completely wrong - this needs to be
   addressed by someone who has the hardware and can test an appropriate
   fix. This fixme means that the driver still can't become non-legacy.
7) move gmac setup from mac_config() to mac_finish() - this preserves
   the order that we write to the hardware when we eventually convert to
   phylink_pcs()
8) move configuration of syscfg0 in SGMII/802.3z mode to mac_finish()
   for the same reasons as (7).
9) convert mtk_sgmii.c code structure and the mtk_sgmii structure to
   suit conversion to phylink_pcs
10) finally convert to phylink_pcs

As there has been no feedback from mtk_eth_soc maintainers to my RFC
on April 6th, not my reminder on April 11th, so it's now time to merge
this anyway. Mediatek code seems to be submitted to the kernel and
then the maintainers scarper...

 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 103 +++++++++-------
 drivers/net/ethernet/mediatek/mtk_eth_soc.h |  40 +++----
 drivers/net/ethernet/mediatek/mtk_sgmii.c   | 176 ++++++++++++++++------------
 3 files changed, 186 insertions(+), 133 deletions(-)

Comments

Marek BehĂșn May 18, 2022, 3:40 p.m. UTC | #1
On Wed, 18 May 2022 15:53:19 +0100
"Russell King (Oracle)" <linux@armlinux.org.uk> wrote:

> Hi,
> 
> This series ultimately updates mtk_eth_soc to use phylink_pcs, with some
> fixes along the way.
> 
> Previous attempts to update this driver (which is now marked as legacy)
> have failed due to lack of testing. I am hoping that this time will be
> different; Marek can test RGMII modes, but not SGMII. So all that we
> know is that this patch series probably doesn't break RGMII.
> 
> 1) remove unused mac_mode and sgmii flags members from structures.
> 2) remove unnecessary interpretation of speed when configuring 1000
>    and 2500 Base-X
> 3) move configuration of SGMII duplex setting from mac_config() to
>    link_up()
> 4) only pass in interface mode to mtk_sgmii_setup_mode_force()
> 5) move decision about which mtk_sgmii_setup_mode_*() function to call
>    into mtk_sgmii.c
> 6) add a fixme comment for RGMII explaning why the call to
>    mtk_gmac0_rgmii_adjust() is completely wrong - this needs to be
>    addressed by someone who has the hardware and can test an appropriate
>    fix. This fixme means that the driver still can't become non-legacy.
> 7) move gmac setup from mac_config() to mac_finish() - this preserves
>    the order that we write to the hardware when we eventually convert to
>    phylink_pcs()
> 8) move configuration of syscfg0 in SGMII/802.3z mode to mac_finish()
>    for the same reasons as (7).
> 9) convert mtk_sgmii.c code structure and the mtk_sgmii structure to
>    suit conversion to phylink_pcs
> 10) finally convert to phylink_pcs
> 
> As there has been no feedback from mtk_eth_soc maintainers to my RFC
> on April 6th, not my reminder on April 11th, so it's now time to merge
> this anyway. Mediatek code seems to be submitted to the kernel and
> then the maintainers scarper...
> 
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 103 +++++++++-------
>  drivers/net/ethernet/mediatek/mtk_eth_soc.h |  40 +++----
>  drivers/net/ethernet/mediatek/mtk_sgmii.c   | 176 ++++++++++++++++------------
>  3 files changed, 186 insertions(+), 133 deletions(-)
> 

Tested-by: Marek BehĂșn <kabel@kernel.org>
patchwork-bot+netdevbpf@kernel.org May 20, 2022, 1:20 a.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 18 May 2022 15:53:19 +0100 you wrote:
> Hi,
> 
> This series ultimately updates mtk_eth_soc to use phylink_pcs, with some
> fixes along the way.
> 
> Previous attempts to update this driver (which is now marked as legacy)
> have failed due to lack of testing. I am hoping that this time will be
> different; Marek can test RGMII modes, but not SGMII. So all that we
> know is that this patch series probably doesn't break RGMII.
> 
> [...]

Here is the summary with links:
  - [net-next,01/12] net: mtk_eth_soc: remove unused mac->mode
    https://git.kernel.org/netdev/net-next/c/0600bdde1fae
  - [net-next,02/12] net: mtk_eth_soc: remove unused sgmii flags
    https://git.kernel.org/netdev/net-next/c/5a7a2f4b29d7
  - [net-next,03/12] net: mtk_eth_soc: add mask and update PCS speed definitions
    https://git.kernel.org/netdev/net-next/c/bc5e93e0cd22
  - [net-next,04/12] net: mtk_eth_soc: correct 802.3z speed setting
    https://git.kernel.org/netdev/net-next/c/7da3f901f8ec
  - [net-next,05/12] net: mtk_eth_soc: correct 802.3z duplex setting
    https://git.kernel.org/netdev/net-next/c/a459187390bb
  - [net-next,06/12] net: mtk_eth_soc: stop passing phylink state to sgmii setup
    https://git.kernel.org/netdev/net-next/c/4ce5a0bd3958
  - [net-next,07/12] net: mtk_eth_soc: provide mtk_sgmii_config()
    https://git.kernel.org/netdev/net-next/c/1ec619ee4a05
  - [net-next,08/12] net: mtk_eth_soc: add fixme comment for state->speed use
    https://git.kernel.org/netdev/net-next/c/650a49bc65df
  - [net-next,09/12] net: mtk_eth_soc: move MAC_MCR setting to mac_finish()
    https://git.kernel.org/netdev/net-next/c/0e37ad71b2ff
  - [net-next,10/12] net: mtk_eth_soc: move restoration of SYSCFG0 to mac_finish()
    https://git.kernel.org/netdev/net-next/c/21089867278d
  - [net-next,11/12] net: mtk_eth_soc: convert code structure to suit split PCS support
    https://git.kernel.org/netdev/net-next/c/901f3fbe13c3
  - [net-next,12/12] net: mtk_eth_soc: partially convert to phylink_pcs
    https://git.kernel.org/netdev/net-next/c/14a44ab0330d

You are awesome, thank you!