Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -802,6 +802,7 @@ static int suspend_dev(struct device *de if (err) printk(KERN_WARNING "xenbus: suspend %s failed: %i\n", dev->bus_id, err); + xenbus_switch_state(xdev, NULL, XenbusStateSuspend); return 0; } @@ -834,6 +835,7 @@ static int resume_dev(struct device *dev return err; } + xenbus_switch_state(xdev, NULL, XenbusStateResume); if (drv->resume) err = drv->resume(xdev); if (err) Index: root/xen-unstable.hg/xen/include/public/io/xenbus.h =================================================================== --- root.orig/xen-unstable.hg/xen/include/public/io/xenbus.h +++ root/xen-unstable.hg/xen/include/public/io/xenbus.h @@ -26,7 +26,9 @@ typedef enum XenbusStateConnected = 4, XenbusStateClosing = 5, /* The device is being closed due to an error or an unplug event. */ - XenbusStateClosed = 6 + XenbusStateClosed = 6, + XenbusStateSuspend = 7, + XenbusStateResume = 8 } XenbusState; Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c @@ -257,6 +257,8 @@ static void frontend_changed(struct xenb switch (frontend_state) { case XenbusStateInitialising: case XenbusStateConnected: + case XenbusStateSuspend: + case XenbusStateResume: break; case XenbusStateInitialised: Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -276,6 +276,8 @@ static void backend_changed(struct xenbu case XenbusStateInitWait: case XenbusStateInitialised: case XenbusStateClosed: + case XenbusStateSuspend: + case XenbusStateResume: break; case XenbusStateConnected: Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c @@ -205,6 +205,8 @@ static void frontend_changed(struct xenb switch (frontend_state) { case XenbusStateInitialising: case XenbusStateInitialised: + case XenbusStateSuspend: + case XenbusStateResume: break; case XenbusStateConnected: Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -407,6 +407,8 @@ static void backend_changed(struct xenbu case XenbusStateConnected: case XenbusStateUnknown: case XenbusStateClosed: + case XenbusStateSuspend: + case XenbusStateResume: break; case XenbusStateClosing: Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c @@ -338,6 +338,8 @@ static void backend_changed(struct xenbu case XenbusStateInitWait: case XenbusStateInitialised: case XenbusStateUnknown: + case XenbusStateSuspend: + case XenbusStateResume: break; case XenbusStateConnected: Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c @@ -166,6 +166,8 @@ static void frontend_changed(struct xenb switch (frontend_state) { case XenbusStateInitialising: case XenbusStateConnected: + case XenbusStateSuspend: + case XenbusStateResume: break; case XenbusStateInitialised: