--- a/kernel/eka/drivers/medmmc/medmmc.cpp Thu Jul 15 20:11:42 2010 +0300
+++ b/kernel/eka/drivers/medmmc/medmmc.cpp Thu Aug 19 11:14:22 2010 +0300
@@ -797,17 +797,8 @@
}
else
{
-#if defined(__DEMAND_PAGING__) && !defined(__WINS__)
- if (DMediaPagingDevice::PageInRequest(*iCurrentReq))
- {
- r = iCurrentReq->WriteToPageHandler(NULL, 0, 0);
- }
- else
-#endif // __DEMAND_PAGING__
- {
- TPtrC8 zeroDes(NULL, 0);
- r = iCurrentReq->WriteRemote(&zeroDes,0);
- }
+ TPtrC8 zeroDes(NULL, 0);
+ r = iCurrentReq->WriteRemote(&zeroDes,0);
}
// error occurred or read all from cache so complete immediately
@@ -2898,7 +2889,7 @@
__KTRACE_OPT(KPBUSDRV, Kern::Printf(">mmd:rdc:%x,%x", iReqCur, iReqEnd));
OstTraceExt3( TRACE_INTERNALS, DMMCMEDIADRIVERFLASH_READDATAUNTILCACHEEXHAUSTED, "iReqCur=%x:%x; iReqEnd=0x%x", (TUint) I64HIGH(iReqCur), (TUint) I64LOW(iReqCur), (TUint) iReqEnd );
- if ( iCurrentReq->IsPhysicalAddress()
+ if ( (iCurrentReq->DriverFlags() & RLocalDrive::ELocDrvDirectIO) || iCurrentReq->IsPhysicalAddress()
#if defined(__DEMAND_PAGING__) && !defined(__WINS__)
|| DMediaPagingDevice::PageInRequest(*iCurrentReq)
#endif //DEMAND_PAGING
@@ -2959,12 +2950,7 @@
TUint usrOfst = I64LOW(iReqCur - iReqStart);
OstTrace0( TRACE_INTERNALS, DMMCMEDIADRIVERFLASH_WRITEDATATOUSER_LATENCY1, "Begin writing user data" );
-#if defined(__DEMAND_PAGING__) && !defined(__WINS__)
- if (DMediaPagingDevice::PageInRequest(*iCurrentReq))
- r=iCurrentReq->WriteToPageHandler((TUint8 *)(&extrView[0]), len, usrOfst);
- else
-#endif // __DEMAND_PAGING__
- r = iCurrentReq->WriteRemote(&extrView,usrOfst);
+ r = iCurrentReq->WriteRemote(&extrView,usrOfst);
OstTrace0( TRACE_INTERNALS, DMMCMEDIADRIVERFLASH_WRITEDATATOUSER_LATENCY2, "End writing user data" );
@@ -2975,19 +2961,10 @@
TInt DMmcMediaDriverFlash::ReadDataFromUser(TDes8& aDes, TInt aOffset)
{
OstTraceExt2(TRACE_FLOW, DMMCMEDIADRIVERFLASH_READDATAFROMUSER_ENTRY ,"DMmcMediaDriverFlash::ReadDataFromUser;aOffset=%d;this=%x", aOffset, (TUint) this);
- TInt r = KErrNotSupported;
-#ifndef __WINS__
- if (DMediaPagingDevice::PageOutRequest(*iCurrentReq))
- {
- r = iCurrentReq->ReadFromPageHandler((TAny*) aDes.Ptr(), aDes.MaxLength(), aOffset);
- OstTraceFunctionExitExt( DMMCMEDIADRIVERFLASH_READDATAFROMUSER_EXIT1, this, r );
- return r;
- }
- else
-#endif // #ifndef __WINS__
- r = iCurrentReq->ReadRemote(&aDes, aOffset);
-
- OstTraceFunctionExitExt( DMMCMEDIADRIVERFLASH_READDATAFROMUSER_EXIT2, this, r );
+
+ TInt r = iCurrentReq->ReadRemote(&aDes, aOffset);
+
+ OstTraceFunctionExitExt( DMMCMEDIADRIVERFLASH_READDATAFROMUSER_EXIT1, this, r );
return r;
}
@@ -3700,6 +3677,7 @@
c.iSize = drive.iPartitionLen;
c.iPartitionType = drive.iPartitionType;
c.iHiddenSectors = (TUint) (drive.iPartitionBaseAddr >> KDiskSectorShift);
+ SetTotalSizeInBytes(c);
OstTraceFunctionExitExt( DMMCMEDIADRIVERFLASH_REQUEST_EXIT1, this, r );
return r;
}