kernel/eka/drivers/pbus/mmc/stack.cpp
changeset 134 95847726fe57
parent 129 a990138eda40
child 221 39b39e1a406e
child 244 a77889bee936
equal deleted inserted replaced
133:2a0ada0a1bf8 134:95847726fe57
  6406 	{
  6406 	{
  6407 		enum states
  6407 		enum states
  6408 			{
  6408 			{
  6409 			EStBegin=0,
  6409 			EStBegin=0,
  6410 			EStNextIndex,
  6410 			EStNextIndex,
       
  6411 			EStSendStatus,
       
  6412 			EStGetStatus,
       
  6413 			EStUnlock,
  6411 			EStInitStackAfterUnlock,
  6414 			EStInitStackAfterUnlock,
  6412 			EStIssuedLockUnlock,
  6415 			EStIssuedLockUnlock,
  6413 			EStDone,
  6416 			EStDone,
  6414 			EStEnd
  6417 			EStEnd
  6415 			};
  6418 			};
  6468 		// We've found a locked card with a password in the password store,
  6471 		// We've found a locked card with a password in the password store,
  6469 		// so attempt to unlock using the CIMLockUnlockSMST state machine.
  6472 		// so attempt to unlock using the CIMLockUnlockSMST state machine.
  6470 		//
  6473 		//
  6471 		// Upon completion, test the next card before performing further initialisation.
  6474 		// Upon completion, test the next card before performing further initialisation.
  6472 		//
  6475 		//
       
  6476 		
       
  6477 		SMF_STATE(EStSendStatus)
       
  6478 		        
       
  6479 		s.FillCommandDesc(ECmdSendStatus, 0);
       
  6480 		                        
       
  6481 		SMF_INVOKES(ExecCommandSMST,EStGetStatus)
       
  6482 		                        
       
  6483 		SMF_STATE(EStGetStatus)
       
  6484 		                        
       
  6485 		const TMMCStatus st = s.LastStatus();
       
  6486 		if((st & KMMCStatCardIsLocked) == 0)
       
  6487 			{
       
  6488 		    SMF_RETURN(err)
       
  6489 		    }
       
  6490 		                        
       
  6491 		SMF_STATE(EStUnlock)
       
  6492 		                        
       
  6493 		const TMapping *mp = NULL;
       
  6494 		mp = iSocket->iPasswordStore->FindMappingInStore(iCardArray->CardP(iAutoUnlockIndex)->CID());
  6473 
  6495 
  6474 		TMMCard &cd = *(iCardArray->CardP(iAutoUnlockIndex++));
  6496 		TMMCard &cd = *(iCardArray->CardP(iAutoUnlockIndex++));
  6475 		OstTrace1( TRACE_INTERNALS, DMMCSTACK_CIMAUTOUNLOCKSM4, "Attempting to unlock card %d", cd.Number() );
  6497 		OstTrace1( TRACE_INTERNALS, DMMCSTACK_CIMAUTOUNLOCKSM4, "Attempting to unlock card %d", cd.Number() );
  6476 		
  6498 		
  6477 		s.SetCard(&cd);
  6499 		s.SetCard(&cd);