From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Bartosz Markowski <bartosz.markowski@tieto.com>,
<linux-wireless@vger.kernel.org>, <ath10k@lists.infradead.org>
Subject: Re: [PATCH v2] ath10k: add SoC power save option to PCI features map
Date: Mon, 5 Aug 2013 19:40:14 +0300 [thread overview]
Message-ID: <87iozkf5w0.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQkD5grL_5dJDgkwo40ET1zax56oN=ZGFxnyGqboQShbgQ@mail.gmail.com> (Michal Kazior's message of "Mon, 5 Aug 2013 15:31:31 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 2 August 2013 09:58, Bartosz Markowski <bartosz.markowski@tieto.com> wrote:
>> Unify the PCI options location.
>>
>> By default the SoC PS option is disabled to boost the
>> performance and due to poor stability on early HW revisions.
>> In future we can remove the module parameter and turn on/off
>> the PS for given hardware.
>>
>> This change also makes the pci module parameter for SoC PS static.
>>
>> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
>
> Hmm.. I'm worried about pci wake/sleep locking:
>
> (a) pci_wake() (awake count =1)
> (a) do something
> Now, if pci_sleep() and pci_wake() happen simultaneously/are
> preempted splitting primitive operations to:
> (a) pci_sleep(): decrease awake count (=0)
> (b) pci_wake(): increase awake count (=1), iowrite, wait for awake, return
> (a) pci_sleep(): iowrite(). return
> The flow in (b) now thinks the device is awake, but it's not
> guaranteed to be anymore because it has been put to sleep by (a).
Yeah, there's a race alright. I wonder if I have ever seen a proper use
of a atomic variable in a wireless driver :)
But this doesn't prevent taking this patch as the race has existed since
the beginning, right?
--
Kalle Valo
next prev parent reply other threads:[~2013-08-05 16:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 7:58 [PATCH v2] ath10k: add SoC power save option to PCI features map Bartosz Markowski
2013-08-05 13:31 ` Michal Kazior
2013-08-05 16:40 ` Kalle Valo [this message]
2013-08-06 6:57 ` Michal Kazior
2013-08-06 7:03 ` Kalle Valo
2013-08-07 7:07 ` 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=87iozkf5w0.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=bartosz.markowski@tieto.com \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.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).