From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/5] sky2: receive error handling fix
Date: Fri, 01 Dec 2006 14:29:33 -0800 [thread overview]
Message-ID: <20061201223217.701523945@osdl.org> (raw)
In-Reply-To: 20061201222931.730523290@osdl.org
[-- Attachment #1: sky2-rcv-err.patch --]
[-- Type: text/plain, Size: 1036 bytes --]
If sky2 detects out of memory, or gets a bad frame, it reuses the same receive
buffer, but forgets to poke the hardware. This could lead to the receiver
getting stuck if there were lots of errors.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
---
drivers/net/sky2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- netdev-2.6.orig/drivers/net/sky2.c 2006-12-01 14:19:32.000000000 -0800
+++ netdev-2.6/drivers/net/sky2.c 2006-12-01 14:23:21.000000000 -0800
@@ -2065,7 +2065,7 @@
case OP_RXSTAT:
skb = sky2_receive(dev, length, status);
if (!skb)
- break;
+ goto force_update;
skb->protocol = eth_type_trans(skb, dev);
dev->last_rx = jiffies;
@@ -2081,8 +2081,8 @@
/* Update receiver after 16 frames */
if (++buf_write[le->link] == RX_BUF_WRITE) {
- sky2_put_idx(hw, rxqaddr[le->link],
- sky2->rx_put);
+force_update:
+ sky2_put_idx(hw, rxqaddr[le->link], sky2->rx_put);
buf_write[le->link] = 0;
}
--
Stephen Hemminger <shemminger@osdl.org>
next prev parent reply other threads:[~2006-12-01 22:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 22:29 [PATCH 0/5] sky2: driver update Stephen Hemminger
2006-12-01 22:29 ` Stephen Hemminger [this message]
2006-12-01 22:29 ` [PATCH 2/5] sky2: add Dlink 560SX id Stephen Hemminger
2006-12-01 22:29 ` [PATCH 3/5] sky2: fixes for Yukon EC_U chip revisions Stephen Hemminger
2006-12-01 22:29 ` [PATCH 4/5] sky2: kfree_skb_any needed Stephen Hemminger
2006-12-01 22:29 ` [PATCH 5/5] sky2: msi enhancements Stephen Hemminger
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=20061201223217.701523945@osdl.org \
--to=shemminger@osdl.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;
as well as URLs for NNTP newsgroup(s).