From: Ben Hutchings <bhutchings@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-net-drivers@solarflare.com
Subject: [PATCH net-next-2.6 8/8] sfc: Clean up and correct comments on efx_monitor()
Date: Mon, 20 Sep 2010 19:44:10 +0100 [thread overview]
Message-ID: <1285008250.2282.111.camel@achroite.uk.solarflarecom.com> (raw)
In-Reply-To: <1285008056.2282.103.camel@achroite.uk.solarflarecom.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
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 48e2bf4..8a51c41 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -124,8 +124,9 @@ MODULE_PARM_DESC(separate_tx_channels,
static int napi_weight = 64;
/* This is the time (in jiffies) between invocations of the hardware
- * monitor, which checks for known hardware bugs and resets the
- * hardware and driver as necessary.
+ * monitor. On Falcon-based NICs, this will:
+ * - Check the on-board hardware monitor;
+ * - Poll the link state and reconfigure the hardware as necessary.
*/
unsigned int efx_monitor_interval = 1 * HZ;
@@ -1546,8 +1547,7 @@ void efx_init_irq_moderation(struct efx_nic *efx, int tx_usecs, int rx_usecs,
*
**************************************************************************/
-/* Run periodically off the general workqueue. Serialised against
- * efx_reconfigure_port via the mac_lock */
+/* Run periodically off the general workqueue */
static void efx_monitor(struct work_struct *data)
{
struct efx_nic *efx = container_of(data, struct efx_nic,
@@ -1560,16 +1560,13 @@ static void efx_monitor(struct work_struct *data)
/* If the mac_lock is already held then it is likely a port
* reconfiguration is already in place, which will likely do
- * most of the work of check_hw() anyway. */
- if (!mutex_trylock(&efx->mac_lock))
- goto out_requeue;
- if (!efx->port_enabled)
- goto out_unlock;
- efx->type->monitor(efx);
+ * most of the work of monitor() anyway. */
+ if (mutex_trylock(&efx->mac_lock)) {
+ if (efx->port_enabled)
+ efx->type->monitor(efx);
+ mutex_unlock(&efx->mac_lock);
+ }
-out_unlock:
- mutex_unlock(&efx->mac_lock);
-out_requeue:
queue_delayed_work(efx->workqueue, &efx->monitor_work,
efx_monitor_interval);
}
--
1.7.2.1
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2010-09-20 18:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 18:40 [PATCH net-next-2.6 0/8] sfc and ethtool changes for 2.6.37 Ben Hutchings
2010-09-20 18:41 ` [PATCH net-next-2.6 1/8] ethtool: Define RX n-tuple action to clear a rule Ben Hutchings
2010-09-20 18:42 ` [PATCH net-next-2.6 2/8] ethtool: Add Ethernet MAC-level filtering/steering Ben Hutchings
2010-09-20 18:42 ` [PATCH net-next-2.6 3/8] ethtool: Allocate register dump buffer with vmalloc() Ben Hutchings
2010-09-20 18:43 ` [PATCH net-next-2.6 4/8] sfc: Add filter table management Ben Hutchings
2010-09-20 18:43 ` [PATCH net-next-2.6 5/8] sfc: Implement the ethtool RX n-tuple control functions Ben Hutchings
2010-09-20 18:43 ` [PATCH net-next-2.6 6/8] sfc: Include RX IP filter table in register dump Ben Hutchings
2010-09-20 18:43 ` [PATCH net-next-2.6 7/8] sfc: Set net_device::num_rx_queues once we know the correct value Ben Hutchings
2010-09-20 18:54 ` Eric Dumazet
2010-09-20 19:05 ` Ben Hutchings
2010-09-21 21:57 ` David Miller
2010-09-22 1:31 ` Ben Hutchings
2010-09-22 1:38 ` David Miller
2010-09-22 15:28 ` Ben Hutchings
2010-09-22 15:44 ` Eric Dumazet
2010-09-20 18:44 ` Ben Hutchings [this message]
2010-09-21 21:58 ` [PATCH net-next-2.6 0/8] sfc and ethtool changes for 2.6.37 David Miller
2010-09-21 23:23 ` David Miller
2010-09-22 15:27 ` Ben Hutchings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285008250.2282.111.camel@achroite.uk.solarflarecom.com \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=linux-net-drivers@solarflare.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.