linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>, <ath6kl-devel@qualcomm.com>,
	Raja Mani <rmani@qca.qualcomm.com>
Subject: Re: [PATCH] ath6kl: Fix random system lockup
Date: Thu, 1 Mar 2012 09:35:52 +0200	[thread overview]
Message-ID: <4F4F26D8.1070006@qca.qualcomm.com> (raw)
In-Reply-To: <1328772432-21074-1-git-send-email-vthiagar@qca.qualcomm.com>

On 02/09/2012 09:27 AM, Vasanthakumar Thiagarajan wrote:
> From: Raja Mani <rmani@qca.qualcomm.com>
> 
> The commit "ath6kl: Use a mutex_lock to avoid
> race in diabling and handling irq" introduces a
> state where ath6kl_sdio_irq_handler() would be waiting
> to claim the sdio function for receive indefinitely
> when things happen in the following order.
> 
> ath6kl_sdio_irq_handler()
> 	- aquires mtx_irq
> 	- sdio_release_host()
> 					ath6kl_sdio_irq_disable()
> 						- sdio_claim_host()
> 						- sleep on mtx_irq
> 	ath6kl_hif_intr_bh_handler()
> 		- (indefinitely) wait for the sdio
> 		  function to be released to exclusively claim
> 		  it again for receive operation.
> 
> Fix this by replacing the mtx_irq with an atomic
> variable and a wait_queue.
> 
> Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

Thanks, applied with a minor change due to indentation:

static bool ath6kl_sdio_is_on_irq(struct ath6kl *ar)
{
	struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar);

	return !atomic_read(&ar_sdio->irq_handling);
}

		ret = wait_event_interruptible(ar_sdio->irq_wq,
				       ath6kl_sdio_is_on_irq(ar));

Kalle

      parent reply	other threads:[~2012-03-01  7:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09  7:27 [PATCH] ath6kl: Fix random system lockup Vasanthakumar Thiagarajan
2012-02-27 14:17 ` Kalle Valo
2012-02-28  5:28   ` Vasanthakumar Thiagarajan
2012-02-28  7:57     ` Kalle Valo
2012-03-01  7:35 ` Kalle Valo [this message]

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=4F4F26D8.1070006@qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rmani@qca.qualcomm.com \
    --cc=vthiagar@qca.qualcomm.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 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).