mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Oliver Pinter (Pintér Olivér)" <oliver.pntr@gmail.com>
To: "Linux Kernel" <linux-kernel@vger.kernel.org>,
	stable@kernel.org, stable-commits@vger.kernel.org
Cc: "chrisw@sous-sol.org" <chrisw@sous-sol.org>,
	"Greg KH" <gregkh@suse.de>, "Willy Tarreau" <w@1wt.eu>,
	"Adrian Bunk" <bunk@kernel.org>,
	"Stephen Hemminger" <shemminger@linux-foundation.org>,
	"Jeff Garzik" <jeff@garzik.org>, "Jeff Mahoney" <jeffm@suse.com>
Subject: [2.6.22.y] {10/17} - via-velocity-dont-oops-on-mtu-change-1 - series for stable kernel
Date: Tue, 29 Jan 2008 00:13:51 +0100	[thread overview]
Message-ID: <6101e8c40801281513j4b561dfdv52406f31bf313284@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 19 bytes --]

-- 
Thanks,
Oliver

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: via-velocity-dont-oops-on-mtu-change-1 --]
[-- Type: text/x-diff; name=via-velocity-dont-oops-on-mtu-change-1, Size: 1015 bytes --]

commit cefe0b205bc46195bd3d727c3a64d1315eb348d1
Author: Stephen Hemminger <shemminger@linux-foundation.org>
Date:   Thu Nov 15 03:47:27 2007 -0800

    Subject: [VIA_VELOCITY]: Don't oops on MTU change.
    Patch-mainline: v2.6.24-rc3
    References: 341537
    
    [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@linux-foundation.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Acked-by: Jeff Mahoney <jeffm@suse.com>

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index b670b97..63a2f81 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1798,6 +1798,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);
 

                 reply	other threads:[~2008-01-28 23:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6101e8c40801281513j4b561dfdv52406f31bf313284@mail.gmail.com \
    --to=oliver.pntr@gmail.com \
    --cc=bunk@kernel.org \
    --cc=chrisw@sous-sol.org \
    --cc=gregkh@suse.de \
    --cc=jeff@garzik.org \
    --cc=jeffm@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®