aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-07-07 19:23:09 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-08 00:21:22 -0400
commit5d165c5543fbcbd26e443ee501063decb4ef73b4 (patch)
treed2f5ddfaba019b485f281b15c6ce86f7ee46212e /drivers/net/ethernet/freescale
parentd76cfae9674f325de35ff23ab07ff9c7d809de4a (diff)
net: fec: remove useless fep->opened
napi_disable() waits until the NAPI processing has completed, and then prevents any further polls. At this point, the driver then clears fep->opened. The NAPI poll function uses this to stop processing in the receive path. Hence, it will never see this variable cleared, because the NAPI poll has to complete before it will be cleared. Therefore, this variable serves no purpose, so let's remove it. Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/fec.h1
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c5
2 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index 671d080105a7..96d2a18f1b99 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -308,7 +308,6 @@ struct fec_enet_private {
308 308
309 struct platform_device *pdev; 309 struct platform_device *pdev;
310 310
311 int opened;
312 int dev_id; 311 int dev_id;
313 312
314 /* Phylib and MDIO interface */ 313 /* Phylib and MDIO interface */
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index e0a1ac1826b7..309aa2ff8cc9 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1215,9 +1215,6 @@ fec_enet_rx(struct net_device *ndev, int budget)
1215 if ((status & BD_ENET_RX_LAST) == 0) 1215 if ((status & BD_ENET_RX_LAST) == 0)
1216 netdev_err(ndev, "rcv is not +last\n"); 1216 netdev_err(ndev, "rcv is not +last\n");
1217 1217
1218 if (!fep->opened)
1219 goto rx_processing_done;
1220
1221 /* Check for errors. */ 1218 /* Check for errors. */
1222 if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO | 1219 if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
1223 BD_ENET_RX_CR | BD_ENET_RX_OV)) { 1220 BD_ENET_RX_CR | BD_ENET_RX_OV)) {
@@ -2172,7 +2169,6 @@ fec_enet_open(struct net_device *ndev)
2172 napi_enable(&fep->napi); 2169 napi_enable(&fep->napi);
2173 phy_start(fep->phy_dev); 2170 phy_start(fep->phy_dev);
2174 netif_start_queue(ndev); 2171 netif_start_queue(ndev);
2175 fep->opened = 1;
2176 return 0; 2172 return 0;
2177} 2173}
2178 2174
@@ -2185,7 +2181,6 @@ fec_enet_close(struct net_device *ndev)
2185 2181
2186 /* Don't know what to do yet. */ 2182 /* Don't know what to do yet. */
2187 napi_disable(&fep->napi); 2183 napi_disable(&fep->napi);
2188 fep->opened = 0;
2189 netif_tx_disable(ndev); 2184 netif_tx_disable(ndev);
2190 fec_stop(ndev); 2185 fec_stop(ndev);
2191 2186