summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/i825xx/sni_82596.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-07-27 20:46:41 +0100
committerBen Hutchings <bhutchings@solarflare.com>2012-08-24 20:10:20 +0100
commit8b7325b4e29256881117aff8a162e829c79b47e9 (patch)
tree5fc745835f9b5416fdc0d9fcc3abda51910e4b57 /drivers/net/ethernet/i825xx/sni_82596.c
parent5642ceef466365ebc94eb1332d9e6228efa09518 (diff)
sfc: Never try to stop and start a NIC that is disabled
efx_change_mtu() and efx_realloc_channels() each stop and start much of the NIC, even if it has been disabled. Since efx_start_all() is a no-op when the NIC is disabled, this is probably harmless in the case of efx_change_mtu(), but efx_realloc_channels() also reenables interrupts which could be a bad thing to do. Change efx_start_all() and efx_start_interrupts() to assert that the NIC is not disabled, but make efx_stop_interrupts() do nothing if the NIC is disabled (since it is already stopped), consistent with efx_stop_all(). Update comments for efx_start_all() and efx_stop_all() to describe their purpose and preconditions more accurately. Add a common function to check and log if the NIC is disabled, and use it in efx_net_open(), efx_change_mtu() and efx_realloc_channels(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/i825xx/sni_82596.c')
0 files changed, 0 insertions, 0 deletions