[edk2-devel] [PATCH edk2-platforms v2 10/15] ManageabilityPkg: Return error on multiple-packet MCTP responses
Konstantin Aladyshev
aladyshev22 at gmail.com
Fri Oct 20 12:52:57 UTC 2023
Since the current driver doesn't yet support handling of
multiple-packet MCTP responses, return EFI_UNSUPPORTED error in such
cases.
Signed-off-by: Konstantin Aladyshev <aladyshev22 at gmail.com>
---
.../MctpProtocol/Common/MctpProtocolCommon.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
index 4aae4fcba9..3709ab16eb 100644
--- a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
+++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
@@ -524,6 +524,17 @@ CommonMctpSubmitMessage (
FreePool (ResponseBuffer);
return EFI_DEVICE_ERROR;
}
+ if ((MctpTransportResponseHeader->Bits.StartOfMessage != 1) ||
+ (MctpTransportResponseHeader->Bits.EndOfMessage != 1) ||
+ (MctpTransportResponseHeader->Bits.PacketSequence != 0)) {
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a: Error! Multiple-packet MCTP responses are not supported by the current driver\n",
+ __func__
+ ));
+ FreePool (ResponseBuffer);
+ return EFI_UNSUPPORTED;
+ }
MctpMessageResponseHeader = (MCTP_MESSAGE_HEADER *)(MctpTransportResponseHeader + 1);
if (MctpMessageResponseHeader->Bits.MessageType != MctpType) {
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109860): https://edk2.groups.io/g/devel/message/109860
Mute This Topic: https://groups.io/mt/102080239/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list