Skip to content

mediatek/filogic: mtk-eth-soc add initial support for jumbo frames on mt7988 #17121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

rmandrad
Copy link
Contributor

@rmandrad rmandrad commented Nov 30, 2024

Device Compatibility Check:

Introduced is_mt7988_eth to determine compatibility with the mediatek,mt7988-eth hardware.
Includes logging messages for debugging compatibility during initialization.

Enhanced MTU Configuration:

Adjusted eth->netdev[id]->max_mtu to support jumbo frames if is_mt7988_eth is true.
Default MTU remains the same for other device types.

Dynamic RX Frame Size Handling:

Modified logic in mtk_mac_config to accommodate jumbo frames and extended frame size configurations:
    For MTK_GDM_TYPE, jumbo frames are enabled when is_mt7988_eth is true.
    Added logic to handle extended frame sizes for MTK_XGDM_TYPE using the new MTK_XMAC_RX_CFG2.

Initialization Updates:

Extended device initialization to verify compatibility and set is_mt7988_eth accordingly.

Enhanced Register Configuration:

Modified MAC control register (MAC_MCR) handling:
    Configures RX frame sizes based on the new maximum frame size (MTK_MAX_RX_LENGTH_9K) if is_mt7988_eth is enabled.
Configures the MTK_XMAC_RX_CFG2 register for MTK_XGDM_TYPE devices.

tested on: filogic/bananapi4

Signed-off-by: Rudy Andram rmandrad@gmail.com

@github-actions github-actions bot added the target/mediatek pull request/issue for mediatek target label Nov 30, 2024
Device Compatibility Check:

    Introduced is_mt7988_eth to determine compatibility with the mediatek,mt7988-eth hardware.
    Includes logging messages for debugging compatibility during initialization.

Enhanced MTU Configuration:

    Adjusted eth->netdev[id]->max_mtu to support jumbo frames if is_mt7988_eth is true.
    Default MTU remains the same for other device types.

Dynamic RX Frame Size Handling:

    Modified logic in mtk_mac_config to accommodate jumbo frames and extended frame size configurations:
        For MTK_GDM_TYPE, jumbo frames are enabled when is_mt7988_eth is true.
        Added logic to handle extended frame sizes for MTK_XGDM_TYPE using the new MTK_XMAC_RX_CFG2.

Initialization Updates:

    Extended device initialization to verify compatibility and set is_mt7988_eth accordingly.

Enhanced Register Configuration:

    Modified MAC control register (MAC_MCR) handling:
        Configures RX frame sizes based on the new maximum frame size (MTK_MAX_RX_LENGTH_9K) if is_mt7988_eth is enabled.
    Configures the MTK_XMAC_RX_CFG2 register for MTK_XGDM_TYPE devices.

tested on: filogic/bananapi4

Signed-off-by: Rudy Andram <rmandrad@gmail.com>
+ if (!of_device_is_compatible(pdev->dev.of_node, "mediatek,mt7988-eth")) {;
+ is_mt7988_eth = false;
+ } else {
+ dev_info(&pdev->dev, "Device compatible with mediatek,mt7988-eth - Jumbo frames capable\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  •      dev_info(&pdev->dev, "Device compatible with mediatek,mt7988-eth - Jumbo frames 9216 capable\n");
    

@rmandrad rmandrad changed the title mediatek: mtk-eth-soc add initial support for jumbo frames on mt7988 mediatek/filogic: mtk-eth-soc add initial support for jumbo frames on mt7988 Dec 1, 2024
…ames on mt7988

mediatek: mtk-eth-soc add initial support for jumbo frames on mt7988

Device Compatibility Check:

    Introduced is_mt7988_eth to determine compatibility with the mediatek,mt7988-eth hardware.
    Includes logging messages for debugging compatibility during initialization.

Enhanced MTU Configuration:

    Adjusted eth->netdev[id]->max_mtu to support jumbo frames if is_mt7988_eth is true.
    Default MTU remains the same for other device types.

Dynamic RX Frame Size Handling:

    Modified logic in mtk_mac_config to accommodate jumbo frames and extended frame size configurations:
        For MTK_GDM_TYPE, jumbo frames are enabled when is_mt7988_eth is true.
        Added logic to handle extended frame sizes for MTK_XGDM_TYPE using the new MTK_XMAC_RX_CFG2.

Initialization Updates:

    Extended device initialization to verify compatibility and set is_mt7988_eth accordingly.

Enhanced Register Configuration:

    Modified MAC control register (MAC_MCR) handling:
        Configures RX frame sizes based on the new maximum frame size (MTK_MAX_RX_LENGTH_9K) if is_mt7988_eth is enabled.
    Configures the MTK_XMAC_RX_CFG2 register for MTK_XGDM_TYPE devices.

tested on: filogic/bananapi4

Signed-off-by: Rudy Andram <rmandrad@gmail.com>
@rmandrad rmandrad closed this Dec 1, 2024
@rmandrad rmandrad deleted the mtkjumbo branch December 1, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target/mediatek pull request/issue for mediatek target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants