RE: Unbalanced IRQ wake disable during resume from static suspend

Paul Walmsley
2010-12-03T10:23:10Z

Hello Santosh

On Thu, 2 Dec 2010, Santosh Shilimkar wrote:

> Just a wild guess here but is this because the 'set_wake' is
> not setup and then fw might be returning some error whenever
> driver invoke this API as part of enable_irq_wake() callback
>
> If that being the case, below patch might might help. Can
> somebody try this out ?

This patch might remove the warnings, but I doubt that it solves the root
cause. In any case, it doesn't seem correct to unconditionally return 0
(success) from an omap_irq_wake() function, given that the OMAP INTC has
no functionality in this regard.

The real problem appears to be in drivers/serial/serial_core.c.
uart_suspend_port() doesn't check the return value of enable_irq_wake().
Seems to me that it needs to save that return value somewhere and not
bother calling disable_irq_wake() in uart_resume_port() if
enable_irq_wake() returned an error.

That's the patch that I'd suggest that you guys put together and send to
the Linux serial people.

- Paul