From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Krzysztof Oledzki <olel@ans.pl>, Greg KH <greg@kroah.com>
Cc: stable@kernel.org, netdev@vger.kernel.org
Subject: [PATCH 3/3] sky2: fix transmit state on resume
Date: Fri, 28 Sep 2007 09:48:14 -0700 [thread overview]
Message-ID: <20070928164858.593540259@linux-foundation.org> (raw)
In-Reply-To: 20070928164811.387831540@linux-foundation.org
[-- Attachment #1: sky2-tx-sum-resume.patch --]
[-- Type: text/plain, Size: 1190 bytes --]
After resume, driver has reset the chip so the current state
of transmit checksum offload state machine and DMA state machine
will be undefined.
The fix is to set the state so that first Tx will set MSS and offset
values.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
--- a/drivers/net/sky2.c 2007-09-28 09:21:26.000000000 -0700
+++ b/drivers/net/sky2.c 2007-09-28 09:21:37.000000000 -0700
@@ -831,6 +831,20 @@ static inline struct sky2_tx_le *get_tx_
return le;
}
+static void tx_init(struct sky2_port *sky2)
+{
+ struct sky2_tx_le *le;
+
+ sky2->tx_prod = sky2->tx_cons = 0;
+ sky2->tx_tcpsum = 0;
+ sky2->tx_last_mss = 0;
+
+ le = get_tx_le(sky2);
+ le->addr = 0;
+ le->opcode = OP_ADDR64 | HW_OWNER;
+ sky2->tx_addr64 = 0;
+}
+
static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2,
struct sky2_tx_le *le)
{
@@ -1244,7 +1258,8 @@ static int sky2_up(struct net_device *de
GFP_KERNEL);
if (!sky2->tx_ring)
goto err_out;
- sky2->tx_prod = sky2->tx_cons = 0;
+
+ tx_init(sky2);
sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES,
&sky2->rx_le_map);
--
Stephen Hemminger <shemminger@linux-foundation.org>
prev parent reply other threads:[~2007-09-28 16:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-28 16:48 [PATCH 0/3] sky2: patches for 2.6.22.y Stephen Hemminger
2007-09-28 16:48 ` [PATCH 1/3] sky2: reduce impact of watchdog timer Stephen Hemminger
2007-09-28 16:48 ` [PATCH 2/3] sky2: fix VLAN receive processing Stephen Hemminger
2007-09-28 18:40 ` Krzysztof Oledzki
2007-09-28 19:20 ` [stable] " Chris Wright
2007-09-28 19:36 ` Stephen Hemminger
2007-09-28 19:41 ` Chris Wright
2007-09-28 16:48 ` Stephen Hemminger [this message]
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=20070928164858.593540259@linux-foundation.org \
--to=shemminger@linux-foundation.org \
--cc=greg@kroah.com \
--cc=netdev@vger.kernel.org \
--cc=olel@ans.pl \
--cc=stable@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 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.