From f43d29c4fb9e135924ec333625c91be49564101b Mon Sep 17 00:00:00 2001 From: Christopher Zurcher Date: Thu, 26 May 2022 16:21:58 +0000 Subject: [PATCH] Merged PR 5426: Install UFS Device Config Protocol before caching device config Consumers of gEfiUfsDeviceConfigProtocolGuid need a chance to modify the device configuration before UfsPassThruDxe caches the LUN enable status and offers ExtScsiPassThruProtocol to the SCSI drivers. --- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c index ae593ff03a..a7dbeff23b 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c @@ -984,6 +984,15 @@ UfsPassThruDriverBindingStart ( } } + // MU_CHANGE [BEGIN] - Install UFS Device Config Protocol before caching the device config + Status = gBS->InstallMultipleProtocolInterfaces ( + &Controller, + &gEfiUfsDeviceConfigProtocolGuid, + &(Private->UfsDevConfig), + NULL + ); + // MU_CHANGE [END] + // // Check if 8 common luns are active and set corresponding bit mask. // @@ -1040,14 +1049,14 @@ UfsPassThruDriverBindingStart ( goto Error; } + // MU_CHANGE [BEGIN] - Install UFS Device Config Protocol before caching the device config Status = gBS->InstallMultipleProtocolInterfaces ( &Controller, &gEfiExtScsiPassThruProtocolGuid, &(Private->ExtScsiPassThru), - &gEfiUfsDeviceConfigProtocolGuid, - &(Private->UfsDevConfig), NULL ); + // MU_CHANGE [END] ASSERT_EFI_ERROR (Status); return EFI_SUCCESS;