Commit 54f7e443 authored by Alex Elder's avatar Alex Elder Committed by David S. Miller

net: ipa: do not enable GSI interrupt for wakeup

We now trigger a system resume when we receive an IPA SUSPEND
interrupt.  We should *not* wake up on GSI interrupts.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d1b5126a
...@@ -1987,31 +1987,26 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch, ...@@ -1987,31 +1987,26 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch,
} }
gsi->irq = irq; 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 */ /* Get GSI memory range and map it */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gsi"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gsi");
if (!res) { if (!res) {
dev_err(dev, "DT error getting \"gsi\" memory property\n"); dev_err(dev, "DT error getting \"gsi\" memory property\n");
ret = -ENODEV; ret = -ENODEV;
goto err_disable_irq_wake; goto err_free_irq;
} }
size = resource_size(res); size = resource_size(res);
if (res->start > U32_MAX || size > U32_MAX - res->start) { if (res->start > U32_MAX || size > U32_MAX - res->start) {
dev_err(dev, "DT memory resource \"gsi\" out of range\n"); dev_err(dev, "DT memory resource \"gsi\" out of range\n");
ret = -EINVAL; ret = -EINVAL;
goto err_disable_irq_wake; goto err_free_irq;
} }
gsi->virt = ioremap(res->start, size); gsi->virt = ioremap(res->start, size);
if (!gsi->virt) { if (!gsi->virt) {
dev_err(dev, "unable to remap \"gsi\" memory\n"); dev_err(dev, "unable to remap \"gsi\" memory\n");
ret = -ENOMEM; ret = -ENOMEM;
goto err_disable_irq_wake; goto err_free_irq;
} }
ret = gsi_channel_init(gsi, prefetch, count, data, modem_alloc); 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, ...@@ -2025,9 +2020,7 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch,
err_iounmap: err_iounmap:
iounmap(gsi->virt); iounmap(gsi->virt);
err_disable_irq_wake: err_free_irq:
if (gsi->irq_wake_enabled)
(void)disable_irq_wake(gsi->irq);
free_irq(gsi->irq, gsi); free_irq(gsi->irq, gsi);
return ret; return ret;
...@@ -2038,8 +2031,6 @@ void gsi_exit(struct gsi *gsi) ...@@ -2038,8 +2031,6 @@ void gsi_exit(struct gsi *gsi)
{ {
mutex_destroy(&gsi->mutex); mutex_destroy(&gsi->mutex);
gsi_channel_exit(gsi); gsi_channel_exit(gsi);
if (gsi->irq_wake_enabled)
(void)disable_irq_wake(gsi->irq);
free_irq(gsi->irq, gsi); free_irq(gsi->irq, gsi);
iounmap(gsi->virt); iounmap(gsi->virt);
} }
......
...@@ -150,7 +150,6 @@ struct gsi { ...@@ -150,7 +150,6 @@ struct gsi {
struct net_device dummy_dev; /* needed for NAPI */ struct net_device dummy_dev; /* needed for NAPI */
void __iomem *virt; void __iomem *virt;
u32 irq; u32 irq;
bool irq_wake_enabled;
u32 channel_count; u32 channel_count;
u32 evt_ring_count; u32 evt_ring_count;
struct gsi_channel channel[GSI_CHANNEL_COUNT_MAX]; struct gsi_channel channel[GSI_CHANNEL_COUNT_MAX];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment