From ef7c66a6ce2dcba2ad024e8c2e32954ecbecfb16 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Sun, 11 Dec 2011 21:49:25 -0500 Subject: [PATCH] cp/guest: queue up a Channel Report Word after a device is attached Signed-off-by: Josef 'Jeff' Sipek --- cp/guest/attach.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cp/guest/attach.c b/cp/guest/attach.c index f3cbd19..b550989 100644 --- a/cp/guest/attach.c +++ b/cp/guest/attach.c @@ -7,6 +7,12 @@ #include #include +#include + +static void guest_append_crw(struct virt_sys *sys, struct crw *crw) +{ + sclp_msg("FIXME: guest CRW was not queued"); +} int guest_attach(struct virt_sys *sys, u64 rdev, u64 vdev) { @@ -16,6 +22,7 @@ int guest_attach(struct virt_sys *sys, u64 rdev, u64 vdev) .u.dedicate.rdev = rdev, }; struct virt_device *cur; + struct crw crw; int found; int ret; u64 sch; @@ -63,9 +70,17 @@ int guest_attach(struct virt_sys *sys, u64 rdev, u64 vdev) if (found) goto out_err; + memset(&crw, 0, sizeof(struct crw)); + crw.rsc = 0x3; + crw.erc = 0x4; + crw.id = sch & ~0x10000; + /* add the device */ ret = alloc_virt_dev(sys, &dv, sch); + if (!ret) + guest_append_crw(sys, &crw); + mutex_unlock(&sys->virt_devs_lock); return ret; -- 2.11.4.GIT