PipClearDevNodeProblem

VOID __stdcall PipClearDevNodeProblem(_DEVICE_NODE *DeviceNode){
  int Problem; 
  int ProblemStatus; 
  INT64 v4; 
  wchar_t *Buffer; 
  INT64 v6; 
  HPNPOPCTX *hPnpOpCtx; 

  hPnpOpCtx = 0i64;
  Problem = DeviceNode->Problem;
  ProblemStatus = DeviceNode->ProblemStatus;
  if( (DeviceNode->Flags & 0x2000) != 0 || Problem )
  {
    PiPnpRtlBeginOperation(&hPnpOpCtx);
    PipClearDevNodeFlags(DeviceNode, 0x2000ui64);
    Buffer = DeviceNode->InstancePath.Buffer;
    DeviceNode->Problem = 0;
    DeviceNode->ProblemStatus = 0;
    if( Buffer )
    {
      PnpRaiseNtPlugPlayDevicePropertyChangeEvent(v4, Buffer, 12);
      if( DeviceNode->ProblemStatus != ProblemStatus )
        PnpRaiseNtPlugPlayDevicePropertyChangeEvent(v6, DeviceNode->InstancePath.Buffer, 13);
      PnpTraceClearDevNodeProblem(&DeviceNode->InstancePath.Length, (__int64)&DeviceNode->ServiceName, Problem);
      if( Problem == 22 && SeAuditingWithTokenForSubcategory(137i64, 0i64) )
        PiAuditDeviceEnableDisableAction(&DeviceNode->InstancePath, 0x16ui64, DeviceNode->Problem);
    }
    if( hPnpOpCtx )
      PiPnpRtlEndOperation(hPnpOpCtx);
  }
}

Referenced by:

IoReportDetectedDevice
IopInitializeDeviceInstanceKey
PiDevCfgProcessDevice
PiProcessClearDeviceProblem
PiProcessNewDeviceNode
PiProcessQueryRemoveNoFdo
PiProcessResourceRequirementsChanged
PiProfileUpdateDeviceTreeCallback
PiRestartRemovalRelations
PipAttemptDependentStart
PipCallDriverAddDevice
PnpDisableDevice
PnpProcessAssignResourcesWorker
PnpProcessQueryRemoveAndEject
PnpRemoveLockedDeviceNode