diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-07-27 20:46:41 +0100 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-08-24 20:10:20 +0100 |
commit | 8b7325b4e29256881117aff8a162e829c79b47e9 (patch) | |
tree | 5fc745835f9b5416fdc0d9fcc3abda51910e4b57 /net/sched/cls_basic.c | |
parent | 5642ceef466365ebc94eb1332d9e6228efa09518 (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 'net/sched/cls_basic.c')
0 files changed, 0 insertions, 0 deletions