Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69338
b: refs/heads/master
c: 293c851
h: refs/heads/master
v: v3
  • Loading branch information
Li Yang authored and Jeff Garzik committed Oct 15, 2007
1 parent a49714f commit ecc851e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20ef2bb0085a53e2b040c9e3016799e058a761c4
refs/heads/master: 293c8513398657f6263fcdb03c87f2760cf61be4
10 changes: 10 additions & 0 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,14 @@ int startup_gfar(struct net_device *dev)
/* Returns 0 for success. */
static int gfar_enet_open(struct net_device *dev)
{
#ifdef CONFIG_GFAR_NAPI
struct gfar_private *priv = netdev_priv(dev);
#endif
int err;

#ifdef CONFIG_GFAR_NAPI
napi_enable(&priv->napi);
#endif

/* Initialize a bunch of registers */
init_registers(dev);
Expand All @@ -945,13 +949,17 @@ static int gfar_enet_open(struct net_device *dev)
err = init_phy(dev);

if(err) {
#ifdef CONFIG_GFAR_NAPI
napi_disable(&priv->napi);
#endif
return err;
}

err = startup_gfar(dev);
if (err)
#ifdef CONFIG_GFAR_NAPI
napi_disable(&priv->napi);
#endif

netif_start_queue(dev);

Expand Down Expand Up @@ -1105,7 +1113,9 @@ static int gfar_close(struct net_device *dev)
{
struct gfar_private *priv = netdev_priv(dev);

#ifdef CONFIG_GFAR_NAPI
napi_disable(&priv->napi);
#endif

stop_gfar(dev);

Expand Down

0 comments on commit ecc851e

Please sign in to comment.