18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci======================================
48c2ecf20Sopenharmony_ciLinux SCSI Disk Driver (sd) Parameters
58c2ecf20Sopenharmony_ci======================================
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cicache_type (RW)
88c2ecf20Sopenharmony_ci---------------
98c2ecf20Sopenharmony_ciEnable/disable drive write & read cache.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci===========================   === ===   ===========   ==========
128c2ecf20Sopenharmony_ci cache_type string            WCE RCD   Write cache   Read cache
138c2ecf20Sopenharmony_ci===========================   === ===   ===========   ==========
148c2ecf20Sopenharmony_ci write through                0   0     off           on
158c2ecf20Sopenharmony_ci none                         0   1     off           off
168c2ecf20Sopenharmony_ci write back                   1   0     on            on
178c2ecf20Sopenharmony_ci write back, no read (daft)   1   1     on            off
188c2ecf20Sopenharmony_ci===========================   === ===   ===========   ==========
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciTo set cache type to "write back" and save this setting to the drive::
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci  # echo "write back" > cache_type
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciTo modify the caching mode without making the change persistent, prepend
258c2ecf20Sopenharmony_ci"temporary " to the cache type string. E.g.::
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci  # echo "temporary write back" > cache_type
28