From: Stephen Hemminger <stephen@networkplumber.org>
To: Andy Green <andy.green@linaro.org>
Cc: netdev@vger.kernel.org, Francois Romieu <romieu@fr.zoreil.com>,
patches@linaro.org
Subject: Re: [net-next PATCH 2] net: ethernet driver: Fujitsu OGMA
Date: Tue, 10 Jun 2014 10:28:34 -0700 [thread overview]
Message-ID: <20140610102834.450effd6@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20140610010803.18695.88446.stgit@localhost.localdomain>
On Tue, 10 Jun 2014 09:08:03 +0800
Andy Green <andy.green@linaro.org> wrote:
> +static int ogma_netdev_change_mtu(struct net_device *net_device, int new_mtu)
> +{
> + struct ogma_ndev *ndev = netdev_priv(net_device);
> +
> + if (!ndev->priv->param.use_jumbo_pkt_flag)
> + return eth_change_mtu(net_device, new_mtu);
> +
> + if ((new_mtu < 68) || (new_mtu > 9000))
> + return -EINVAL;
> +
> + net_device->mtu = new_mtu;
> +
> + return 0;
> +}
> +
I don't think this works. rx_pkt_buf_len is only set at probe time.
Don't you need to:
1. Stop device if running
2. Free existing receive buffers
3. change rx_pkt_buf_len
4. Refill restart receiver.
Most devices setup receive ring in open (not probe)
to handle this. It also avoid grabbing memory if device is unused.
next prev parent reply other threads:[~2014-06-10 17:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 1:08 [net-next PATCH 2] net: ethernet driver: Fujitsu OGMA Andy Green
2014-06-10 2:14 ` Florian Fainelli
2014-06-10 2:54 ` Andy Green
2014-06-10 3:12 ` Joe Perches
2014-06-10 4:04 ` Andy Green
2014-06-10 17:19 ` Stephen Hemminger
2014-06-10 17:20 ` Stephen Hemminger
2014-06-10 17:24 ` Stephen Hemminger
2014-06-10 17:28 ` Stephen Hemminger [this message]
2014-06-20 7:10 ` Andy Green
2014-06-10 17:29 ` Stephen Hemminger
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=20140610102834.450effd6@nehalam.linuxnetplumber.net \
--to=stephen@networkplumber.org \
--cc=andy.green@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=patches@linaro.org \
--cc=romieu@fr.zoreil.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;
as well as URLs for NNTP newsgroup(s).