netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Marek Vasut <marex@denx.de>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Geoff Levand <geoff@infradead.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Paolo Abeni <pabeni@redhat.com>, Petr Machata <petrm@nvidia.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH] net: ks8851: Drop IRQ threading
Date: Fri, 16 Dec 2022 13:54:56 -0800	[thread overview]
Message-ID: <Y5zpMILXRnW2+dBU@google.com> (raw)
In-Reply-To: <CANn89i+08T_1pDZ-FWikarVq=5q4MVAx=+mRkSqeinfb10OdOg@mail.gmail.com>

On Fri, Dec 16, 2022 at 02:23:04PM +0100, Eric Dumazet wrote:
> On Fri, Dec 16, 2022 at 1:47 PM Marek Vasut <marex@denx.de> wrote:
> >
> > Request non-threaded IRQ in the KSZ8851 driver, this fixes the following warning:
> > "
> > NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
> 
> This changelog is a bit terse.
> 
> Why can other drivers use request_threaded_irq(), but not this one ?

This one actually *has* to use threading, as (as far as I can see) the
"lock" that is being taken in ks8851_irq for the SPI variant of the
device is actually a mutex, so we have to be able to sleep in the
interrupt handler...

> 
> 
> > "
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > ---
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: Eric Dumazet <edumazet@google.com>
> > Cc: Geoff Levand <geoff@infradead.org>
> > Cc: Jakub Kicinski <kuba@kernel.org>
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Paolo Abeni <pabeni@redhat.com>
> > Cc: Petr Machata <petrm@nvidia.com>
> > Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > To: netdev@vger.kernel.org
> > ---
> >  drivers/net/ethernet/micrel/ks8851_common.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/micrel/ks8851_common.c b/drivers/net/ethernet/micrel/ks8851_common.c
> > index cfbc900d4aeb9..1eba4ba0b95cf 100644
> > --- a/drivers/net/ethernet/micrel/ks8851_common.c
> > +++ b/drivers/net/ethernet/micrel/ks8851_common.c
> > @@ -443,9 +443,7 @@ static int ks8851_net_open(struct net_device *dev)
> >         unsigned long flags;
> >         int ret;
> >
> > -       ret = request_threaded_irq(dev->irq, NULL, ks8851_irq,
> > -                                  IRQF_TRIGGER_LOW | IRQF_ONESHOT,
> > -                                  dev->name, ks);
> > +       ret = request_irq(dev->irq, ks8851_irq, IRQF_TRIGGER_LOW, dev->name, ks);
> >         if (ret < 0) {
> >                 netdev_err(dev, "failed to get irq\n");
> >                 return ret;
> > --
> > 2.35.1
> >

Thanks.

-- 
Dmitry

  reply	other threads:[~2022-12-16 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 12:47 [PATCH] net: ks8851: Drop IRQ threading Marek Vasut
2022-12-16 13:23 ` Eric Dumazet
2022-12-16 21:54   ` Dmitry Torokhov [this message]
2022-12-16 22:19     ` Marek Vasut
2022-12-16 22:32       ` Dmitry Torokhov
2023-05-31  2:19         ` Marek Vasut

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=Y5zpMILXRnW2+dBU@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geoff@infradead.org \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=wsa+renesas@sang-engineering.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).