Skip to content

Commit

Permalink
Merged PR 5426: Install UFS Device Config Protocol before caching dev…
Browse files Browse the repository at this point in the history
…ice 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.
  • Loading branch information
zurcher authored and kenlautner committed May 9, 2023
1 parent 1dc35a0 commit f43d29c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f43d29c

Please sign in to comment.