From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Eugene Konev <ejka@imfi.kspu.ru>, Jeff Garzik <jgarzik@pobox.com>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [RFT] cpmac: napi fix
Date: Wed, 12 Dec 2007 14:01:50 -0800 [thread overview]
Message-ID: <20071212140150.6002bc3b@freepuppy.rosehill> (raw)
The NAPI changes for 2.6.24 would break this driver. It doesn't return
correct value and has error if exactly "budget" packets are received.
Don't have ARM so this is by inspection only. Please test.
--- a/drivers/net/cpmac.c 2007-10-26 11:56:12.000000000 -0700
+++ b/drivers/net/cpmac.c 2007-12-12 13:48:40.000000000 -0800
@@ -439,14 +439,14 @@ static int cpmac_poll(struct napi_struct
if (unlikely(netif_msg_rx_status(priv)))
printk(KERN_DEBUG "%s: poll processed %d packets\n",
priv->dev->name, received);
- if (desc->dataflags & CPMAC_OWN) {
+
+ if (received < budget) {
netif_rx_complete(priv->dev, napi);
cpmac_write(priv->regs, CPMAC_RX_PTR(0), (u32)desc->mapping);
cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1);
- return 0;
}
- return 1;
+ return received;
}
static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
reply other threads:[~2007-12-12 22:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20071212140150.6002bc3b@freepuppy.rosehill \
--to=shemminger@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=ejka@imfi.kspu.ru \
--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