userlibandfileserver/fileserver/shostmassstorage/server/controller/cusbhostmsdevicethread.cpp
branchRCL_3
changeset 294 039a3e647356
parent 268 345b1ca54e88
equal deleted inserted replaced
268:345b1ca54e88 294:039a3e647356
   171 	Lock();    
   171 	Lock();    
   172     if (iUsbHostMsDevice)
   172     if (iUsbHostMsDevice)
   173         {
   173         {
   174         if (iUsbHostMsDevice->IsSuspended())
   174         if (iUsbHostMsDevice->IsSuspended())
   175             {
   175             {
   176 
   176             // request resume 
   177             RMessage2 msg = iRMessage2[iDequeueIndex];      
   177             Unlock();
   178             if (msg.Function() != EUsbHostMsSuspendLun)
   178             iUsbHostMsDevice->Resume(iStatus);
   179                 {
   179             SetActive();
   180                 // request resume 
   180             return;
   181                 Unlock();
       
   182                 iUsbHostMsDevice->Resume(iStatus);
       
   183                 SetActive();
       
   184                 return;
       
   185                 }            
       
   186             }
   181             }
   187         }
   182         }
   188 
   183 
   189     // process message queue
   184     // process message queue
   190     RMessage2 msg = iRMessage2[iDequeueIndex];
   185     RMessage2 msg = iRMessage2[iDequeueIndex];
   312             break;
   307             break;
   313             }
   308             }
   314 		return;
   309 		return;
   315 	case EUsbHostMsUnRegisterInterface:
   310 	case EUsbHostMsUnRegisterInterface:
   316 		// Check whether all luns have got uninitialised. 
   311 		// Check whether all luns have got uninitialised. 
   317         if (iUsbHostMsDevice)
   312 		for(TInt i = 0, j = iUsbHostMsDevice->GetMaxLun(); i <= j; i++)
   318             {
   313 			TRAP_IGNORE(iUsbHostMsDevice->RemoveLunL(i));
   319             for(TInt i = 0, j = iUsbHostMsDevice->GetMaxLun(); i <= j; i++)
       
   320                 TRAP_IGNORE(iUsbHostMsDevice->RemoveLunL(i));
       
   321             }
       
   322 		TRAP(ret, UnRegisterInterfaceL(aMessage));
   314 		TRAP(ret, UnRegisterInterfaceL(aMessage));
   323 		break;
   315 		break;
   324 	case EUsbHostMsRegisterLun:
   316 	case EUsbHostMsRegisterLun:
   325 		TRAP(ret, RegisterLogicalUnitL(aMessage));
   317 		TRAP(ret, RegisterLogicalUnitL(aMessage));
   326 		break;
   318 		break;