[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071115102005.0cf46f9a@freepuppy.rosehill>
Date: Thu, 15 Nov 2007 10:20:05 -0800
From: Stephen Hemminger <shemminger@...ux-foundation.org>
To: Jarek Poplawski <jarkao2@...pl>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"David S\. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
jnelson-kernel-bugzilla@...poni.net
Subject: Re: [PATCH] via-velocity: don't oops on MTU change.
On Thu, 15 Nov 2007 09:26:00 +0100
Jarek Poplawski <jarkao2@...pl> wrote:
> On 15-11-2007 04:38, Stephen Hemminger wrote:
> > Simple mtu change when device is down.
> > Fix http://bugzilla.kernel.org/show_bug.cgi?id=9382.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@...ux-foundation.org>
> >
> >
> > --- a/drivers/net/via-velocity.c 2007-10-22 09:38:11.000000000 -0700
> > +++ b/drivers/net/via-velocity.c 2007-11-14 19:34:30.000000000 -0800
> > @@ -1963,6 +1963,11 @@ static int velocity_change_mtu(struct ne
> > return -EINVAL;
> > }
> >
> > + if (!netif_running(dev)) {
> > + dev->mtu = new_mtu;
> > + return 0;
> > + }
> > +
> > if (new_mtu != oldmtu) {
> > spin_lock_irqsave(&vptr->lock, flags);
>
> Shouldn't this latter 'if' be removed now, btw?
No, it makes sense that if mtu is same, no action need be taken.
Actually, it would make sense to push the same check up into
the netdevice core management.
--
Stephen Hemminger <shemminger@...ux-foundation.org>
-
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