1 --- a/src/drv_mei_cpe_common.c
2 +++ b/src/drv_mei_cpe_common.c
3 @@ -104,6 +104,8 @@ IFX_uint32_t MEI_FsmStateSetMsgPreAction
4 MEI_DEVCFG_DATA_T MEI_DevCfgData;
7 +static DEFINE_SPINLOCK(MEI_InterruptLock);
9 /* ============================================================================
10 Proc-FS and debug variable definitions
11 ========================================================================= */
12 @@ -2134,6 +2136,9 @@ IFX_int32_t MEI_ProcessIntPerIrq(MEIX_CN
13 #if (MEI_SUPPORT_DEBUG_STREAMS == 1)
14 IFX_int_t extraDbgStreamLoop = 0;
16 + unsigned long flags;
18 + spin_lock_irqsave(&MEI_InterruptLock, flags);
20 /* get the actual chip device from the list and step through the VRX devices */
22 @@ -2167,6 +2172,8 @@ IFX_int32_t MEI_ProcessIntPerIrq(MEIX_CN
26 + spin_unlock_irqrestore(&MEI_InterruptLock, flags);
31 @@ -2639,9 +2646,14 @@ IFX_int32_t MEI_MsgSendPreAction(
33 IFX_void_t MEI_DisableDeviceInt(MEI_DEV_T *pMeiDev)
35 + unsigned long flags;
36 + spin_lock_irqsave(&MEI_InterruptLock, flags);
38 MEI_MaskInterrupts( &pMeiDev->meiDrvCntrl,
39 ME_ARC2ME_INTERRUPT_MASK_ALL);
41 + spin_unlock_irqrestore(&MEI_InterruptLock, flags);