mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
gianfar: Fix boot hangs while bringing up gianfar ethernet
Ira Snyder found that commit 8c7396aebb
"gianfar: Merge Tx and Rx interrupt for scheduling clean up ring" can
cause hangs. It's because there was removed clearing of interrupts in
gfar_schedule_cleanup() (which is called by an interrupt handler) in
case when netif scheduling has been disabled. This patch brings back
this action and a comment.
Reported-by: Ira Snyder <[email protected]>
Reported-by: Peter Korsgaard <[email protected]>
Bisected-by: Ira Snyder <[email protected]>
Tested-by: Peter Korsgaard <[email protected]>
Tested-by: Ira Snyder <[email protected]>
Signed-off-by: Jarek Poplawski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d4e2675a61
commit
8707bdd48a
1 changed files with 6 additions and 0 deletions
|
|
@ -1629,6 +1629,12 @@ static void gfar_schedule_cleanup(struct net_device *dev)
|
|||
if (netif_rx_schedule_prep(&priv->napi)) {
|
||||
gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED);
|
||||
__netif_rx_schedule(&priv->napi);
|
||||
} else {
|
||||
/*
|
||||
* Clear IEVENT, so interrupts aren't called again
|
||||
* because of the packets that have already arrived.
|
||||
*/
|
||||
gfar_write(&priv->regs->ievent, IEVENT_RTX_MASK);
|
||||
}
|
||||
|
||||
spin_unlock(&priv->rxlock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue