hda-ipc.c (28f2aff1caa4997f58ca31179cad1b4a84a62827) | hda-ipc.c (f3b433e4699fa358ce5b7bd7688bebe36068c199) |
---|---|
1// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2// 3// This file is provided under a dual BSD/GPLv2 license. When using or 4// redistributing this file, you may do so under either license. 5// 6// Copyright(c) 2018 Intel Corporation. All rights reserved. 7// 8// Authors: Liam Girdwood <liam.r.girdwood@linux.intel.com> --- 92 unchanged lines hidden (view full) --- 101 sof_mailbox_read(sdev, sdev->host_box.offset, &reply, 102 sizeof(reply)); 103 104 if (reply.error < 0) { 105 memcpy(msg->reply_data, &reply, sizeof(reply)); 106 ret = reply.error; 107 } else { 108 /* reply correct size ? */ | 1// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2// 3// This file is provided under a dual BSD/GPLv2 license. When using or 4// redistributing this file, you may do so under either license. 5// 6// Copyright(c) 2018 Intel Corporation. All rights reserved. 7// 8// Authors: Liam Girdwood <liam.r.girdwood@linux.intel.com> --- 92 unchanged lines hidden (view full) --- 101 sof_mailbox_read(sdev, sdev->host_box.offset, &reply, 102 sizeof(reply)); 103 104 if (reply.error < 0) { 105 memcpy(msg->reply_data, &reply, sizeof(reply)); 106 ret = reply.error; 107 } else { 108 /* reply correct size ? */ |
109 if (reply.hdr.size != msg->reply_size) { | 109 if (reply.hdr.size != msg->reply_size && 110 /* getter payload is never known upfront */ 111 !(reply.hdr.cmd & SOF_IPC_GLB_PROBE)) { |
110 dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n", 111 msg->reply_size, reply.hdr.size); 112 ret = -EINVAL; 113 } 114 115 /* read the message */ 116 if (msg->reply_size > 0) 117 sof_mailbox_read(sdev, sdev->host_box.offset, --- 195 unchanged lines hidden --- | 112 dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n", 113 msg->reply_size, reply.hdr.size); 114 ret = -EINVAL; 115 } 116 117 /* read the message */ 118 if (msg->reply_size > 0) 119 sof_mailbox_read(sdev, sdev->host_box.offset, --- 195 unchanged lines hidden --- |