Commit 41eeb7cd authored by Kamil Trzciński's avatar Kamil Trzciński

ayufan: stmmac: disable TX offload for mtu bigger than 1498

parent 6ba42b59
Pipeline #50994945 passed with stage
in 5 minutes
......@@ -170,7 +170,7 @@
phy-mode = "rgmii";
pinctrl-names = "default";
pinctrl-0 = <&rgmiim1_pins>;
snps,force_thresh_dma_mode;
rockchip,bugged_tx_coe;
snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
snps,reset-delays-us = <0 10000 50000>;
......
......@@ -265,7 +265,7 @@
phy-mode = "rgmii";
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
snps,force_thresh_dma_mode;
rockchip,bugged_tx_coe;
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
snps,reset-delays-us = <0 10000 50000>;
......
......@@ -3629,6 +3629,10 @@ static netdev_features_t stmmac_fix_features(struct net_device *dev,
if (priv->plat->bugged_jumbo && (dev->mtu > ETH_DATA_LEN))
features &= ~NETIF_F_CSUM_MASK;
/* Including very small MTUs of 1498 for Rockchip devices */
if (priv->plat->bugged_tx_coe && (dev->mtu > ETH_DATA_LEN - 2))
features &= ~NETIF_F_CSUM_MASK;
/* Disable tso if asked by ethtool */
if ((priv->plat->tso_en) && (priv->dma_cap.tsoen)) {
if (features & NETIF_F_TSO)
......
......@@ -516,6 +516,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
pr_warn("force_sf_dma_mode is ignored if force_thresh_dma_mode is set.");
}
plat->bugged_tx_coe = of_property_read_bool(np, "rockchip,bugged_tx_coe");
of_property_read_u32(np, "snps,ps-speed", &plat->mac_port_sel_speed);
plat->axi = stmmac_axi_setup(pdev);
......
......@@ -162,6 +162,7 @@ struct plat_stmmacenet_data {
int pmt;
int force_sf_dma_mode;
int force_thresh_dma_mode;
int bugged_tx_coe;
int riwt_off;
int max_speed;
int maxmtu;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment