[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <581643c0-7813-4203-aacb-07c2eca73b88@lunn.ch>
Date: Sat, 23 Nov 2024 00:19:23 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Frank Sae <Frank.Sae@...or-comm.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, xiaogang.fan@...or-comm.com,
fei.zhang@...or-comm.com, hua.sun@...or-comm.com
Subject: Re: [PATCH net-next v2 12/21] motorcomm:yt6801: Implement
.ndo_tx_timeout and .ndo_change_mtu functions
> +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
Powered by blists - more mailing lists