netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bert Kenward <bkenward@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>,
	Solarflare linux maintainers <linux-net-drivers@solarflare.com>
Subject: [PATCH net-next v2 4/5] sfc: Downgrade EPERM messages from MCDI to debug
Date: Wed, 23 Dec 2015 08:57:51 +0000	[thread overview]
Message-ID: <567A620F.7020205@solarflare.com> (raw)
In-Reply-To: <567A6170.6010104@solarflare.com>

From: Tomáš Pilař <tpilar@solarflare.com>

When running in an unprivileged function we expect some MC commands
to fail with permission errors. To avoid log spew downgrade these to
debug only.

Signed-off-by: Bert Kenward <bkenward@solarflare.com>
---
 drivers/net/ethernet/sfc/mcdi.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c
index d6b8a77..d28e7dd 100644
--- a/drivers/net/ethernet/sfc/mcdi.c
+++ b/drivers/net/ethernet/sfc/mcdi.c
@@ -1082,9 +1082,10 @@ void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd,
 		code = MCDI_DWORD(outbuf, ERR_CODE);
 	if (outlen >= MC_CMD_ERR_ARG_OFST + 4)
 		err_arg = MCDI_DWORD(outbuf, ERR_ARG);
-	netif_err(efx, hw, efx->net_dev,
-		  "MC command 0x%x inlen %d failed rc=%d (raw=%d) arg=%d\n",
-		  cmd, (int)inlen, rc, code, err_arg);
+	netif_printk(efx, hw, rc == -EPERM ? KERN_DEBUG : KERN_ERR,
+		     efx->net_dev,
+		     "MC command 0x%x inlen %zu failed rc=%d (raw=%d) arg=%d\n",
+		     cmd, inlen, rc, code, err_arg);
 }
 
 /* Switch to polled MCDI completions.  This can be called in various
-- 
2.4.3

  parent reply	other threads:[~2015-12-23  8:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5674274C.4020606@solarflare.com>
2015-12-23  8:55 ` [PATCH net-next v2 0/5] sfc: additional virtual function support​ Bert Kenward
2015-12-23  8:56   ` [PATCH net-next v2 1/5] sfc: Retry MCDI after NO_EVB_PORT error on a VF Bert Kenward
2015-12-23  8:57   ` [PATCH net-next v2 2/5] sfc: Handle MCDI proxy authorisation Bert Kenward
2015-12-23  8:57   ` [PATCH net-next v2 3/5] sfc: Make failed filter removal less noisy Bert Kenward
2015-12-23  8:57   ` Bert Kenward [this message]
2015-12-23  8:58   ` [PATCH net-next v2 5/5] sfc: Downgrade or remove some error messages Bert Kenward
2015-12-24  3:06   ` [PATCH net-next v2 0/5] sfc: additional virtual function support​ David Miller

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=567A620F.7020205@solarflare.com \
    --to=bkenward@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).