summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-06-26 16:53:11 +0200
committerFelix Fietkau <nbd@nbd.name>2016-06-26 16:53:11 +0200
commit3bf35126733a4b4073c1d3388e226c2a8f79d65b (patch)
tree0ce698294fb39a878c680dc1f49af6d0e74ce7ea /target/linux/ar71xx/files
parent86a2702a00c119d8fd1470784772754bede6888a (diff)
downloadmaster-31e0f0ae-3bf35126733a4b4073c1d3388e226c2a8f79d65b.tar.gz
master-31e0f0ae-3bf35126733a4b4073c1d3388e226c2a8f79d65b.tar.bz2
master-31e0f0ae-3bf35126733a4b4073c1d3388e226c2a8f79d65b.zip
Revert "ar71xx: prevent spurious ethernet resets from dma hang check false positives"
This reverts commit 3d58d7f053eae83b59baf5c8b8a58da78653f605.
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h2
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c9
2 files changed, 5 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
index 898bde1d25..5d03dcf2bd 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
@@ -174,7 +174,7 @@ struct ag71xx {
unsigned int desc_pktlen_mask;
unsigned int rx_buf_size;
- struct delayed_work restart_work;
+ struct work_struct restart_work;
struct delayed_work link_work;
struct timer_list oom_timer;
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 65bc89eb0d..d7c27393a6 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -908,12 +908,12 @@ static void ag71xx_tx_timeout(struct net_device *dev)
if (netif_msg_tx_err(ag))
pr_info("%s: tx timeout\n", ag->dev->name);
- schedule_delayed_work(&ag->restart_work, 1);
+ schedule_work(&ag->restart_work);
}
static void ag71xx_restart_work_func(struct work_struct *work)
{
- struct ag71xx *ag = container_of(work, struct ag71xx, restart_work.work);
+ struct ag71xx *ag = container_of(work, struct ag71xx, restart_work);
rtnl_lock();
ag71xx_hw_disable(ag);
@@ -966,7 +966,7 @@ static int ag71xx_tx_packets(struct ag71xx *ag, bool flush)
if (!flush && !ag71xx_desc_empty(desc)) {
if (pdata->is_ar724x &&
ag71xx_check_dma_stuck(ag, ring->buf[i].timestamp))
- schedule_delayed_work(&ag->restart_work, HZ / 2);
+ schedule_work(&ag->restart_work);
break;
}
@@ -1002,7 +1002,6 @@ static int ag71xx_tx_packets(struct ag71xx *ag, bool flush)
netdev_completed_queue(ag->dev, sent, bytes_compl);
if ((ring->curr - ring->dirty) < (ring_size * 3) / 4)
netif_wake_queue(ag->dev);
- cancel_delayed_work(&ag->restart_work);
return sent;
}
@@ -1322,7 +1321,7 @@ static int ag71xx_probe(struct platform_device *pdev)
dev->netdev_ops = &ag71xx_netdev_ops;
dev->ethtool_ops = &ag71xx_ethtool_ops;
- INIT_DELAYED_WORK(&ag->restart_work, ag71xx_restart_work_func);
+ INIT_WORK(&ag->restart_work, ag71xx_restart_work_func);
init_timer(&ag->oom_timer);
ag->oom_timer.data = (unsigned long) dev;