From: Peter Robinson <pbrobinson@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Doug Berger <opendmb@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
Javier Martinez Canillas <javierm@redhat.com>
Subject: Re: [PATCH] net: bcmgenet: Return not supported if we don't have a WoL IRQ
Date: Wed, 23 Feb 2022 17:45:06 +0000 [thread overview]
Message-ID: <CALeDE9PK9JkFkbTc36HOZH8CG8MM3OMhKJ24FKioKF5bspSPkA@mail.gmail.com> (raw)
In-Reply-To: <3ae3a9fc-9dd1-00c6-4ae8-a65df3ed225f@gmail.com>
> > The top two are pre/post plugging an ethernet cable with the patched
> > kernel, the last two are the broken kernel. There doesn't seem to be a
> > massive difference in interrupts but you likely know more of what
> > you're looking for.
>
> There is not a difference in the hardware interrupt numbers being
> claimed by GENET which are both GIC interrupts 189 and 190 (157 + 32 and
> 158 + 32). In the broken case we can see that the second interrupt line
> (interrupt 190), which is the one that services the non-default TX
> queues does not fire up at all whereas it does in the patched case.
>
> The transmit queue timeout makes sense given that transmit queue 2
> (which is not the default one, default is 0) has its interrupt serviced
> by the second interrupt line (190). We can see it not firing up, hence
> the timeout.
>
> What I *think* might be happening here is the following:
>
> - priv->wol_irq = platform_get_irq_optional(pdev, 2) returns a negative
> error code we do not install the interrupt handler for the WoL interrupt
> since it is not valid
>
> - bcmgenet_set_wol() is called, we do not check priv->wol_irq, so we
> call enable_irq_wake(priv->wol_irq) and somehow irq_set_irq_wake() is
> able to resolve that irq number to a valid interrupt descriptor
>
> - eventually we just mess up the interrupt descriptor for interrupt 49
> and it stops working
>
> Now since this appears to be an ACPI-enabled system, we may be hitting
> this part of the code in platform_get_irq_optional():
>
> r = platform_get_resource(dev, IORESOURCE_IRQ, num);
> if (has_acpi_companion(&dev->dev)) {
> if (r && r->flags & IORESOURCE_DISABLED) {
> ret = acpi_irq_get(ACPI_HANDLE(&dev->dev),
> num, r);
> if (ret)
> goto out;
> }
> }
>
> and then I am not clear what interrupt this translates into here, or
> whether it is possible to get a valid interrupt descriptor here.
>
> The patch is fine in itself, but I would really prefer that we get to
> the bottom of this rather than have a superficial understanding of the
> nature of the problem.
I have no problems working with you to improve the driver, the problem
I have is this is currently a regression in 5.17 so I would like to
see something land, whether it's reverting the other patch, landing
thing one or another straight forward fix and then maybe revisit as
whole in 5.18.
> Thanks for providing these dumps.
> --
> Florian
next prev parent reply other threads:[~2022-02-23 17:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 9:53 [PATCH] net: bcmgenet: Return not supported if we don't have a WoL IRQ Peter Robinson
2022-02-22 10:03 ` Javier Martinez Canillas
2022-02-22 16:42 ` Florian Fainelli
2022-02-22 20:07 ` Peter Robinson
2022-02-22 20:15 ` Florian Fainelli
2022-02-23 11:40 ` Peter Robinson
2022-02-23 17:35 ` Florian Fainelli
2022-02-23 17:41 ` Peter Robinson
2022-02-23 17:45 ` Peter Robinson [this message]
2022-02-23 17:54 ` Florian Fainelli
2022-02-23 22:48 ` Jakub Kicinski
2022-02-23 22:58 ` Florian Fainelli
2022-02-23 23:15 ` Jakub Kicinski
2022-03-02 18:02 ` Jakub Kicinski
2022-03-02 18:20 ` Florian Fainelli
2022-03-03 20:00 ` Jeremy Linton
2022-03-03 20:04 ` Javier Martinez Canillas
2022-03-04 17:33 ` Jeremy Linton
2022-03-04 20:12 ` Florian Fainelli
2022-03-07 18:27 ` Jeremy Linton
2022-03-07 18:44 ` Florian Fainelli
2022-03-07 19:23 ` Jeremy Linton
2022-02-24 9:34 ` Peter Robinson
2022-03-02 5:00 ` Jeremy Linton
2022-03-02 9:34 ` Peter Robinson
2022-02-22 23:42 ` Jakub Kicinski
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=CALeDE9PK9JkFkbTc36HOZH8CG8MM3OMhKJ24FKioKF5bspSPkA@mail.gmail.com \
--to=pbrobinson@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=javierm@redhat.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.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).