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] mini-os: Revert 21106:b20f897d6010 "Fix x

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] mini-os: Revert 21106:b20f897d6010 "Fix xenbus initialisation"
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 May 2010 13:20:38 -0700
Delivery-date: Tue, 04 May 2010 13:25:12 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1272971728 -3600
# Node ID cb06a3e1ee57e106dd43f8a1904e2e56bb66290c
# Parent  f7605c6c9548ff497e7fb9d48b7713290e245d1c
mini-os: Revert 21106:b20f897d6010 "Fix xenbus initialisation"

Jeremy Fitzhardinge (jeremy@xxxxxxxx) reports that this fixes HVM+stubdom.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 extras/mini-os/blkfront.c |   19 ++++---------------
 extras/mini-os/fbfront.c  |    5 ++---
 extras/mini-os/netfront.c |   16 ++--------------
 extras/mini-os/pcifront.c |   11 +++++------
 4 files changed, 13 insertions(+), 38 deletions(-)

diff -r f7605c6c9548 -r cb06a3e1ee57 extras/mini-os/blkfront.c
--- a/extras/mini-os/blkfront.c Tue May 04 12:12:28 2010 +0100
+++ b/extras/mini-os/blkfront.c Tue May 04 12:15:28 2010 +0100
@@ -152,11 +152,12 @@ again:
     }
 
     snprintf(path, sizeof(path), "%s/state", nodename);
-    err = xenbus_switch_state(xbt, path, XenbusStateInitialised);
+    err = xenbus_switch_state(xbt, path, XenbusStateConnected);
     if (err) {
-        printk("error writing blk initialized on %s: %s\n", path, err);
+        message = "switching state";
         goto abort_transaction;
     }
+
 
     err = xenbus_transaction_end(xbt, 0, &retry);
     if (err) free(err);
@@ -188,7 +189,6 @@ done:
     {
         XenbusState state;
         char path[strlen(dev->backend) + 1 + 19 + 1];
-        char frontpath[strlen(nodename) + 1 + 6 + 1];
         snprintf(path, sizeof(path), "%s/mode", dev->backend);
         msg = xenbus_read(XBT_NIL, path, &c);
         if (msg) {
@@ -232,18 +232,7 @@ done:
         dev->info.flush = xenbus_read_integer(path);
 
         *info = dev->info;
-
-        printk("%s connected\n", dev->backend);
-
-        snprintf(frontpath, sizeof(frontpath), "%s/state", nodename);
-        if((err = xenbus_switch_state(XBT_NIL, frontpath, 
XenbusStateConnected))
-            != NULL) {
-            printk("error switching state: %s\n", err);
-            xenbus_unwatch_path_token(XBT_NIL, path, path);
-            goto error;
-        }
-    }
-
+    }
     unmask_evtchn(dev->evtchn);
 
     printk("%u sectors of %u bytes\n", dev->info.sectors, 
dev->info.sector_size);
diff -r f7605c6c9548 -r cb06a3e1ee57 extras/mini-os/fbfront.c
--- a/extras/mini-os/fbfront.c  Tue May 04 12:12:28 2010 +0100
+++ b/extras/mini-os/fbfront.c  Tue May 04 12:15:28 2010 +0100
@@ -126,8 +126,8 @@ again:
     snprintf(path, sizeof(path), "%s/state", nodename);
     err = xenbus_switch_state(xbt, path, XenbusStateInitialised);
     if (err) {
-        printk("error writing fb initialized: %s\n", err);
-        goto abort_transaction;
+        printk("error writing initialized: %s\n", err);
+        free(err);
     }
 
     err = xenbus_transaction_end(xbt, 0, &retry);
@@ -189,7 +189,6 @@ done:
     printk("************************** KBDFRONT\n");
 
     return dev;
-
 error:
     free(msg);
     free(err);
