WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ns16550: Implement suspend handler.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sun, 10 Jul 2011 08:44:14 +0100
Delivery-date: Sun, 10 Jul 2011 00:45:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ns16550: Implement suspend handler., Xen patchbot-unstable <=