X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SourceLevelDebugPkg%2FLibrary%2FDebugCommunicationLibUsb3%2FDebugCommunicationLibUsb3Common.c;h=87fb0265489b99d2a11400365052037260469fa2;hp=c577df7dea97e09947f6b562d85e0244a66315bc;hb=373b1d0ee31ea2e2868307ea82277271b18a7be7;hpb=abea3bca8212f8c2ea34da6b9f6315d755537767 diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c index c577df7dea..87fb026548 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c @@ -906,6 +906,7 @@ DebugPortWriteBuffer ( USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle; UINTN Sent; UINTN Total; + UINTN Index; if (NumberOfBytes == 0 || Buffer == NULL) { return 0; @@ -933,6 +934,7 @@ DebugPortWriteBuffer ( // DebugPortPollBuffer (UsbDebugPortHandle); + Index = 0; while ((Total < NumberOfBytes)) { if (NumberOfBytes - Total > USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE) { Sent = USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE;