]> xenbits.xensource.com Git - people/liuw/mini-os.git/commit
minios: fix xenbus_rm() calls in frontend drivers
authorBen Cressey <bcressey@amazon.com>
Fri, 6 Sep 2013 19:52:07 +0000 (12:52 -0700)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 10 Sep 2013 09:55:17 +0000 (10:55 +0100)
commite2e70e7e7c5aa918f2c61effeb2209f2d00a3edb
tree94b17399f7687c64a17fe5e4b7b61add65eb1151
parentd9f24a95b89584e629a879691ff2d31dfddd11cf
minios: fix xenbus_rm() calls in frontend drivers

The commit "minios: refactor xenbus state machine" caused "/state" to
be appended to the local value of nodename. Previously the nodename
variable pointed to dev->nodename.

The xenbus_rm() calls were not updated to reflect this change, and
refer to paths that do not exist.

For example, shutdown_blkfront() for vbd 2049 would issue these calls:
    xenbus_rm(XBT_NIL, "device/vbd/2049/state/ring-ref");
    xenbus_rm(XBT_NIL, "device/vbd/2049/state/event-channel");

This patch restores the previous behavior, issuing these calls
instead:
    xenbus_rm(XBT_NIL, "device/vbd/2049/ring-ref");
    xenbus_rm(XBT_NIL, "device/vbd/2049/event-channel");

This causes frontend drivers to not be properly reset when PV-GRUB
exists. Some PV Linux drivers fail to re-initialize frontend devices
if PV-GRUB leaves them in this state.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
Reviewed-by: Matt Wilson <msw@amazon.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
[msw: adjusted commit message to include consequences, split out
 changes into separate patches]
Signed-off-by: Matt Wilson <msw@amazon.com>
blkfront.c
fbfront.c
netfront.c
pcifront.c