aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2008-04-02 13:54:02 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-24 17:57:32 -0400
commit3e334239d89d4a71610be5a3e8432464d421d9ec (patch)
treecbe48c21488b81652c3feb179a7d6584e7b5278c /drivers/block/xen-blkfront.c
parentb15993fcc1bf15f717fb4414b32e4a11534dfdc4 (diff)
xen: Make xen-blkfront write its protocol ABI to xenstore
Frontends are expected to write their protocol ABI to xenstore. Since the protocol ABI defaults to the backend's native ABI, things work fine without that as long as the frontend's native ABI is identical to the backend's native ABI. This is not the case for xen-blkfront running 32-on-64, because its ABI differs between 32 and 64 bit, and thus needs this fix. Based on http://xenbits.xensource.com/xen-unstable.hg?rev/c545932a18f3 and http://xenbits.xensource.com/xen-unstable.hg?rev/ffe52263b430 by Gerd Hoffmann <kraxel@suse.de> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r--drivers/block/xen-blkfront.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 9c6f3f99208d..2e7c81e3f36a 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -47,6 +47,7 @@
47 47
48#include <xen/interface/grant_table.h> 48#include <xen/interface/grant_table.h>
49#include <xen/interface/io/blkif.h> 49#include <xen/interface/io/blkif.h>
50#include <xen/interface/io/protocols.h>
50 51
51#include <asm/xen/hypervisor.h> 52#include <asm/xen/hypervisor.h>
52 53
@@ -614,6 +615,12 @@ again:
614 message = "writing event-channel"; 615 message = "writing event-channel";
615 goto abort_transaction; 616 goto abort_transaction;
616 } 617 }
618 err = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
619 XEN_IO_PROTO_ABI_NATIVE);
620 if (err) {
621 message = "writing protocol";
622 goto abort_transaction;
623 }
617 624
618 err = xenbus_transaction_end(xbt, 0); 625 err = xenbus_transaction_end(xbt, 0);
619 if (err) { 626 if (err) {