From: "Ján Veselý" <jano.vesely@gmail.com>
To: Daniel Drake <drake@endlessm.com>
Cc: Tony Chuang <yhchuang@realtek.com>,
briannorris@chromium.org, gojun077@gmail.com,
kvalo@codeaurora.org,
linux-wireless <linux-wireless@vger.kernel.org>,
linux@endlessm.com
Subject: Re: [PATCH v2] rtw88: pci: enable MSI interrupt
Date: Fri, 23 Aug 2019 03:22:18 -0400 [thread overview]
Message-ID: <CA+K+NcSYKEkdx5ux6iwUs7pMidObZBrg9yDcP1zT73DcccpDPQ@mail.gmail.com> (raw)
In-Reply-To: <20190823063728.14117-1-drake@endlessm.com>
On Fri, Aug 23, 2019 at 2:37 AM Daniel Drake <drake@endlessm.com> wrote:
>
> > + rtw_pci_disable_interrupt(rtwdev, rtwpci);
>
> I checked the discussion on the v1 patch thread but I still don't follow
> this.
>
> You're worried about the case where we're inside the interrupt handler and:
> 1. We read the interrupt status to note what needs to be done
> 2. <another interrupt arrives here, requiring other work to be done>
> 3. We clear the interrupt status bits
> 4. We proceed to handle the interrupt but missing any work requested by
> the interrupt in step 2.
>
> Is that right?
>
> I'm not an expert here, but I don't think this is something that drivers
> have to worry about. Surely the interrupt controller can be expected to
> have a mechanism to "queue up" any interrupt that arrives while an
> interrupt is being handled? Otherwise handling of all types of
> edge-triggered interrupts (not just MSI) would be overly painful across the
> board.
That's my understanding as well.
entering the interrupt vector clears the IFLAG, so any interrupt will
wait until the IFLAG is restored, or delivered to a different CPU.
wouldn't it be safer to enable interrupts only _after_ registering the
handler in the "rtw_pci_request_irq" function?
regards,
Jan
>
> See e.g. https://patchwork.kernel.org/patch/3333681/ as a reference for
> what correct interrupt controller behaviour should look like.
>
> > + ret = pci_enable_msi(pdev);
>
> pci_enable_msi() is "deprecated, don't use"
>
> Thanks
> Daniel
>
next prev parent reply other threads:[~2019-08-23 7:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 8:28 [PATCH v2] rtw88: pci: enable MSI interrupt yhchuang
2019-08-23 6:37 ` Daniel Drake
2019-08-23 7:22 ` Ján Veselý [this message]
2019-08-27 12:11 ` Tony Chuang
2019-08-27 13:02 ` Jian-Hong Pan
2019-08-28 7:04 ` Daniel Drake
2019-09-02 3:02 ` Tony Chuang
2019-09-02 3:13 ` Daniel Drake
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=CA+K+NcSYKEkdx5ux6iwUs7pMidObZBrg9yDcP1zT73DcccpDPQ@mail.gmail.com \
--to=jano.vesely@gmail.com \
--cc=briannorris@chromium.org \
--cc=drake@endlessm.com \
--cc=gojun077@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@endlessm.com \
--cc=yhchuang@realtek.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).