forked from luck/tmp_suning_uos_patched
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: Alex Elder <elder@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d1b5126af0
commit
54f7e44353
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue
Block a user