VirtualBox

Ignore:
Timestamp:
Mar 31, 2025 11:31:09 AM (2 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168237
Message:

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c

    r101291 r108794  
    44
    55Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
     6Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
    67SPDX-License-Identifier: BSD-2-Clause-Patent
    78
     
    822823  EFI_STATUS     Status;
    823824  UINT8          DevAddress;
     825  UINT8          Config;
    824826
    825827  OldTpl = gBS->RaiseTPL (USB_BUS_TPL);
     
    883885  //
    884886  if (Dev->ActiveConfig != NULL) {
    885     Status = UsbSetConfig (Dev, Dev->ActiveConfig->Desc.ConfigurationValue);
    886 
     887    UsbFreeDevDesc (Dev->DevDesc);
     888
     889    Status = UsbRemoveConfig (Dev);
     890    if (EFI_ERROR (Status)) {
     891      DEBUG ((DEBUG_ERROR, "UsbIoPortReset: Failed to remove configuration - %r\n", Status));
     892    }
     893
     894    Status = UsbGetMaxPacketSize0 (Dev);
     895    if (EFI_ERROR (Status)) {
     896      DEBUG ((DEBUG_ERROR, "UsbIoPortReset: Failed to get max packet size - %r\n", Status));
     897    }
     898
     899    Status = UsbBuildDescTable (Dev);
     900    if (EFI_ERROR (Status)) {
     901      DEBUG ((DEBUG_ERROR, "UsbIoPortReset: Failed to build descriptor table - %r\n", Status));
     902    }
     903
     904    Config = Dev->DevDesc->Configs[0]->Desc.ConfigurationValue;
     905
     906    Status = UsbSetConfig (Dev, Config);
    887907    if (EFI_ERROR (Status)) {
    888908      DEBUG ((
     
    892912        Status
    893913        ));
     914    }
     915
     916    Status = UsbSelectConfig (Dev, Config);
     917    if (EFI_ERROR (Status)) {
     918      DEBUG ((DEBUG_ERROR, "UsbIoPortReset: Failed to set configuration - %r\n", Status));
    894919    }
    895920  }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette