Re: [PATCHv3 net 5/5] nfp: don't trust netif_running() in debug code
From: Jakub Kicinski <hidden>
Date: 2016-02-20 10:51:36
On 2/20/16, David Miller [off-list ref] wrote:
From: Jakub Kicinski <redacted> Date: Thu, 18 Feb 2016 20:38:13 +0000quoted
Since change_mtu() can fail and leave us with netif_running() returning true even though all rings were freed - we should look at NFP_NET_CFG_CTRL_ENABLE flag to determine if device is really opened. Signed-off-by: Jakub Kicinski <redacted>This is exactly why I don't like how you are doing your MTU change at all. You must not make the device inoperative if you simply cannot perform the MTU change. I'm pretty sure I've told you this already, this whole ->close(), MTU change, ->open() OOPS THAT FAILED sequence is a non-starter. You can't do this.
OK, I just wanted as little changes as possbile here since we are at rc5 already. I should've really caught that before upstreaming the driver :/
You are leaving the netdev object in an illegal state when this happens.
After the net-next series this could only happen if FW crashed and stopped responding to commands. Since this is VF driver I dont see anything I can do with crashed FW :( Should I close the device from the driver side? Could you please look at the net-next series and tell me if its a step in the right direction? I feel a bit puzzled, I thought the next series does exactly what you wanted. Thank you for your patience...