From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
"Theodore Ts'o" <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
Chuck Ebbert <cebbert@redhat.com>,
Domenico Andreoli <cavokz@gmail.com>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, netdev@vger.kernel.org,
Stephen Hemminger <shemminger@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [patch 04/20] sky2: carrier management
Date: Mon, 20 Aug 2007 23:54:08 -0700 [thread overview]
Message-ID: <20070821065408.GE5275@kroah.com> (raw)
In-Reply-To: <20070821065210.GA5275@kroah.com>
[-- Attachment #1: sky2-carrier-mgmt.patch --]
[-- Type: text/plain, Size: 2132 bytes --]
-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stephen Hemminger <shemminger@linux-foundation.org>
backport of commit 55d7b4e6ed6ad3ec5e5e30b3b4515a0a6a53e344
Make sky2 handle carrier similar to other drivers,
eliminate some possible races in carrier state transistions.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/sky2.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1234,6 +1234,8 @@ static int sky2_up(struct net_device *de
if (netif_msg_ifup(sky2))
printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);
+ netif_carrier_off(dev);
+
/* must be power of 2 */
sky2->tx_le = pci_alloc_consistent(hw->pdev,
TX_RING_SIZE *
@@ -1573,7 +1575,6 @@ static int sky2_down(struct net_device *
/* Stop more packets from being queued */
netif_stop_queue(dev);
- netif_carrier_off(dev);
/* Disable port IRQ */
imask = sky2_read32(hw, B0_IMSK);
@@ -1625,6 +1626,8 @@ static int sky2_down(struct net_device *
sky2_phy_power(hw, port, 0);
+ netif_carrier_off(dev);
+
/* turn off LED's */
sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
@@ -1689,7 +1692,6 @@ static void sky2_link_up(struct sky2_por
gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_DEF_MSK);
netif_carrier_on(sky2->netdev);
- netif_wake_queue(sky2->netdev);
/* Turn on link LED */
sky2_write8(hw, SK_REG(port, LNK_LED_REG),
@@ -1741,7 +1743,6 @@ static void sky2_link_down(struct sky2_p
gma_write16(hw, port, GM_GP_CTRL, reg);
netif_carrier_off(sky2->netdev);
- netif_stop_queue(sky2->netdev);
/* Turn on link LED */
sky2_write8(hw, SK_REG(port, LNK_LED_REG), LINKLED_OFF);
@@ -3493,10 +3494,6 @@ static __devinit struct net_device *sky2
memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port * 8, ETH_ALEN);
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- /* device is off until link detection */
- netif_carrier_off(dev);
- netif_stop_queue(dev);
-
return dev;
}
--
next prev parent reply other threads:[~2007-08-21 6:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070821064251.972690753@blue.kroah.org>
2007-08-21 6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
2007-08-21 6:53 ` [patch 01/20] hwmon: fix w83781d temp sensor type setting Greg KH
2007-08-21 6:53 ` [patch 02/20] hwmon: (smsc47m1) restore missing name attribute Greg KH
2007-08-21 6:53 ` [patch 03/20] sky2: restore workarounds for lost interrupts Greg KH
2007-08-21 6:54 ` Greg KH [this message]
2007-08-21 6:54 ` [patch 05/20] sky2: check for more work before leaving NAPI Greg KH
2007-08-21 6:54 ` [patch 06/20] sky2: check drop truncated packets Greg KH
2007-08-21 18:10 ` [PATCH] sky2: don't clear phy power bits Stephen Hemminger
2007-08-21 18:26 ` Linus Torvalds
2007-08-21 18:50 ` Stephen Hemminger
2007-08-21 6:54 ` [patch 07/20] revert "x86, serial: convert legacy COM ports to platform devices" Greg KH
2007-08-21 6:54 ` [patch 08/20] ACPICA: Fixed possible corruption of global GPE list Greg KH
2007-08-21 6:55 ` [patch 09/20] ACPICA: Clear reserved fields for incoming ACPI 1.0 FADTs Greg KH
2007-08-21 6:55 ` [patch 10/20] AVR32: Fix atomic_add_unless() and atomic_sub_unless() Greg KH
2007-08-21 6:55 ` [patch 11/20] r8169: avoid needless NAPI poll scheduling Greg KH
2007-08-21 6:55 ` [patch 12/20] forcedeth: fix random hang in forcedeth driver when using netconsole Greg KH
2007-08-21 6:55 ` [patch 13/20] libata: add ATI SB700 device IDs to AHCI driver Greg KH
2007-08-21 6:55 ` [patch 14/20] Hibernation: do not try to mark invalid PFNs as nosave Greg KH
2007-08-21 6:55 ` [patch 15/20] i386: allow debuggers to access the vsyscall page with compat vDSO Greg KH
2007-08-21 6:55 ` [patch 16/20] x86_64: Check for .cfi_rel_offset in CFI probe Greg KH
2007-08-21 6:55 ` [patch 17/20] x86_64: Change PMDS invocation to single macro Greg KH
2007-08-21 6:56 ` [patch 18/20] i386: Handle P6s without performance counters in nmi watchdog Greg KH
2007-08-21 6:56 ` [patch 19/20] i386: Fix double fault handler Greg KH
2007-08-21 6:56 ` [patch 20/20] JFFS2 locking regression fix Greg KH
2007-08-21 15:33 ` [patch 00/20] 2.6.22-stable review Justin M. Forbes
2007-08-23 0:10 ` [stable] " Greg KH
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=20070821065408.GE5275@kroah.com \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cavokz@gmail.com \
--cc=cebbert@redhat.com \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkrufky@linuxtv.org \
--cc=netdev@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=shemminger@linux-foundation.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=zwane@arm.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.