2020-09-28 07:36:33

by Arend Van Spriel

[permalink] [raw]
Subject: Re: [patch 24/35] net: brcmfmac: Replace in_interrupt()

+ Uffe

On 9/27/2020 9:49 PM, Thomas Gleixner wrote:
> @@ -85,7 +85,7 @@ static void brcmf_sdiod_ib_irqhandler(st
>
> brcmf_dbg(INTR, "IB intr triggered\n");
>
> - brcmf_sdio_isr(sdiodev->bus);
> + brcmf_sdio_isr(sdiodev->bus, false);
> }

Hi Uffe,

I assume the above code is okay, but want to confirm. Is the SDIO
interrupt guaranteed to be on a worker thread?

Thanks,
Arend


Attachments:
smime.p7s (4.08 kB)
S/MIME Cryptographic Signature

2020-09-28 09:20:48

by Ulf Hansson

[permalink] [raw]
Subject: Re: [patch 24/35] net: brcmfmac: Replace in_interrupt()

On Mon, 28 Sep 2020 at 09:35, Arend Van Spriel
<[email protected]> wrote:
>
> + Uffe
>
> On 9/27/2020 9:49 PM, Thomas Gleixner wrote:
> > @@ -85,7 +85,7 @@ static void brcmf_sdiod_ib_irqhandler(st
> >
> > brcmf_dbg(INTR, "IB intr triggered\n");
> >
> > - brcmf_sdio_isr(sdiodev->bus);
> > + brcmf_sdio_isr(sdiodev->bus, false);
> > }
>
> Hi Uffe,
>
> I assume the above code is okay, but want to confirm. Is the SDIO
> interrupt guaranteed to be on a worker thread?

Correct.

As a matter of fact, the sdio irqs can be delivered through a couple
of different paths. The legacy (scheduled for removal), is from a
dedicated kthread. The more "modern" way is either from the context of
a threaded IRQ handler or via a workqueue.

However, there are also so-called out of band SDIO irqs, typically
routed via a separate GPIO line. This isn't managed by the MMC/SDIO
subsystem, but the SDIO functional driver itself.

Kind regards
Uffe

2020-09-28 09:39:23

by Arend Van Spriel

[permalink] [raw]
Subject: Re: [patch 24/35] net: brcmfmac: Replace in_interrupt()

On 9/28/2020 11:19 AM, Ulf Hansson wrote:
> On Mon, 28 Sep 2020 at 09:35, Arend Van Spriel
> <[email protected]> wrote:
>>
>> + Uffe
>>
>> On 9/27/2020 9:49 PM, Thomas Gleixner wrote:
>>> @@ -85,7 +85,7 @@ static void brcmf_sdiod_ib_irqhandler(st
>>>
>>> brcmf_dbg(INTR, "IB intr triggered\n");
>>>
>>> - brcmf_sdio_isr(sdiodev->bus);
>>> + brcmf_sdio_isr(sdiodev->bus, false);
>>> }
>>
>> Hi Uffe,
>>
>> I assume the above code is okay, but want to confirm. Is the SDIO
>> interrupt guaranteed to be on a worker thread?
>
> Correct.
>
> As a matter of fact, the sdio irqs can be delivered through a couple
> of different paths. The legacy (scheduled for removal), is from a
> dedicated kthread. The more "modern" way is either from the context of
> a threaded IRQ handler or via a workqueue.
>
> However, there are also so-called out of band SDIO irqs, typically
> routed via a separate GPIO line. This isn't managed by the MMC/SDIO
> subsystem, but the SDIO functional driver itself.

In brcmfmac we indeed support the out-of-band interrupt. That scnenario
is also taken care of in this patch. Thanks for the confirmation.

Regards,
Arend


Attachments:
smime.p7s (4.08 kB)
S/MIME Cryptographic Signature