Skip to content

Commit

Permalink
Revert reconnect fix.
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Pontsler <[email protected]>
  • Loading branch information
StevenPontsler authored and gldiviney committed Jan 19, 2019
1 parent 9dd2e34 commit b7a59da
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions DcpmPkg/driver/NvmDimmDriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,27 +208,9 @@ NvmDimmDriverUnload(
UINTN HandleCount = 0;
UINTN Index = 0;
CONST BOOLEAN DriverAlreadyUnloaded = (gNvmDimmData == NULL);
UINTN BufSize = 0;
EFI_HANDLE *Buffer = NULL;

NVDIMM_ENTRY();

ReturnCode = gBS->LocateHandleBuffer(ByProtocol, &gNfitBindingProtocolGuid, NULL, &BufSize, &Buffer);
if (ReturnCode == EFI_SUCCESS) {
ReturnCode = gBS->UninstallMultipleProtocolInterfaces(
Buffer[0],
&gEfiDevicePathProtocolGuid,
&gNvmDimmDriverDevicePath,
NULL);
if (EFI_ERROR(ReturnCode)) {
NVDIMM_WARN("Failed to install the gEfiDevicePathProtocolGuid, error = 0x%llx.", ReturnCode);
}
}

if (Buffer != NULL) {
FreePool(Buffer);
}

/** Retrieve array of all handles in the handle database **/
ReturnCode = gBS->LocateHandleBuffer(AllHandles, NULL, NULL, &HandleCount, &pHandleBuffer);
if (EFI_ERROR(ReturnCode)) {
Expand Down Expand Up @@ -617,9 +599,6 @@ NvmDimmDriverDriverEntryPoint(
DRIVER_PREFERENCES DriverPreferences;
#ifndef OS_BUILD
EFI_LOADED_IMAGE_PROTOCOL *pLoadedImage = NULL;
EFI_HANDLE *Buffer = NULL;
UINTN BufSize = 0;
UINTN Index = 0;
#endif

NVDIMM_ENTRY();
Expand Down Expand Up @@ -753,27 +732,6 @@ NvmDimmDriverDriverEntryPoint(
NvmDimmDriverUnload(ImageHandle);
}

/**
Install device path protocol so reconnect will find handle
**/
ReturnCode = gBS->LocateHandleBuffer(ByProtocol, &gNfitBindingProtocolGuid, NULL, &BufSize, &Buffer);
if (ReturnCode == EFI_SUCCESS) {
for (Index = 0; Index < BufSize; Index++) {
ReturnCode = gBS->InstallMultipleProtocolInterfaces(
&Buffer[Index],
&gEfiDevicePathProtocolGuid,
&gNvmDimmDriverDevicePath,
NULL);
if (EFI_ERROR(ReturnCode)) {
NVDIMM_WARN("Failed to install the gEfiDevicePathProtocolGuid, error = 0x%llx.", ReturnCode);
}
}
}

if (Buffer != NULL) {
FreePool(Buffer);
}

#endif
NVDIMM_DBG("Exiting DriverEntryPoint, error = " FORMAT_EFI_STATUS ".\n", ReturnCode);
NVDIMM_EXIT_I64(ReturnCode);
Expand Down

0 comments on commit b7a59da

Please sign in to comment.