[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] ns16550: Implement suspend handler.



# HG changeset patch
# User Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
# Date 1310110950 -3600
# Node ID 0c17d96922d47d56de3bf83aaf2bcd412c4afc09
# Parent  4c70f4c5a8a31cebdd2fdcdbbe8c6932263ce899
ns16550: Implement suspend handler.

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 4c70f4c5a8a3 -r 0c17d96922d4 xen/drivers/char/ns16550.c
--- a/xen/drivers/char/ns16550.c        Fri Jul 08 08:39:26 2011 +0100
+++ b/xen/drivers/char/ns16550.c        Fri Jul 08 08:42:30 2011 +0100
@@ -328,6 +328,12 @@
     ns16550_setup_postirq(uart);
 }
 
+static void ns16550_suspend(struct serial_port *port)
+{
+    struct ns16550 *uart = port->uart;
+    stop_timer(&uart->timer);
+}
+
 static void ns16550_resume(struct serial_port *port)
 {
     ns16550_setup_preirq(port->uart);
@@ -355,6 +361,7 @@
     .init_preirq  = ns16550_init_preirq,
     .init_postirq = ns16550_init_postirq,
     .endboot      = ns16550_endboot,
+    .suspend      = ns16550_suspend,
     .resume       = ns16550_resume,
     .tx_empty     = ns16550_tx_empty,
     .putc         = ns16550_putc,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.