|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 2 of 5] xen: Support suspend in ns16550 code
To: |
xen-devel@xxxxxxxxxxxxxxxxxxx, keir@xxxxxxx, stefano.stabellini@xxxxxxxxxxxxx, Ian.Campbell@xxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, JBeulich@xxxxxxxxxx, George.Dunlap@xxxxxxxxxxxxx, roger.cruz@xxxxxxxxxxxxxxxxxxx, tom.goetz@xxxxxxxxxxxxxxxxxxx |
Subject: |
[Xen-devel] [PATCH 2 of 5] xen: Support suspend in ns16550 code |
From: |
Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> |
Date: |
Tue, 12 Jul 2011 13:53:09 -0400 |
Cc: |
konrad.wilk@xxxxxxxxxx |
Delivery-date: |
Tue, 12 Jul 2011 10:57:56 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<patchbomb.1310493187@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.1310493187@xxxxxxxxxxxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Mercurial-patchbomb/1.8.1 |
# HG changeset patch
# User Tom Goetz <tom.goetz@xxxxxxxxxxxxxxxxxxx>
# Date 1310490365 14400
# Node ID 4c94bcf4b4afb840bc6a037f0782c63ad573f4eb
# Parent 50ce3b9afcd7f43801408f2d1acc686afeb54f00
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 50ce3b9afcd7 -r 4c94bcf4b4af xen/drivers/char/ns16550.c
--- a/xen/drivers/char/ns16550.c Tue Jul 12 13:06:05 2011 -0400
+++ b/xen/drivers/char/ns16550.c Tue Jul 12 13:06:05 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
|
|
|
|
|