From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Alex Elder <elder@linaro.org>
Cc: davem@davemloft.net, kuba@kernel.org, evgreen@chromium.org,
subashab@codeaurora.org, cpratapa@codeaurora.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 7/7] net: ipa: do not enable GSI interrupt for wakeup
Date: Sat, 12 Sep 2020 21:50:06 -0500 [thread overview]
Message-ID: <20200913025006.GQ3715@yoga> (raw)
In-Reply-To: <20200912004532.1386-8-elder@linaro.org>
On Fri 11 Sep 19:45 CDT 2020, Alex Elder wrote:
> We now trigger a system resume when we receive an IPA SUSPEND
> interrupt. We should *not* wake up on GSI interrupts.
>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Alex Elder <elder@linaro.org>
> ---
> drivers/net/ipa/gsi.c | 17 ++++-------------
> drivers/net/ipa/gsi.h | 1 -
> 2 files changed, 4 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
> index 0e63d35320aaf..cb75f7d540571 100644
> --- a/drivers/net/ipa/gsi.c
> +++ b/drivers/net/ipa/gsi.c
> @@ -1987,31 +1987,26 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch,
> }
> gsi->irq = irq;
>
> - ret = enable_irq_wake(gsi->irq);
> - if (ret)
> - dev_warn(dev, "error %d enabling gsi wake irq\n", ret);
> - gsi->irq_wake_enabled = !ret;
> -
> /* Get GSI memory range and map it */
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gsi");
> if (!res) {
> dev_err(dev, "DT error getting \"gsi\" memory property\n");
> ret = -ENODEV;
> - goto err_disable_irq_wake;
> + goto err_free_irq;
> }
>
> size = resource_size(res);
> if (res->start > U32_MAX || size > U32_MAX - res->start) {
> dev_err(dev, "DT memory resource \"gsi\" out of range\n");
> ret = -EINVAL;
> - goto err_disable_irq_wake;
> + goto err_free_irq;
> }
>
> gsi->virt = ioremap(res->start, size);
> if (!gsi->virt) {
> dev_err(dev, "unable to remap \"gsi\" memory\n");
> ret = -ENOMEM;
> - goto err_disable_irq_wake;
> + goto err_free_irq;
> }
>
> ret = gsi_channel_init(gsi, prefetch, count, data, modem_alloc);
> @@ -2025,9 +2020,7 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch,
>
> err_iounmap:
> iounmap(gsi->virt);
> -err_disable_irq_wake:
> - if (gsi->irq_wake_enabled)
> - (void)disable_irq_wake(gsi->irq);
> +err_free_irq:
> free_irq(gsi->irq, gsi);
>
> return ret;
> @@ -2038,8 +2031,6 @@ void gsi_exit(struct gsi *gsi)
> {
> mutex_destroy(&gsi->mutex);
> gsi_channel_exit(gsi);
> - if (gsi->irq_wake_enabled)
> - (void)disable_irq_wake(gsi->irq);
> free_irq(gsi->irq, gsi);
> iounmap(gsi->virt);
> }
> diff --git a/drivers/net/ipa/gsi.h b/drivers/net/ipa/gsi.h
> index 061312773df09..3f9f29d531c43 100644
> --- a/drivers/net/ipa/gsi.h
> +++ b/drivers/net/ipa/gsi.h
> @@ -150,7 +150,6 @@ struct gsi {
> struct net_device dummy_dev; /* needed for NAPI */
> void __iomem *virt;
> u32 irq;
> - bool irq_wake_enabled;
> u32 channel_count;
> u32 evt_ring_count;
> struct gsi_channel channel[GSI_CHANNEL_COUNT_MAX];
> --
> 2.20.1
>
prev parent reply other threads:[~2020-09-13 2:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-12 0:45 [PATCH net-next v2 0/7] net: ipa: wake up system on RX available Alex Elder
2020-09-12 0:45 ` [PATCH net-next v2 1/7] net: ipa: use refcount_t for IPA clock reference count Alex Elder
2020-09-12 0:45 ` [PATCH net-next v2 2/7] net: ipa: replace ipa->suspend_ref with a flag bit Alex Elder
2020-09-12 0:45 ` [PATCH net-next v2 3/7] net: ipa: verify reference flag values Alex Elder
2020-09-13 2:25 ` Bjorn Andersson
2020-09-13 13:36 ` Alex Elder
2020-09-12 0:45 ` [PATCH net-next v2 4/7] net: ipa: manage endpoints separate from clock Alex Elder
2020-09-13 2:30 ` Bjorn Andersson
2020-09-12 0:45 ` [PATCH net-next v2 5/7] net: ipa: use device_init_wakeup() Alex Elder
2020-09-13 2:27 ` Bjorn Andersson
2020-09-12 0:45 ` [PATCH net-next v2 6/7] net: ipa: enable wakeup on IPA interrupt Alex Elder
2020-09-13 2:47 ` Bjorn Andersson
2020-09-12 0:45 ` [PATCH net-next v2 7/7] net: ipa: do not enable GSI interrupt for wakeup Alex Elder
2020-09-13 2:50 ` Bjorn Andersson [this message]
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=20200913025006.GQ3715@yoga \
--to=bjorn.andersson@linaro.org \
--cc=cpratapa@codeaurora.org \
--cc=davem@davemloft.net \
--cc=elder@linaro.org \
--cc=evgreen@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.org \
/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).