Skip to content

Commit

Permalink
[CASSINI]: Fix two obvious NAPI bugs.
Browse files Browse the repository at this point in the history
1) close should do napi_disable() not napi_enable
2) remove unused local var 'todo'

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 4, 2008
1 parent d011a23 commit 8621626
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,7 @@ static int cas_poll(struct napi_struct *napi, int budget)
{
struct cas *cp = container_of(napi, struct cas, napi);
struct net_device *dev = cp->dev;
int i, enable_intr, todo, credits;
int i, enable_intr, credits;
u32 status = readl(cp->regs + REG_INTR_STATUS);
unsigned long flags;

Expand Down Expand Up @@ -4350,7 +4350,7 @@ static int cas_close(struct net_device *dev)
struct cas *cp = netdev_priv(dev);

#ifdef USE_NAPI
napi_enable(&cp->napi);
napi_disable(&cp->napi);
#endif
/* Make sure we don't get distracted by suspend/resume */
mutex_lock(&cp->pm_mutex);
Expand Down

0 comments on commit 8621626

Please sign in to comment.