Skip to content

Commit

Permalink
[VIA_VELOCITY]: Don't oops on MTU change.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 15, 2007
1 parent d06fc1d commit bd7b3f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/via-velocity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bd7b3f3

Please sign in to comment.