From: Ben Hutchings Date: Fri, 27 Jul 2012 19:46:41 +0000 (+0100) Subject: sfc: Never try to stop and start a NIC that is disabled X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~47^2~277^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b7325b4e29256881117aff8a162e829c79b47e9;p=pandora-kernel.git 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 --- Reading git-diff-tree failed