diff -r c1f20ce4abcf -r 3e88ff8f41d5 kernel/eka/drivers/iic/iic_channel.cpp --- a/kernel/eka/drivers/iic/iic_channel.cpp Tue Aug 31 16:34:26 2010 +0300 +++ b/kernel/eka/drivers/iic/iic_channel.cpp Wed Sep 01 12:34:56 2010 +0100 @@ -129,9 +129,6 @@ void DIicBusChannelMaster::CompleteRequest(TInt aResult) { - // Ensure the timeout timer has been cancelled - CancelTimeOut(); - TIicBusTransaction* nextTrans=NextTrans(iCurrentTransaction); if((aResult != KErrNone)||(nextTrans == NULL)) @@ -359,13 +356,7 @@ void DIicBusChannelMaster::CancelTimeOut() { - // Silently cancel the timer and associated DFC - // - // NTimer::Cancel returns ETrue if cancelled, EFalse otherwise - which may mean it wasn't active - // TDfc::Cancel returns ETrue if actually de-queued, EFalse otherwise - which may mean it wasn't queued - // iTimeoutTimer.Cancel(); - iSlaveTimeoutDfc->Cancel(); } void DIicBusChannelMaster::Complete(TInt aResult, TIicBusTransaction* aTransaction) //Completes a kernel message and receive the next one @@ -490,7 +481,7 @@ r=SetNotificationTrigger(0); // Attempt to clear notification requests if((r!=KErrNone)&&(r!=KErrTimedOut)) // KErrTimedOut refers to an earlier transaction, and is for information only return r; - StopTimer(); + iTimeoutTimer.Cancel(); r=DoRequest(EPowerDown); if(r == KErrNone) { @@ -897,13 +888,7 @@ void DIicBusChannelSlave::StopTimer() { - // Silently cancel the timer and associated DFC - // - // NTimer::Cancel returns ETrue if cancelled, EFalse otherwise - which may mean it wasn't active - // TDfc::Cancel returns ETrue if actually de-queued, EFalse otherwise - which may mean it wasn't queued - // iTimeoutTimer.Cancel(); - iClientTimeoutDfc->Cancel(); } TInt DIicBusChannelSlave::UpdateReqTrig(TInt8& aCbTrigVal, TInt& aCallbackRet) @@ -916,15 +901,14 @@ if(iNotif->iTrigger & EGeneralBusError) { // In the event of a bus error, always cancel the timer and call the Client callback - StopTimer(); + nextSteps |= (EStopTimer | EInvokeCb); iTimerState = EInactive; - nextSteps = EInvokeCb; aCallbackRet = KErrGeneral; } else if(iNotif->iTrigger == EAsyncCaptChan) { // For asynchronous channel capture, no timers are involved - just call the Client callback - nextSteps = EInvokeCb; + nextSteps |= EInvokeCb; aCallbackRet = KErrCompletion; } else if((iNotif->iTrigger & iReqTrig) != 0) @@ -963,8 +947,7 @@ { // All triggers required have occurred, so transition to state EWaitForClient iTimerState = EWaitForClient; - StopTimer(); - nextSteps = (EInvokeCb | EStartTimer); + nextSteps |= (EStopTimer | EInvokeCb | EStartTimer); } else { @@ -1003,7 +986,7 @@ TInt nextSteps = UpdateReqTrig(callbackTrig, callbackRet); if(nextSteps & EStopTimer) { - __ASSERT_DEBUG(NULL, Kern::Fault(KIicChannelPanic,__LINE__)); + iTimeoutTimer.Cancel(); } if(nextSteps & EInvokeCb) {