All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-net-drivers@solarflare.com>
Subject: [PATCH net-next 3/4] sfc: add module parameter to enable MCDI logging on new functions
Date: Wed, 20 May 2015 16:50:31 +0100	[thread overview]
Message-ID: <555CAD47.1090805@solarflare.com> (raw)
In-Reply-To: <555CACF5.9060803@solarflare.com>

As many issues are encountered at probe time, where MCDI logging can't be
 enabled through the sysfs node, this change adds a module parameter
 'mcdi_logging_default', which defaults to false.  When set to true, newly-
 probed functions will have MCDI logging enabled.  The setting can
 subsequently be changed as normal through the sysfs node.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/mcdi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c
index 3e4137c..1f7153d 100644
--- a/drivers/net/ethernet/sfc/mcdi.c
+++ b/drivers/net/ethernet/sfc/mcdi.c
@@ -8,6 +8,7 @@
  */
 
 #include <linux/delay.h>
+#include <linux/moduleparam.h>
 #include <asm/cmpxchg.h>
 #include "net_driver.h"
 #include "nic.h"
@@ -54,6 +55,13 @@ static int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
 static bool efx_mcdi_poll_once(struct efx_nic *efx);
 static void efx_mcdi_abandon(struct efx_nic *efx);
 
+#ifdef CONFIG_SFC_MCDI_LOGGING
+static bool mcdi_logging_default;
+module_param(mcdi_logging_default, bool, 0644);
+MODULE_PARM_DESC(mcdi_logging_default,
+		 "Enable MCDI logging on newly-probed functions");
+#endif
+
 int efx_mcdi_init(struct efx_nic *efx)
 {
 	struct efx_mcdi_iface *mcdi;
@@ -71,6 +79,7 @@ int efx_mcdi_init(struct efx_nic *efx)
 	mcdi->logging_buffer = (char *)__get_free_page(GFP_KERNEL);
 	if (!mcdi->logging_buffer)
 		goto fail1;
+	mcdi->logging_enabled = mcdi_logging_default;
 #endif
 	init_waitqueue_head(&mcdi->wq);
 	spin_lock_init(&mcdi->iface_lock);

  parent reply	other threads:[~2015-05-20 15:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 15:49 [PATCH net-next v2 0/4] sfc: add MCDI tracing Edward Cree
2015-05-20 15:49 ` [PATCH net-next 1/4] sfc: add tracing of MCDI commands Edward Cree
2015-05-20 15:50 ` [PATCH net-next 2/4] sfc: add sysfs entry to control MCDI tracing Edward Cree
2015-05-20 15:50 ` Edward Cree [this message]
2015-05-20 15:50 ` [PATCH net-next 4/4] sfc: Initialise MCDI buffers to 0 on declaration Edward Cree
2015-05-21 22:52 ` [PATCH net-next v2 0/4] sfc: add MCDI tracing David Miller
2015-05-22 14:49   ` Edward Cree
2015-05-22 19:03     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2015-05-22 19:19 [PATCH net-next v3 " Edward Cree
2015-05-22 19:20 ` [PATCH net-next 3/4] sfc: add module parameter to enable MCDI logging on new functions Edward Cree
2015-05-19 17:33 [PATCH net-next 0/4] sfc: add MCDI tracing Edward Cree
2015-05-19 17:36 ` [PATCH net-next 3/4] sfc: add module parameter to enable MCDI logging on new functions Edward Cree

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=555CAD47.1090805@solarflare.com \
    --to=ecree@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.