From: Eric Dumazet <eric.dumazet@gmail.com>
To: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
Deepak SIKRI <deepak.sikri@st.com>
Subject: Re: [net-next 2/5] stmmac: allow mtu bigger than 1500 in case of normal desc (V2).
Date: Wed, 12 Oct 2011 21:58:01 +0200 [thread overview]
Message-ID: <1318449481.2644.11.camel@edumazet-laptop> (raw)
In-Reply-To: <1318426688-9419-3-git-send-email-peppe.cavallaro@st.com>
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@st.com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.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...
next prev parent reply other threads:[~2011-10-12 19:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 13:38 [net-next 0/5] stmmac: update to Oct 2011 version (V2) Giuseppe CAVALLARO
2011-10-12 13:38 ` [net-next 1/5] stmmac: add CHAINED descriptor mode support (V2) Giuseppe CAVALLARO
2011-10-13 20:39 ` David Miller
2011-10-14 7:10 ` Giuseppe CAVALLARO
2011-10-12 13:38 ` [net-next 2/5] stmmac: allow mtu bigger than 1500 in case of normal desc (V2) Giuseppe CAVALLARO
2011-10-12 19:58 ` Eric Dumazet [this message]
2011-10-14 7:15 ` Giuseppe CAVALLARO
2011-10-12 13:38 ` [net-next 3/5] stmmac: protect tx process with lock (V2) Giuseppe CAVALLARO
2011-10-12 13:38 ` [net-next 4/5] stmmac: Stop advertising 1000Base capabilties for non GMII iface (V2) Giuseppe CAVALLARO
2011-10-12 13:38 ` [net-next 5/5] stmmac: update the driver version and doc (V2) Giuseppe CAVALLARO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318449481.2644.11.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=deepak.sikri@st.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox