--- a/kernel/eka/drivers/medmmc/medmmc.cpp Thu Aug 19 11:14:22 2010 +0300
+++ b/kernel/eka/drivers/medmmc/medmmc.cpp Tue Aug 31 16:34:26 2010 +0300
@@ -1132,8 +1132,8 @@
iPhysStart = aStart & ~iBlkMsk;
// formats are always block-aligned, and the buffer is initialized to 0xff
- // Check whether erase commands are supported by this card
- if (iCard->CSD().CCC() & KMMCCmdClassErase)
+ // Check whether erase commands are supported by this card
+ if ( (iCard->CSD().CCC() & KMMCCmdClassErase) && iEraseInfo.iEraseFlags)
{
// Determine the erase end point for the next command. We don't erase past the preferred erase unit
// size. Therefore, check which is lower, the preferred erase unit size or the end of the requested range.
@@ -2726,6 +2726,9 @@
iMedReq = aRequest;
SetCurrentConsumption(aCurrent);
+ // Reset the card pointer just in case the stack has changed it.
+ iSession->SetCard(iCard);
+
TInt r = InCritical();
if (r == KErrNone)
{