aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-08-04 17:36:27 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-08-04 17:36:27 +0000
commit8268bc95d154223dc895d91d7145698b15d03e59 (patch)
treeb54751568f45b9ef4b3feb77b866856dc732039d /target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
parentd04b90839d229eea9e3d38beb599d5ea6dc3d4dc (diff)
downloadupstream-8268bc95d154223dc895d91d7145698b15d03e59.tar.gz
upstream-8268bc95d154223dc895d91d7145698b15d03e59.tar.bz2
upstream-8268bc95d154223dc895d91d7145698b15d03e59.zip
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 1025bb4c49..9dcbf4a5b2 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;