netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Mike McCormack <mikem@ring3k.org>
Subject: [PATCH 4/8] sky2: Reset tx train after interrupts disabled.
Date: Thu, 06 Aug 2009 09:12:17 -0700	[thread overview]
Message-ID: <20090806161232.765129242@vyatta.com> (raw)
In-Reply-To: 20090806161213.148382653@vyatta.com

[-- Attachment #1: sky2-tx3.patch --]
[-- Type: text/plain, Size: 1089 bytes --]

Reseting the tx chain too soon results in invalid tx queue positions
being delivered in the status queue.  This also makes sure there's no
overlap between the cleanup done by sky2_tx_clean() and
sky2_tx_done().

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
---
 drivers/net/sky2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index a9bb3fa..ac303cb 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1866,8 +1866,6 @@ static int sky2_down(struct net_device *dev)
 	      && port == 0 && hw->dev[1] && netif_running(hw->dev[1])))
 		sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET);

-	sky2_tx_reset(sky2);
-
 	sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);

 	/* Force any delayed status interrrupt and NAPI */
@@ -1892,6 +1890,8 @@ static int sky2_down(struct net_device *dev)
 	/* turn off LED's */
 	sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);

+	sky2_tx_reset(sky2);
+
 	sky2_tx_clean(dev);
 	sky2_rx_clean(sky2);

-- 
1.5.6.5

-- 


  parent reply	other threads:[~2009-08-06 16:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 16:12 [PATCH 0/8] sky2: driver update Stephen Hemminger
2009-08-06 16:12 ` [PATCH 1/8] Revert "sky2: Avoid transmits during sky2_down()" Stephen Hemminger
2009-08-06 16:12 ` [PATCH 2/8] sky2: Avoid rewinding sky2->tx_prod Stephen Hemminger
2009-08-06 16:12 ` [PATCH 3/8] sky2: Move tx reset functionality to sky2_tx_reset() Stephen Hemminger
2009-08-06 16:12 ` Stephen Hemminger [this message]
2009-08-06 16:12 ` [PATCH 5/8] sky2: Remove tx locks Stephen Hemminger
2009-08-06 16:12 ` [PATCH 6/8] sky2: Lock tx queue when calling sky2_down locally Stephen Hemminger
2009-08-06 16:12 ` [PATCH 7/8] sky2: hold RTNL when doing suspend/shutdown operations Stephen Hemminger
2009-08-06 16:12 ` [PATCH 8/8] sky2: hold spinlock around phy_power_down Stephen Hemminger
2009-08-10  4:09 ` [PATCH 0/8] sky2: driver update David Miller
2009-08-10 15:48   ` Stephen Hemminger
2009-08-11  0:52     ` David Miller

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=20090806161232.765129242@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=mikem@ring3k.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).