diff options
-rw-r--r-- | drivers/net/gianfar.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 15099505915d..558440c15b6c 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -932,10 +932,14 @@ tx_skb_fail: | |||
932 | /* Returns 0 for success. */ | 932 | /* Returns 0 for success. */ |
933 | static int gfar_enet_open(struct net_device *dev) | 933 | static int gfar_enet_open(struct net_device *dev) |
934 | { | 934 | { |
935 | #ifdef CONFIG_GFAR_NAPI | ||
935 | struct gfar_private *priv = netdev_priv(dev); | 936 | struct gfar_private *priv = netdev_priv(dev); |
937 | #endif | ||
936 | int err; | 938 | int err; |
937 | 939 | ||
940 | #ifdef CONFIG_GFAR_NAPI | ||
938 | napi_enable(&priv->napi); | 941 | napi_enable(&priv->napi); |
942 | #endif | ||
939 | 943 | ||
940 | /* Initialize a bunch of registers */ | 944 | /* Initialize a bunch of registers */ |
941 | init_registers(dev); | 945 | init_registers(dev); |
@@ -945,13 +949,17 @@ static int gfar_enet_open(struct net_device *dev) | |||
945 | err = init_phy(dev); | 949 | err = init_phy(dev); |
946 | 950 | ||
947 | if(err) { | 951 | if(err) { |
952 | #ifdef CONFIG_GFAR_NAPI | ||
948 | napi_disable(&priv->napi); | 953 | napi_disable(&priv->napi); |
954 | #endif | ||
949 | return err; | 955 | return err; |
950 | } | 956 | } |
951 | 957 | ||
952 | err = startup_gfar(dev); | 958 | err = startup_gfar(dev); |
953 | if (err) | 959 | if (err) |
960 | #ifdef CONFIG_GFAR_NAPI | ||
954 | napi_disable(&priv->napi); | 961 | napi_disable(&priv->napi); |
962 | #endif | ||
955 | 963 | ||
956 | netif_start_queue(dev); | 964 | netif_start_queue(dev); |
957 | 965 | ||
@@ -1105,7 +1113,9 @@ static int gfar_close(struct net_device *dev) | |||
1105 | { | 1113 | { |
1106 | struct gfar_private *priv = netdev_priv(dev); | 1114 | struct gfar_private *priv = netdev_priv(dev); |
1107 | 1115 | ||
1116 | #ifdef CONFIG_GFAR_NAPI | ||
1108 | napi_disable(&priv->napi); | 1117 | napi_disable(&priv->napi); |
1118 | #endif | ||
1109 | 1119 | ||
1110 | stop_gfar(dev); | 1120 | stop_gfar(dev); |
1111 | 1121 | ||