mvpp2: refactor MTU change code
authorMatteo Croce <mcroce@redhat.com>
Sun, 28 Jul 2019 00:46:45 +0000 (02:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jul 2019 17:59:46 +0000 (10:59 -0700)
commit230bd958c2c846ee292aa38bc6b006296c24ca01
treee5c9208b7f00877f8bc34b06047aab5afeea9da3
parent011f175428d46461f94a65dacb9a416529d08dda
mvpp2: refactor MTU change code

The MTU change code can call napi_disable() with the device already down,
leading to a deadlock. Also, lot of code is duplicated unnecessarily.

Rework mvpp2_change_mtu() to avoid the deadlock and remove duplicated code.

Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c