summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorbus/visorchipset.c
diff options
context:
space:
mode:
authorDavid Kershner2016-11-03 16:44:19 +0100
committerGreg Kroah-Hartman2016-11-07 10:56:39 +0100
commit8f334e30c3c766b1b7e7f89cbbdd8d9d02fce91c (patch)
tree058de2db74559e6663bd8e340f4a8a778bb44cec /drivers/staging/unisys/visorbus/visorchipset.c
parentstaging: unisys: visorbus: fix double response (diff)
downloadkernel-qcow2-linux-8f334e30c3c766b1b7e7f89cbbdd8d9d02fce91c.tar.gz
kernel-qcow2-linux-8f334e30c3c766b1b7e7f89cbbdd8d9d02fce91c.tar.xz
kernel-qcow2-linux-8f334e30c3c766b1b7e7f89cbbdd8d9d02fce91c.zip
staging: unisys: visorbus: bus_create no longer calls bus_epilog
Have bus_create call chipset_bus_create directly instead of going through the function bus_epilog. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorbus/visorchipset.c')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 7e2004f5935a..3847788acb61 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -717,6 +717,7 @@ bus_epilog(struct visor_device *bus_info,
POSTCODE_LINUX_4(MALLOC_FAILURE_PC, cmd,
bus_info->chipset_bus_no,
POSTCODE_SEVERITY_ERR);
+ goto out_respond;
return;
}
@@ -825,6 +826,7 @@ static void
bus_create(struct controlvm_message *inmsg)
{
struct controlvm_message_packet *cmd = &inmsg->cmd;
+ struct controlvm_message_header *pmsg_hdr = NULL;
u32 bus_no = cmd->create_bus.bus_no;
int rc = CONTROLVM_RESP_SUCCESS;
struct visor_device *bus_info;
@@ -860,19 +862,40 @@ bus_create(struct controlvm_message *inmsg)
POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus_no,
POSTCODE_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
- kfree(bus_info);
- bus_info = NULL;
- goto out_bus_epilog;
+ goto out_free_bus_info;
}
bus_info->visorchannel = visorchannel;
+
if (uuid_le_cmp(cmd->create_bus.bus_inst_uuid, spar_siovm_uuid) == 0)
save_crash_message(inmsg, CRASH_BUS);
+ if (inmsg->hdr.flags.response_expected == 1) {
+ pmsg_hdr = kzalloc(sizeof(*pmsg_hdr),
+ GFP_KERNEL);
+ if (!pmsg_hdr) {
+ POSTCODE_LINUX_4(MALLOC_FAILURE_PC, cmd,
+ bus_info->chipset_bus_no,
+ POSTCODE_SEVERITY_ERR);
+ rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
+ goto out_free_bus_info;
+ }
+
+ memcpy(pmsg_hdr, &inmsg->hdr,
+ sizeof(struct controlvm_message_header));
+ bus_info->pending_msg_hdr = pmsg_hdr;
+ }
+
+ chipset_bus_create(bus_info);
+
POSTCODE_LINUX_3(BUS_CREATE_EXIT_PC, bus_no, POSTCODE_SEVERITY_INFO);
+ return;
+
+out_free_bus_info:
+ kfree(bus_info);
out_bus_epilog:
- bus_epilog(bus_info, CONTROLVM_BUS_CREATE, &inmsg->hdr,
- rc, inmsg->hdr.flags.response_expected == 1);
+ if (inmsg->hdr.flags.response_expected == 1)
+ bus_responder(CONTROLVM_BUS_CREATE, &inmsg->hdr, rc);
}
static void