diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-09-20 04:44:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-21 17:58:01 -0400 |
commit | e254c274ae19888e5693ba6d32576ab03a8ae8a4 (patch) | |
tree | 41e06beb030ffaf8caad333553db0fdf10829501 /drivers/net/sfc | |
parent | 75abc51c29d1d1f6cde0abd003003ac61b9a9fba (diff) |
sfc: Clean up and correct comments on efx_monitor()
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r-- | drivers/net/sfc/efx.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 4a1c93f165e6..5be71f49a205 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -124,8 +124,9 @@ MODULE_PARM_DESC(separate_tx_channels, | |||
124 | static int napi_weight = 64; | 124 | static int napi_weight = 64; |
125 | 125 | ||
126 | /* This is the time (in jiffies) between invocations of the hardware | 126 | /* This is the time (in jiffies) between invocations of the hardware |
127 | * monitor, which checks for known hardware bugs and resets the | 127 | * monitor. On Falcon-based NICs, this will: |
128 | * hardware and driver as necessary. | 128 | * - Check the on-board hardware monitor; |
129 | * - Poll the link state and reconfigure the hardware as necessary. | ||
129 | */ | 130 | */ |
130 | unsigned int efx_monitor_interval = 1 * HZ; | 131 | unsigned int efx_monitor_interval = 1 * HZ; |
131 | 132 | ||
@@ -1545,8 +1546,7 @@ void efx_init_irq_moderation(struct efx_nic *efx, int tx_usecs, int rx_usecs, | |||
1545 | * | 1546 | * |
1546 | **************************************************************************/ | 1547 | **************************************************************************/ |
1547 | 1548 | ||
1548 | /* Run periodically off the general workqueue. Serialised against | 1549 | /* Run periodically off the general workqueue */ |
1549 | * efx_reconfigure_port via the mac_lock */ | ||
1550 | static void efx_monitor(struct work_struct *data) | 1550 | static void efx_monitor(struct work_struct *data) |
1551 | { | 1551 | { |
1552 | struct efx_nic *efx = container_of(data, struct efx_nic, | 1552 | struct efx_nic *efx = container_of(data, struct efx_nic, |
@@ -1559,16 +1559,13 @@ static void efx_monitor(struct work_struct *data) | |||
1559 | 1559 | ||
1560 | /* If the mac_lock is already held then it is likely a port | 1560 | /* If the mac_lock is already held then it is likely a port |
1561 | * reconfiguration is already in place, which will likely do | 1561 | * reconfiguration is already in place, which will likely do |
1562 | * most of the work of check_hw() anyway. */ | 1562 | * most of the work of monitor() anyway. */ |
1563 | if (!mutex_trylock(&efx->mac_lock)) | 1563 | if (mutex_trylock(&efx->mac_lock)) { |
1564 | goto out_requeue; | 1564 | if (efx->port_enabled) |
1565 | if (!efx->port_enabled) | 1565 | efx->type->monitor(efx); |
1566 | goto out_unlock; | 1566 | mutex_unlock(&efx->mac_lock); |
1567 | efx->type->monitor(efx); | 1567 | } |
1568 | 1568 | ||
1569 | out_unlock: | ||
1570 | mutex_unlock(&efx->mac_lock); | ||
1571 | out_requeue: | ||
1572 | queue_delayed_work(efx->workqueue, &efx->monitor_work, | 1569 | queue_delayed_work(efx->workqueue, &efx->monitor_work, |
1573 | efx_monitor_interval); | 1570 | efx_monitor_interval); |
1574 | } | 1571 | } |