* [RFT] cpmac: napi fix
@ 2007-12-12 22:01 Stephen Hemminger
0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2007-12-12 22:01 UTC (permalink / raw)
To: Eugene Konev, Jeff Garzik, David S. Miller; +Cc: netdev
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-12 22:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-12 22:01 [RFT] cpmac: napi fix Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox