From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] ath10k: fix device teardown
Date: Fri, 2 Aug 2013 11:00:08 +0300 [thread overview]
Message-ID: <8738qsplo7.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQktaDtp=fc3C_u4geA6vK72B1X4QnsD_GqrzU9NXEmBrA@mail.gmail.com> (Michal Kazior's message of "Fri, 2 Aug 2013 09:51:28 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 2 August 2013 09:41, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
>>
>>> @@ -1742,6 +1761,12 @@ static int ath10k_pci_hif_power_up(struct ath10k *ar)
>>> {
>>> int ret;
>>>
>>> + ret = ath10k_pci_start_intr(ar);
>>> + if (ret) {
>>> + ath10k_err("could not start interrupt handling (%d)\n", ret);
>>> + goto err;
>>> + }
>>
>> So now we call start_intr() during power_up(), which means that we do
>> the request_irq() calls during every interface up event. Does that cause
>> any meaningful overhead?
>
> I don't think so.
Good.
>> For me it looks better to do all resource allocation in
>> ath10k_pci_probe(), like request_irq(), and free the resources in
>> ath10k_pci_remove(). But then we would need to immeadiately call
>> disable_irq() and then enable_irq() from power_up() so I'm not sure if
>> that's any better.
>
> Not only that. Since disable/enable_irq must be balanced we'd need
> some way to track whether we have irqs enabled/disabled - either with
> an extra bool variable, additional ath10k_states or new pci-specific
> states.
>
> The patch assumes disable_irq is followed by free_irq (which it is)
> and possibly request_irq later on.
Yeah, your v2 sounds much better. And if there's overhead or something
else we can always change this later.
I'll wait for comments from others and if I don't get any, I'll apply
this.
--
Kalle Valo
next prev parent reply other threads:[~2013-08-02 8:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 6:39 [PATCH] ath10k: move irq setup Michal Kazior
2013-07-30 18:35 ` Kalle Valo
2013-07-31 5:50 ` Michal Kazior
2013-07-31 10:50 ` Michal Kazior
2013-08-02 7:15 ` [PATCH v2] ath10k: fix device teardown Michal Kazior
2013-08-02 7:41 ` Kalle Valo
2013-08-02 7:51 ` Michal Kazior
2013-08-02 8:00 ` Kalle Valo [this message]
2013-08-05 16:23 ` 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=8738qsplo7.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--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).