Commit e254c274 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

sfc: Clean up and correct comments on efx_monitor()

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 75abc51c
...@@ -124,8 +124,9 @@ MODULE_PARM_DESC(separate_tx_channels, ...@@ -124,8 +124,9 @@ MODULE_PARM_DESC(separate_tx_channels,
static int napi_weight = 64; static int napi_weight = 64;
/* This is the time (in jiffies) between invocations of the hardware /* This is the time (in jiffies) between invocations of the hardware
* monitor, which checks for known hardware bugs and resets the * monitor. On Falcon-based NICs, this will:
* hardware and driver as necessary. * - Check the on-board hardware monitor;
* - Poll the link state and reconfigure the hardware as necessary.
*/ */
unsigned int efx_monitor_interval = 1 * HZ; unsigned int efx_monitor_interval = 1 * HZ;
...@@ -1545,8 +1546,7 @@ void efx_init_irq_moderation(struct efx_nic *efx, int tx_usecs, int rx_usecs, ...@@ -1545,8 +1546,7 @@ void efx_init_irq_moderation(struct efx_nic *efx, int tx_usecs, int rx_usecs,
* *
**************************************************************************/ **************************************************************************/
/* Run periodically off the general workqueue. Serialised against /* Run periodically off the general workqueue */
* efx_reconfigure_port via the mac_lock */
static void efx_monitor(struct work_struct *data) static void efx_monitor(struct work_struct *data)
{ {
struct efx_nic *efx = container_of(data, struct efx_nic, struct efx_nic *efx = container_of(data, struct efx_nic,
...@@ -1559,16 +1559,13 @@ static void efx_monitor(struct work_struct *data) ...@@ -1559,16 +1559,13 @@ static void efx_monitor(struct work_struct *data)
/* If the mac_lock is already held then it is likely a port /* If the mac_lock is already held then it is likely a port
* reconfiguration is already in place, which will likely do * reconfiguration is already in place, which will likely do
* most of the work of check_hw() anyway. */ * most of the work of monitor() anyway. */
if (!mutex_trylock(&efx->mac_lock)) if (mutex_trylock(&efx->mac_lock)) {
goto out_requeue; if (efx->port_enabled)
if (!efx->port_enabled) efx->type->monitor(efx);
goto out_unlock; mutex_unlock(&efx->mac_lock);
efx->type->monitor(efx); }
out_unlock:
mutex_unlock(&efx->mac_lock);
out_requeue:
queue_delayed_work(efx->workqueue, &efx->monitor_work, queue_delayed_work(efx->workqueue, &efx->monitor_work,
efx_monitor_interval); efx_monitor_interval);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment