summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-08-04 17:36:27 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-08-04 17:36:27 +0000
commit27818ae52468960526f812b8629043ad72d8c7eb (patch)
treeb54751568f45b9ef4b3feb77b866856dc732039d /target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
parent3fe5c4149be89260eb8870c0272d512197b24c99 (diff)
ag71xx: fix memory corruption issues on ar7240 on ethernet start/stop
When the DMA engine state gets corrupted due to a hardware issues, it often won't stop rx until a full reset is issued. In that case the hardware must keep a valid descriptor, otherwise it will write to random places in system RAM, triggering random crashes. To fix this, keep a dummy descriptor without a buffer that keeps the DMA engine in a sane state until the reset is done git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27895 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
index 1025bb4c4..9dcbf4a5b 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
@@ -148,6 +148,9 @@ struct ag71xx {
struct napi_struct napi;
u32 msg_enable;
+ struct ag71xx_desc *stop_desc;
+ dma_addr_t stop_desc_dma;
+
struct ag71xx_ring rx_ring;
struct ag71xx_ring tx_ring;