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] This fixes the state machine of the vTPM driver.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] This fixes the state machine of the vTPM driver.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Apr 2006 12:08:11 +0000
Delivery-date: Thu, 13 Apr 2006 05:09:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 2aa9e9867477a3a5ede39acea8cbb0bbf0f8c88b
# Parent  c9d706834d25a9efe5bd3a98cbf32c6998f30ab4
This fixes the state machine of the vTPM driver.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>

diff -r c9d706834d25 -r 2aa9e9867477 
linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c Thu Apr 13 09:57:57 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c Thu Apr 13 09:59:08 2006
@@ -164,10 +164,10 @@
 
        switch (frontend_state) {
        case XenbusStateInitialising:
+       case XenbusStateInitialised:
+               break;
+
        case XenbusStateConnected:
-               break;
-
-       case XenbusStateInitialised:
                err = connect_ring(be);
                if (err) {
                        return;
diff -r c9d706834d25 -r 2aa9e9867477 
linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c      Thu Apr 13 
09:57:57 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c      Thu Apr 13 
09:59:08 2006
@@ -334,12 +334,6 @@
                goto abort_transaction;
        }
 
-       err = xenbus_printf(xbt, dev->nodename,
-                           "state", "%d", XenbusStateInitialised);
-       if (err) {
-               goto abort_transaction;
-       }
-
        err = xenbus_transaction_end(xbt, 0);
        if (err == -EAGAIN)
                goto again;
@@ -347,6 +341,9 @@
                xenbus_dev_fatal(dev, err, "completing transaction");
                goto destroy_tpmring;
        }
+
+       xenbus_switch_state(dev, XenbusStateConnected);
+
        return 0;
 
 abort_transaction:
@@ -387,6 +384,7 @@
                if (tp->is_suspended == 0) {
                        device_unregister(&dev->dev);
                }
+               xenbus_switch_state(dev, XenbusStateClosed);
                break;
        }
 }
@@ -439,6 +437,7 @@
 
        /* lock, so no app can send */
        mutex_lock(&suspend_lock);
+       xenbus_switch_state(dev, XenbusStateClosed);
        tp->is_suspended = 1;
 
        for (ctr = 0; atomic_read(&tp->tx_busy) && ctr <= 25; ctr++) {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] This fixes the state machine of the vTPM driver., Xen patchbot -unstable <=