From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Raja Mani <rmani@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath6kl: Use mutex to protect dma buffer in sync read write
Date: Mon, 21 Nov 2011 19:10:50 +0200 [thread overview]
Message-ID: <4ECA861A.4040906@qca.qualcomm.com> (raw)
In-Reply-To: <1321858611-2729-1-git-send-email-rmani@qca.qualcomm.com>
On 11/21/2011 08:56 AM, Raja Mani wrote:
> Firmware crashes while starting Soft AP in 32 bit x86 platform.
> The reason is that the single dma buffer (ar_sdio->dma_buffer)
> is used in ath6kl_sdio_read_write_sync() for unaligned buffer
> handling and this function is called in the multiple context
> at the same time. So, finally hits dma buffer corruption and
> firmware crash.
>
> Mutex is used to protect dma buffer to avoid data corruption.
> Spin lock can not used to fix this issue since mmc stack
> read/write calls may for sleep.
>
> Observed this issue with recently commited patch
> "ath6kl: Claim sdio function only at appropriate places"
> 861dd058f495973c7ad2a44b8f68f3cc05733eab
>
> Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
I really would not like to add yet another lock (or mutex) to ath6kl,
but I don't see any other quick fix for this. So I have applied this for
now, but I hope that in the future we get to remove the ugly bounce
buffer altogether.
But I did minor changes in the patch: I added a comment to the mutex
(which I now require for all new locks), renamed the lock to something
easier and moved it after the buffer.
Kalle
prev parent reply other threads:[~2011-11-21 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 6:56 [PATCH] ath6kl: Use mutex to protect dma buffer in sync read write Raja Mani
2011-11-21 17:10 ` 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=4ECA861A.4040906@qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rmani@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).