From: Andrew Morton <akpm@linux-foundation.org>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] serial: fix enable_irq_wake/disable_irq_wake imbalance in serial_core.c
Date: Wed, 21 May 2008 14:53:38 -0700 [thread overview]
Message-ID: <20080521145338.022abd3b.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080519201141.1dbe6cc1@linux.intel.com>
On Mon, 19 May 2008 20:11:41 -0700
Arjan van de Ven <arjan@linux.intel.com> wrote:
> From: Arjan van de Ven <arjan@linux.intel.com>
> Subject: [PATCH] serial: fix enable_irq_wake/disable_irq_wake imbalance in serial_core.c
>
> enable_irq_wake() and disable_irq_wake() need to be balanced.
> However, serial_core.c calls these for different conditions during
> the suspend and resume functions...
>
> This is causing a regular WARN_ON() as found at
> http://www.kerneloops.org/search.php?search=set_irq_wake
>
> This patch makes the conditions for triggering the _wake
> enable/disable sequence identical.
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
> ---
> drivers/serial/serial_core.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
> index eab0327..4df9ee1 100644
> --- a/drivers/serial/serial_core.c
> +++ b/drivers/serial/serial_core.c
> @@ -2054,6 +2054,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
> int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
> {
> struct uart_state *state = drv->state + port->line;
> + struct device *tty_dev;
> + struct uart_match match = {port, drv};
>
> mutex_lock(&state->mutex);
>
> @@ -2063,7 +2065,8 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
> return 0;
> }
>
> - if (!port->suspended) {
> + tty_dev = device_find_child(port->dev, &match, serial_match_port);
> + if (!port->suspended && device_may_wakeup(tty_dev)) {
> disable_irq_wake(port->irq);
> mutex_unlock(&state->mutex);
> return 0;
erp, is that the easiest way of going from a uart_driver* to a device*?
Doing a lookup each time is a bit unusual.
next prev parent reply other threads:[~2008-05-21 21:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 3:11 [PATCH] serial: fix enable_irq_wake/disable_irq_wake imbalance in serial_core.c Arjan van de Ven
2008-05-21 21:53 ` Andrew Morton [this message]
2008-05-22 3:59 ` Arjan van de Ven
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=20080521145338.022abd3b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@linux.intel.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.