提交 bd7b3f34 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

[VIA_VELOCITY]: Don't oops on MTU change.

Simple mtu change when device is down.
Fix http://bugzilla.kernel.org/show_bug.cgi?id=9382.
Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d06fc1d9
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册