aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-06-05 08:59:48 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-06-05 08:59:48 +0000
commitb8de0b2ee1ef6db4f7ee2e71299ab0168ba562c2 (patch)
treea7fd106f5daf0d4abdeb6a86041bf400b3fa5bbc /target
parent3600ab59e0c11b4d57a76fe7f82b9981438e2eca (diff)
downloadupstream-b8de0b2ee1ef6db4f7ee2e71299ab0168ba562c2.tar.gz
upstream-b8de0b2ee1ef6db4f7ee2e71299ab0168ba562c2.tar.bz2
upstream-b8de0b2ee1ef6db4f7ee2e71299ab0168ba562c2.zip
ramips: change ethernet napi interrupt sequence
when open device. first ready napi software rx. then enable hardware interrupt. final start software tx queue to send data. Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45894 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
index 60c3c91246..bef715b40c 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
@@ -1153,7 +1153,6 @@ static int fe_open(struct net_device *dev)
goto err_out;
spin_lock_irqsave(&priv->page_lock, flags);
- napi_enable(&priv->rx_napi);
val = FE_TX_WB_DDONE | FE_RX_DMA_EN | FE_TX_DMA_EN;
if (priv->flags & FE_FLAG_RX_2B_OFFSET)
@@ -1169,8 +1168,9 @@ static int fe_open(struct net_device *dev)
if (priv->soc->has_carrier && priv->soc->has_carrier(priv))
netif_carrier_on(dev);
- netif_start_queue(dev);
+ napi_enable(&priv->rx_napi);
fe_int_enable(priv->soc->tx_int | priv->soc->rx_int);
+ netif_start_queue(dev);
return 0;
@@ -1185,15 +1185,14 @@ static int fe_stop(struct net_device *dev)
unsigned long flags;
int i;
- fe_int_disable(priv->soc->tx_int | priv->soc->rx_int);
-
netif_tx_disable(dev);
+ fe_int_disable(priv->soc->tx_int | priv->soc->rx_int);
+ napi_disable(&priv->rx_napi);
if (priv->phy)
priv->phy->stop(priv);
spin_lock_irqsave(&priv->page_lock, flags);
- napi_disable(&priv->rx_napi);
fe_reg_w32(fe_reg_r32(FE_REG_PDMA_GLO_CFG) &
~(FE_TX_WB_DDONE | FE_RX_DMA_EN | FE_TX_DMA_EN),