Re: [PATCH net-next v2 12/21] motorcomm:yt6801: Implement .ndo_tx_timeout and .ndo_change_mtu functions
From: Andrew Lunn
Date: Fri Nov 22 2024 - 18:19:36 EST
> +static int fxgmac_change_mtu(struct net_device *netdev, int mtu)
> +{
> + struct fxgmac_pdata *pdata = netdev_priv(netdev);
> + int old_mtu = netdev->mtu;
> + int ret;
> +
> + mutex_lock(&pdata->mutex);
> + fxgmac_stop(pdata);
> + fxgmac_free_tx_data(pdata);
> +
> + /* We must unmap rx desc's dma before we change rx_buf_size.
> + * Becaues the size of the unmapped DMA is set according to rx_buf_size
> + */
> + fxgmac_free_rx_data(pdata);
> + pdata->jumbo = mtu > ETH_DATA_LEN ? 1 : 0;
> + ret = fxgmac_calc_rx_buf_size(pdata, mtu);
> + if (ret < 0)
> + return ret;
> +
> + pdata->rx_buf_size = ret;
> + netdev->mtu = mtu;
> +
> + if (netif_running(netdev))
> + fxgmac_start(pdata);
> +
> + netdev_update_features(netdev);
> +
> + mutex_unlock(&pdata->mutex);
I don't see anything here handling pause when changing to/from jumbo.
Is it hiding somewhere?
Andrew