diff --git a/VERSION b/VERSION
index 3c59b40..89bdc09 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.3.20
+1.3.21
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index dcc7fa6..929d81d 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -2377,6 +2377,15 @@
 	}
 }
 
+func (dh *deviceHandler) processUniEnableStateFailedEvent(ctx context.Context, devEvent OnuDeviceEvent) {
+	logger.Debugw(ctx, "DeviceStateUpdate upon re-enable failure. ", log.Fields{
+		"OperStatus": voltha.OperStatus_FAILED, "device-id": dh.deviceID})
+	if err := dh.coreProxy.DeviceStateUpdate(log.WithSpanFromContext(context.TODO(), ctx), dh.deviceID, voltha.ConnectStatus_REACHABLE,
+		voltha.OperStatus_FAILED); err != nil {
+		logger.Errorw(ctx, "error-updating-device-state", log.Fields{"device-id": dh.deviceID, "error": err})
+	}
+}
+
 func (dh *deviceHandler) processOmciAniConfigDoneEvent(ctx context.Context, devEvent OnuDeviceEvent) {
 	if devEvent == OmciAniConfigDone {
 		logger.Debugw(ctx, "OmciAniConfigDone event received", log.Fields{"device-id": dh.deviceID})
@@ -2457,6 +2466,10 @@
 		{
 			dh.processUniEnableStateDoneEvent(ctx, devEvent)
 		}
+	case UniEnableStateFailed:
+		{
+			dh.processUniEnableStateFailedEvent(ctx, devEvent)
+		}
 	case UniDisableStateDone:
 		{
 			dh.processUniDisableStateDoneEvent(ctx, devEvent)
diff --git a/internal/pkg/onuadaptercore/onu_device_entry.go b/internal/pkg/onuadaptercore/onu_device_entry.go
index 64929d5..e7fc201 100644
--- a/internal/pkg/onuadaptercore/onu_device_entry.go
+++ b/internal/pkg/onuadaptercore/onu_device_entry.go
@@ -139,6 +139,8 @@
 	UniDisableStateDone
 	// UniEnableStateDone - Uni ports admin set to unlock based on device re-enable
 	UniEnableStateDone
+	// UniEnableStateFailed - Uni ports admin set to unlock failure based on device re-enable
+	UniEnableStateFailed
 	// PortLinkUp - Port link state change
 	PortLinkUp
 	// PortLinkDw - Port link state change
diff --git a/internal/pkg/onuadaptercore/uniportadmin.go b/internal/pkg/onuadaptercore/uniportadmin.go
index 0c22500..4b829d5 100644
--- a/internal/pkg/onuadaptercore/uniportadmin.go
+++ b/internal/pkg/onuadaptercore/uniportadmin.go
@@ -214,6 +214,10 @@
 	meInstance, err := oFsm.pOmciCC.sendSetOnuGLS(log.WithSpanFromContext(context.TODO(), ctx), oFsm.pDeviceHandler.pOpenOnuAc.omciTimeout, true,
 		requestedAttributes, oFsm.pAdaptFsm.commChan)
 	if err != nil {
+		//Indicate the failure in UnLock case
+		if omciAdminState == 0 {
+			oFsm.setSuccessEvent(UniEnableStateFailed)
+		}
 		oFsm.mutexPLastTxMeInstance.Unlock()
 		logger.Errorw(ctx, "OnuGLS set failed, aborting LockStateFSM", log.Fields{"device-id": oFsm.deviceID})
 		pLockStateAFsm := oFsm.pAdaptFsm
@@ -230,6 +234,10 @@
 	//  - this avoids misinterpretation of new received OMCI messages
 	oFsm.pLastTxMeInstance = meInstance
 	if oFsm.pLastTxMeInstance == nil {
+		//Indicate the failure in UnLock case
+		if omciAdminState == 0 {
+			oFsm.setSuccessEvent(UniEnableStateFailed)
+		}
 		oFsm.mutexPLastTxMeInstance.Unlock()
 		logger.Errorw(ctx, "could not send OMCI message from LockStateFsm", log.Fields{
 			"device-id": oFsm.deviceID})
@@ -276,6 +284,12 @@
 
 func (oFsm *lockStateFsm) enterResettingState(ctx context.Context, e *fsm.Event) {
 	logger.Debugw(ctx, "LockStateFSM resetting", log.Fields{"device-id": oFsm.deviceID})
+	//If the fsm is reseted because of a failure during reenable, then issue the fail event.
+	if oFsm.requestEvent == UniEnableStateFailed {
+		logger.Debugw(ctx, "LockStateFSM send notification to core", log.Fields{"state": e.FSM.Current(), "device-id": oFsm.deviceID})
+		//use DeviceHandler event notification directly, no need/support to update DeviceEntryState for lock/unlock
+		oFsm.pDeviceHandler.deviceProcStatusUpdate(ctx, oFsm.requestEvent)
+	}
 	pLockStateAFsm := oFsm.pAdaptFsm
 	if pLockStateAFsm != nil {
 		// abort running message processing
@@ -430,6 +444,10 @@
 					oFsm.mutexPLastTxMeInstance.Unlock()
 					logger.Errorw(ctx, "SetPptpEthUniLS set failed, aborting LockStateFsm!",
 						log.Fields{"device-id": oFsm.deviceID})
+					//Indicate the failure in UnLock case
+					if omciAdminState == 0 {
+						oFsm.setSuccessEvent(UniEnableStateFailed)
+					}
 					_ = oFsm.pAdaptFsm.pFsm.Event(uniEvReset)
 					return
 				}
@@ -446,6 +464,10 @@
 					oFsm.mutexPLastTxMeInstance.Unlock()
 					logger.Errorw(ctx, "SetVeipLS set failed, aborting LockStateFsm!",
 						log.Fields{"device-id": oFsm.deviceID})
+					//Indicate the failure in UnLock case
+					if omciAdminState == 0 {
+						oFsm.setSuccessEvent(UniEnableStateFailed)
+					}
 					_ = oFsm.pAdaptFsm.pFsm.Event(uniEvReset)
 					return
 				}
@@ -461,6 +483,10 @@
 				oFsm.mutexPLastTxMeInstance.RUnlock()
 				logger.Errorw(ctx, "could not send PortAdmin OMCI message from LockStateFsm", log.Fields{
 					"device-id": oFsm.deviceID, "Port": uniNo})
+				//Indicate the failure in UnLock case
+				if omciAdminState == 0 {
+					oFsm.setSuccessEvent(UniEnableStateFailed)
+				}
 				//some more sophisticated approach is possible, e.g. repeating once, by now let's reset the state machine in order to release all resources now
 				_ = oFsm.pAdaptFsm.pFsm.Event(uniEvReset)
 				return
@@ -472,6 +498,10 @@
 			if err != nil {
 				logger.Errorw(ctx, "UniTP Admin State set failed, aborting LockState set!",
 					log.Fields{"device-id": oFsm.deviceID, "Port": uniNo})
+				//Indicate the failure in UnLock case
+				if omciAdminState == 0 {
+					oFsm.setSuccessEvent(UniEnableStateFailed)
+				}
 				_ = oFsm.pAdaptFsm.pFsm.Event(uniEvReset)
 				return
 			}
