[2.6.22.y] {10/17} - via-velocity-dont-oops-on-mtu-change-1 - series for stable kernel #2

From: Oliver Pinter (Pintér Olivér)
Date: Fri Feb 01 2008 - 20:36:49 EST


mainline: bd7b3f34198071d8bec05180530c362f1800ba46


--
Thanks,
Oliver
--- Begin Message --- [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: Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Acked-by: Jeff Mahoney <jeffm@xxxxxxxx>
---
drivers/net/via-velocity.c | 5 +++++
1 file changed, 5 insertions(+)

--- a/drivers/net/via-velocity.c 2008-01-03 15:18:35.000000000 -0500
+++ b/drivers/net/via-velocity.c 2008-01-03 15:18:50.000000000 -0500
@@ -1798,6 +1798,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);


--- End Message ---