Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd7b3f34198071d8bec05180530c362f1800ba46
Commit:     bd7b3f34198071d8bec05180530c362f1800ba46
Parent:     d06fc1d9b5518582f4982f908e820f2303d1eece
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 14 19:47:27 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Nov 14 19:47:27 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/via-velocity.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 5c4a92d..450e29d 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -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);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to