From: Ilya Yanok <yanok@emcraft•com>
To: sfr@canb•auug.org.au
Cc: davem@davemloft•net, linux-next@vger•kernel.org,
bhutchings@solarflare•com, Ilya Yanok <yanok@emcraft•com>
Subject: [PATCH] dnet: replace obsolete *netif_rx_* functions with *napi_*
Date: Fri, 13 Mar 2009 13:30:53 +0300 [thread overview]
Message-ID: <1236940253-4944-1-git-send-email-yanok@emcraft.com> (raw)
In-Reply-To: <20090313131655.33117fb9.sfr@canb.auug.org.au>
*netif_rx_* functions is obsolete and removed in newer kernels so
we need to use corresponding *napi_* functions instead.
Signed-off-by: Ilya Yanok <yanok@emcraft•com>
---
Here is a fix for the problem. Or should I post an updated cumulative patch?
Regards, Ilya.
---
drivers/net/dnet.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index dd7bf4e..35eaa17 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -441,7 +441,7 @@ static int dnet_poll(struct napi_struct *napi, int budget)
* packets waiting
*/
if (!(dnet_readl(bp, RX_FIFO_WCNT) >> 16)) {
- netif_rx_complete(napi);
+ napi_complete(napi);
int_enable = dnet_readl(bp, INTR_ENB);
int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF;
dnet_writel(bp, int_enable, INTR_ENB);
@@ -480,7 +480,7 @@ static int dnet_poll(struct napi_struct *napi, int budget)
if (npackets < budget) {
/* We processed all packets available. Tell NAPI it can
* stop polling then re-enable rx interrupts */
- netif_rx_complete(napi);
+ napi_complete(napi);
int_enable = dnet_readl(bp, INTR_ENB);
int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF;
dnet_writel(bp, int_enable, INTR_ENB);
@@ -540,7 +540,7 @@ static irqreturn_t dnet_interrupt(int irq, void *dev_id)
}
if (int_current & DNET_INTR_SRC_RX_CMDFIFOAF) {
- if (netif_rx_schedule_prep(&bp->napi)) {
+ if (napi_schedule_prep(&bp->napi)) {
/*
* There's no point taking any more interrupts
* until we have processed the buffers
@@ -549,7 +549,7 @@ static irqreturn_t dnet_interrupt(int irq, void *dev_id)
int_enable = dnet_readl(bp, INTR_ENB);
int_enable &= ~DNET_INTR_SRC_RX_CMDFIFOAF;
dnet_writel(bp, int_enable, INTR_ENB);
- __netif_rx_schedule(&bp->napi);
+ __napi_schedule(&bp->napi);
}
handled = 1;
}
--
1.6.0.6
next prev parent reply other threads:[~2009-03-13 11:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 2:16 linux-next: net-current/net tree build failure Stephen Rothwell
2009-03-13 10:30 ` Ilya Yanok [this message]
2009-03-13 16:51 ` [PATCH] dnet: replace obsolete *netif_rx_* functions with *napi_* David Miller
2009-03-13 17:23 ` linux-next: net-current/net tree build failure David Miller
2009-03-15 11:30 ` Stephen Rothwell
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=1236940253-4944-1-git-send-email-yanok@emcraft.com \
--to=yanok@emcraft$(echo .)com \
--cc=bhutchings@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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