Unverified Commit 2d27a1ca authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown
Browse files

ASoC: Intel: avs: Do not treat unsupported IPCs as invalid



Utilize NOT_SUPPORTED status code to differentiate between unsupported
and invalid requests. Skip over error paths if it is the former that is
communicated by the base firmware.

Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221010121955.718168-12-cezary.rojewski@intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 18a78790
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -220,8 +220,10 @@ static inline void avs_ipc_err(struct avs_dev *adev, struct avs_ipc_msg *tx,
	/*
	 * If IPC channel is blocked e.g.: due to ongoing recovery,
	 * -EPERM error code is expected and thus it's not an actual error.
	 *
	 * Unsupported IPCs are of no harm either.
	 */
	if (error == -EPERM)
	if (error == -EPERM || error == AVS_IPC_NOT_SUPPORTED)
		dev_dbg(adev->dev, "%s 0x%08x 0x%08x failed: %d\n", name,
			tx->glb.primary, tx->glb.ext.val, error);
	else
+2 −0
Original line number Diff line number Diff line
@@ -150,6 +150,8 @@ union avs_module_msg {
	};
} __packed;

#define AVS_IPC_NOT_SUPPORTED 15

union avs_reply_msg {
	u64 val;
	struct {