diff -r f7605c6c9548 -r cb06a3e1ee57 extras/mini-os/netfront.c
--- a/extras/mini-os/netfront.c Tue May 04 12:12:28 2010 +0100
+++ b/extras/mini-os/netfront.c Tue May 04 12:15:28 2010 +0100
@@ -407,9 +407,9 @@ again:
     }
 
     snprintf(path, sizeof(path), "%s/state", nodename);
-    err = xenbus_switch_state(xbt, path, XenbusStateInitialised);
+    err = xenbus_switch_state(xbt, path, XenbusStateConnected);
     if (err) {
-        printk("error writing net initialized: %s\n", err);
+        message = "switching state";
         goto abort_transaction;
     }
 
@@ -445,7 +445,6 @@ done:
     {
         XenbusState state;
         char path[strlen(dev->backend) + 1 + 5 + 1];
-        char frontpath[strlen(nodename) + 1 + 6 + 1];
         snprintf(path, sizeof(path), "%s/state", dev->backend);
 
         xenbus_watch_path_token(XBT_NIL, path, path, &dev->events);
@@ -463,16 +462,6 @@ done:
         if (ip) {
             snprintf(path, sizeof(path), "%s/ip", dev->backend);
             xenbus_read(XBT_NIL, path, ip);
-        }
-
-        printk("%s connected\n", dev->backend);
-
-        snprintf(frontpath, sizeof(frontpath), "%s/state", nodename);
-        if((err = xenbus_switch_state(XBT_NIL, frontpath, 
XenbusStateConnected))
-            != NULL) {
-            printk("error switching state: %s\n", err);
-            xenbus_unwatch_path_token(XBT_NIL, path, path);
-            goto error;
         }
     }
 
@@ -492,7 +481,6 @@ done:
             &rawmac[5]);
 
     return dev;
-
 error:
     free(msg);
     free(err);
diff -r f7605c6c9548 -r cb06a3e1ee57 extras/mini-os/pcifront.c
--- a/extras/mini-os/pcifront.c Tue May 04 12:12:28 2010 +0100
+++ b/extras/mini-os/pcifront.c Tue May 04 12:15:28 2010 +0100
@@ -143,7 +143,7 @@ struct pcifront_dev *init_pcifront(char 
     char* err;
     char* message=NULL;
     int retry=0;
-    char* msg = NULL;
+    char* msg;
     char* nodename = _nodename ? _nodename : "device/pci/0";
     int dom;
 
@@ -206,7 +206,7 @@ again:
     snprintf(path, sizeof(path), "%s/state", nodename);
     err = xenbus_switch_state(xbt, path, XenbusStateInitialised);
     if (err) {
-        printk("error writing pci initialized: %s\n", err);
+        message = "switching state";
         goto abort_transaction;
     }
 
@@ -237,7 +237,7 @@ done:
 
     {
         char path[strlen(dev->backend) + 1 + 5 + 1];
-        char frontpath[strlen(nodename) + 1 + 6 + 1];
+        char frontpath[strlen(nodename) + 1 + 5 + 1];
         XenbusState state;
         snprintf(path, sizeof(path), "%s/state", dev->backend);
 
@@ -254,9 +254,9 @@ done:
         }
 
         snprintf(frontpath, sizeof(frontpath), "%s/state", nodename);
-        if((err = xenbus_switch_state(XBT_NIL, frontpath, 
XenbusStateConnected))
+        if ((err = xenbus_switch_state(XBT_NIL, frontpath, 
XenbusStateConnected))
             != NULL) {
-            printk("error switching state: %s\n", err);
+            printk("error switching state %s\n", err);
             xenbus_unwatch_path_token(XBT_NIL, path, path);
             goto error;
         }
@@ -271,7 +271,6 @@ done:
     return dev;
 
 error:
-    free(msg);
     free(err);
     free_pcifront(dev);
     return NULL;

_______________________________________________
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] mini-os: Revert 21106:b20f897d6010 "Fix xenbus initialisation", Xen patchbot-unstable <=