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 <aladyshe...@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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to