net: stmmac: Rework and fix TX Timeout code
authorJose Abreu <Jose.Abreu@synopsys.com>
Thu, 29 Mar 2018 09:40:18 +0000 (10:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Mar 2018 16:31:59 +0000 (12:31 -0400)
commit34877a15f787b594649ed375943ecc65f4342e30
tree9704e1ee4180c86dd96e6818f6fe2a62aa0ba4c9
parent02281a3525c9f1c07d792d64b079a2d677ed0ea5
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>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c