[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4E97E17D.4010705@st.com>
Date: Fri, 14 Oct 2011 09:15:09 +0200
From: Giuseppe CAVALLARO <peppe.cavallaro@...com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
Deepak SIKRI <deepak.sikri@...com>
Subject: Re: [net-next 2/5] stmmac: allow mtu bigger than 1500 in case of
normal desc (V2).
Hello Eric
On 10/12/2011 9:58 PM, Eric Dumazet wrote:
> Le mercredi 12 octobre 2011 à 15:38 +0200, Giuseppe CAVALLARO a écrit :
>> This patch allows to set the mtu bigger than 1500
>> in case of normal descriptors.
>> This is helping some SPEAr customers.
>>
>> Signed-off-by: Deepak SIKRI <deepak.sikri@...com>
>> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@...com>
>> ---
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
>> 1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> index ba7af2c..de3e536 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> @@ -1357,17 +1357,17 @@ static void stmmac_set_rx_mode(struct net_device *dev)
>> static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
>> {
>> struct stmmac_priv *priv = netdev_priv(dev);
>> - int max_mtu;
>> + int max_mtu = ETH_DATA_LEN;
>
> Why are you setting max_mtu to ETH_DATA_LEN here ?
>
>>
>> if (netif_running(dev)) {
>> pr_err("%s: must be stopped to change its MTU\n", dev->name);
>> return -EBUSY;
>> }
>>
>> - if (priv->plat->has_gmac)
>> + if (priv->plat->enh_desc)
>> max_mtu = JUMBO_LEN;
>> else
>> - max_mtu = ETH_DATA_LEN;
>> + max_mtu = BUF_SIZE_4KiB;
>
> Since later you init to completely different values...
Hmm, yes you are right. it's not needed to initialized the max_mtu.
Thanks! I'll rework the patch and send it again in the V3.
Thx
Regards
Peppe
>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists