All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ganapathi Bhat <gbhat@marvell.com>, linux-wireless@vger.kernel.org
Cc: Cathy Luo <cluo@marvell.com>, Xinming Hu <huxm@marvell.com>,
	Zhiyuan Yang <yangzy@marvell.com>, James Cao <jcao@marvell.com>,
	Mangesh Malusare <mmangesh@marvell.com>
Subject: Re: [PATCH 2/2] mwifiex: print URB submit failure error after threshold attemtps
Date: Thu, 31 Aug 2017 21:05:27 -0700	[thread overview]
Message-ID: <1504238727.2361.1.camel@perches.com> (raw)
In-Reply-To: <1504122674-3379-3-git-send-email-gbhat@marvell.com>

On Thu, 2017-08-31 at 01:21 +0530, Ganapathi Bhat wrote:
> Current driver prints dev_alloc_skb failures everytime while
> submitting RX URBs. This failure might be frequent in some
> low resource platforms. So, wait for a threshold failure
> count before start priting the error. This change is a follow
> up for the 'commit 7b368e3d15c3
> ("mwifiex: resubmit failed to submit RX URBs in main thread")'

[]

> diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
[]
> @@ -300,9 +300,16 @@ static int mwifiex_usb_submit_rx_urb(struct urb_context *ctx, int size)
>  	if (card->rx_cmd_ep != ctx->ep) {
>  		ctx->skb = dev_alloc_skb(size);
>  		if (!ctx->skb) {
> -			mwifiex_dbg(adapter, ERROR,
> -				    "%s: dev_alloc_skb failed\n", __func__);
> +			if (++card->rx_urb_failure_count >
> +			    MWIFIEX_RX_URB_FAILURE_THRESHOLD) {
> +				mwifiex_dbg(adapter, ERROR,
> +					    "%s: dev_alloc_skb failed, failure count = %u\n",
> +					    __func__,
> +					    card->rx_urb_failure_count);
> +			}
>  			return -ENOMEM;

Why not use a ratelimit?

  reply	other threads:[~2017-09-01  4:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 19:51 [PATCH 0/2] mwifiex: address URB submission failure Ganapathi Bhat
2017-08-30 19:51 ` [PATCH 1/2] mwifiex: resubmit failed to submit RX URBs in main thread Ganapathi Bhat
2017-09-20 12:13   ` Kalle Valo
2017-08-30 19:51 ` [PATCH 2/2] mwifiex: print URB submit failure error after threshold attemtps Ganapathi Bhat
2017-09-01  4:05   ` Joe Perches [this message]
2017-09-14 14:14     ` [EXT] " Ganapathi Bhat
2017-09-14 21:59       ` Brian Norris
2017-09-15  9:46         ` Ganapathi Bhat
2017-09-20  4:30         ` Kalle Valo
2017-09-20  6:02           ` Brian Norris
2017-09-20 12:09             ` Kalle Valo

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=1504238727.2361.1.camel@perches.com \
    --to=joe@perches.com \
    --cc=cluo@marvell.com \
    --cc=gbhat@marvell.com \
    --cc=huxm@marvell.com \
    --cc=jcao@marvell.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mmangesh@marvell.com \
    --cc=yangzy@marvell.com \
    /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.