git: f02162394925 - main - scmi: Redefine max message payload size

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Thu, 23 Jan 2025 17:27:32 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=f0216239492579022982d94e04090f1333fee5a5

commit f0216239492579022982d94e04090f1333fee5a5
Author:     Cristian Marussi <cristian.marussi@arm.com>
AuthorDate: 2025-01-23 12:49:41 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-01-23 17:26:26 +0000

    scmi: Redefine max message payload size
    
    The defined maximum payload size should not include header and status
    field. Fix the definition accordingly, so that it matches the
    definitions as can be found in the Linux SCMI stack.
    The semantic of this define is important since it will then be possible
    to override such values from devicetree, like in Linux.
    
    Tested on:      Arm Morello Board
    Reviewed by:    andrew
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D47421
    Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
 sys/dev/firmware/arm/scmi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/firmware/arm/scmi.h b/sys/dev/firmware/arm/scmi.h
index 5ad7b0db3f5f..73b49f099ad8 100644
--- a/sys/dev/firmware/arm/scmi.h
+++ b/sys/dev/firmware/arm/scmi.h
@@ -36,8 +36,8 @@
 
 #define SCMI_MAX_MSG		32
 #define SCMI_MAX_MSG_PAYLD_SIZE	128
-#define SCMI_MAX_MSG_REPLY_SIZE	(SCMI_MAX_MSG_PAYLD_SIZE - sizeof(uint32_t))
-#define SCMI_MAX_MSG_SIZE	(SCMI_MAX_MSG_PAYLD_SIZE + sizeof(uint32_t))
+#define SCMI_MAX_MSG_REPLY_SIZE	(SCMI_MAX_MSG_PAYLD_SIZE + sizeof(uint32_t))
+#define SCMI_MAX_MSG_SIZE	(SCMI_MAX_MSG_REPLY_SIZE + sizeof(uint32_t))
 
 enum scmi_chan {
 	SCMI_CHAN_A2P,