summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Romer <benjamin.romer@unisys.com>2014-09-22 13:45:03 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-23 13:35:03 -0700
commit35b8117b0ad066d5964a85e5fc0fdbe1bc735a13 (patch)
treebbb3533a8af6afbb34c35a60aefed32d9a039768
parent24fc2d01dbd569554373818b72e6d26c86290763 (diff)
staging: unisys: fix IO memory copy in channel.h
The function ULTRA_check_channel_client() was recently patched to use ioread8_rep(). Unfortunately the parameters were incorrectly ordered, and this causes the function to fail and the guest to not boot. This patch switches the parameters around and uses memcpy_fromio() instead, which is clearer since a structure is being copied, not an array, and it fixes the error message printout later in the function that was using the UUID value in the channel, rather than the value copied from the channel, which causes a misleading error to be reported. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/unisys/common-spar/include/channels/channel.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/unisys/common-spar/include/channels/channel.h b/drivers/staging/unisys/common-spar/include/channels/channel.h
index 5ba5e566be9a..4af9457ac3a7 100644
--- a/drivers/staging/unisys/common-spar/include/channels/channel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/channel.h
@@ -350,14 +350,14 @@ ULTRA_check_channel_client(void __iomem *pChannel,
if (uuid_le_cmp(expectedTypeGuid, NULL_UUID_LE) != 0) {
uuid_le guid;
- ioread8_rep(&((CHANNEL_HEADER __iomem *)(pChannel))->Type,
- &guid, sizeof(guid));
+ memcpy_fromio(&guid,
+ &((CHANNEL_HEADER __iomem *)(pChannel))->Type,
+ sizeof(guid));
/* caller wants us to verify type GUID */
if (uuid_le_cmp(guid, expectedTypeGuid) != 0) {
CHANNEL_GUID_MISMATCH(expectedTypeGuid, channelName,
"type", expectedTypeGuid,
- ((CHANNEL_HEADER __iomem *)
- (pChannel))->Type, fileName,
+ guid, fileName,
lineNumber, logCtx);
return 0;
}