mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 18:59:44 +08:00
freebsd/mmcsd: Disable on-device cache usage
This disables any usage of the on-device R/W cache since all device cache maintenance functions are compiled out under RTEMS leaving no way to flush the cache before system reset and making data loss possible.
This commit is contained in:
parent
3a9f9c6c70
commit
f980e47f88
@ -546,6 +546,11 @@ mmcsd_attach(device_t dev)
|
|||||||
*/
|
*/
|
||||||
rev = ext_csd[EXT_CSD_REV];
|
rev = ext_csd[EXT_CSD_REV];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Cache flush functions are currently not available. Use of on-device cache can
|
||||||
|
* cause data loss.
|
||||||
|
*/
|
||||||
|
#ifndef __rtems__
|
||||||
/*
|
/*
|
||||||
* With revision 1.5 (MMC v4.5, EXT_CSD_REV == 6) and later, take
|
* With revision 1.5 (MMC v4.5, EXT_CSD_REV == 6) and later, take
|
||||||
* advantage of the device R/W cache if present and useage is not
|
* advantage of the device R/W cache if present and useage is not
|
||||||
@ -567,6 +572,7 @@ mmcsd_attach(device_t dev)
|
|||||||
sc->flags |= MMCSD_FLUSH_CACHE;
|
sc->flags |= MMCSD_FLUSH_CACHE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ignore user-creatable enhanced user data area and general purpose
|
* Ignore user-creatable enhanced user data area and general purpose
|
||||||
|
Loading…
x
Reference in New Issue
Block a user