|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 2 of 3] xen: Support suspend in ns16550 code
To: |
xen-devel@xxxxxxxxxxxxxxxxxxx, keir@xxxxxxx, stefano.stabellini@xxxxxxxxxxxxx, Ian.Campbell@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, JBeulich@xxxxxxxxxx, George.Dunlap@xxxxxxxxxxxxx, roger.cruz@xxxxxxxxxxxxxxxxxxx, tom.goetz@xxxxxxxxxxxxxxxxxxx |
Subject: |
[Xen-devel] [PATCH 2 of 3] xen: Support suspend in ns16550 code |
From: |
Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> |
Date: |
Thu, 07 Jul 2011 09:59:29 -0400 |
Cc: |
konrad.wilk@xxxxxxxxxx |
Delivery-date: |
Thu, 07 Jul 2011 07:06:45 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<patchbomb.1310047167@xxxxxxxxxxxxxxxxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<patchbomb.1310047167@xxxxxxxxxxxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Mercurial-patchbomb/1.8.1 |
# HG changeset patch
# User Tom Goetz <tom.goetz@xxxxxxxxxxxxxxxxxxx>
# Date 1310047154 14400
# Node ID 8d328f424b554a5714fccc6fd426111bec57a531
# Parent 7cdc5770d13bbd7fc2b958ba7d74787ff4e20eef
xen: Support suspend in ns16550 code.
For PCI type cards, you need to disable the timer code during
suspend. Otherwise during resume, the timer can be put on the
heap as its being resumed and corrupt it resulting in a crash.
Signed-off-by: Roger Cruz <roger.cruz@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Tom Goetz <tom.goetz@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
diff -r 7cdc5770d13b -r 8d328f424b55 xen/drivers/char/ns16550.c
--- a/xen/drivers/char/ns16550.c Thu Jul 07 09:59:09 2011 -0400
+++ b/xen/drivers/char/ns16550.c Thu Jul 07 09:59:14 2011 -0400
@@ -353,6 +353,13 @@ static int ns16550_irq(struct serial_por
return ((uart->irq > 0) ? uart->irq : -1);
}
+static void ns16550_suspend(struct serial_port *port)
+{
+ struct ns16550 *uart = port->uart;
+
+ stop_timer(&uart->timer);
+}
+
static struct uart_driver __read_mostly ns16550_driver = {
.init_preirq = ns16550_init_preirq,
.init_postirq = ns16550_init_postirq,
@@ -361,7 +368,8 @@ static struct uart_driver __read_mostly
.tx_empty = ns16550_tx_empty,
.putc = ns16550_putc,
.getc = ns16550_getc,
- .irq = ns16550_irq
+ .irq = ns16550_irq,
+ .suspend = ns16550_suspend,
};
static int __init parse_parity_char(int c)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|