Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934612AbYBVVtv (ORCPT ); Fri, 22 Feb 2008 16:49:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933587AbYBVVnl (ORCPT ); Fri, 22 Feb 2008 16:43:41 -0500 Received: from ns2.suse.de ([195.135.220.15]:60496 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933500AbYBVVnk (ORCPT ); Fri, 22 Feb 2008 16:43:40 -0500 Date: Fri, 22 Feb 2008 13:40:37 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Stephen Hemminger , "David S. Miller" , Jeff Mahoney , Oliver Pinter Subject: [patch 13/23] VIA_VELOCITY: Dont oops on MTU change. Message-ID: <20080222214037.GN8686@suse.de> References: <20080222213114.583282464@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="via_velocity-don-t-oops-on-mtu-change.patch" In-Reply-To: <20080222213927.GA8686@suse.de> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1184 Lines: 43 2.6.22-stable review patch. If anyone has any objections, please let us know. ------------------ From: Stephen Hemminger mainline: bd7b3f34198071d8bec05180530c362f1800ba46 Simple mtu change when device is down. Fix http://bugzilla.kernel.org/show_bug.cgi?id=9382. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller Acked-by: Jeff Mahoney CC: Oliver Pinter Signed-off-by: Greg Kroah-Hartman --- drivers/net/via-velocity.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -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); -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/