From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 2/2] sky2: fix transmit state on resume
Date: Thu, 27 Sep 2007 12:38:12 -0700 [thread overview]
Message-ID: <20070927123812.4e2185f3@freepuppy.rosehill> (raw)
In-Reply-To: <20070926175847.706025d0@freepuppy.rosehill>
This should fix http://bugzilla.kernel.org/show_bug.cgi?id=8667
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.
Patch is against 2.6.23-rc8 after last patch:
sky2: FE+ vlan workaround
(Should also work on older releases with minor fuzz).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
--- a/drivers/net/sky2.c 2007-09-27 08:45:13.000000000 -0700
+++ b/drivers/net/sky2.c 2007-09-27 09:39:49.000000000 -0700
@@ -910,6 +910,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)
{
@@ -1320,7 +1334,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);
next prev parent reply other threads:[~2007-09-27 19:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 0:58 [PATCH] sky2: sky2 FE+ receive status workaround Stephen Hemminger
2007-09-27 8:14 ` Jochen Voß
2007-09-27 13:58 ` Stephen Hemminger
2007-09-27 15:23 ` Jochen Voss
2007-09-27 19:32 ` [PATCH 1/2] sky2: FE+ vlan workaround Stephen Hemminger
2007-09-28 3:35 ` Jeff Garzik
2007-09-27 19:38 ` Stephen Hemminger [this message]
2007-09-28 3:35 ` [PATCH 2/2] sky2: fix transmit state on resume Jeff Garzik
2007-09-28 3:33 ` [PATCH] sky2: sky2 FE+ receive status workaround Jeff Garzik
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=20070927123812.4e2185f3@freepuppy.rosehill \
--to=shemminger@linux-foundation.org \
--cc=jgarzik@pobox.com \
--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