diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2018-03-29 10:40:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-30 12:31:59 -0400 |
commit | 34877a15f787b594649ed375943ecc65f4342e30 (patch) | |
tree | 9704e1ee4180c86dd96e6818f6fe2a62aa0ba4c9 /drivers/net/ethernet/stmicro/stmmac/stmmac.h | |
parent | 02281a3525c9f1c07d792d64b079a2d677ed0ea5 (diff) | |
download | talos-obmc-linux-34877a15f787b594649ed375943ecc65f4342e30.tar.gz talos-obmc-linux-34877a15f787b594649ed375943ecc65f4342e30.zip |
net: stmmac: Rework and fix TX Timeout code
Currently TX Timeout handler does not behaves as expected and leads to
an unrecoverable state. Rework current implementation of TX Timeout
handling to actually perform a complete reset of the driver state and IP.
We use deferred work to init a task which will be responsible for
resetting the system.
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 75161e1b7e55..1485d8fcfaa9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -145,6 +145,17 @@ struct stmmac_priv { struct dentry *dbgfs_rings_status; struct dentry *dbgfs_dma_cap; #endif + + unsigned long state; + struct workqueue_struct *wq; + struct work_struct service_task; +}; + +enum stmmac_state { + STMMAC_DOWN, + STMMAC_RESET_REQUESTED, + STMMAC_RESETING, + STMMAC_SERVICE_SCHED, }; int stmmac_mdio_unregister(struct net_device *ndev); |