]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[VIA_VELOCITY]: Don't oops on MTU change.
authorStephen Hemminger <shemminger@linux-foundation.org>
Thu, 15 Nov 2007 03:47:27 +0000 (19:47 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2007 03:47:27 +0000 (19:47 -0800)
Simple mtu change when device is down.
Fix http://bugzilla.kernel.org/show_bug.cgi?id=9382.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/via-velocity.c

index 5c4a92de9a076b703fd63708a3793311d8a5cbd1..450e29d7a9f34118bc24455abcec788e596e9dff 100644 (file)
@@ -1963,6 +1963,11 @@ static int velocity_change_mtu(struct net_device *dev, int new_mtu)
                return -EINVAL;
        }
 
+       if (!netif_running(dev)) {
+               dev->mtu = new_mtu;
+               return 0;
+       }
+
        if (new_mtu != oldmtu) {
                spin_lock_irqsave(&vptr->lock, flags);