Hi Christoph, So I realized that I mixed up the queue write_cache and the sd cache_type sysfs files. cache_type is working fine. But then I noticed that in commit 43c9835b144c7ce29efe142d662529662a9eb376, you define QUEUE_FLAG_HW_WC as 18, which is also the value of QUEUE_FLAG_FUA. Was it intentional? If so, what's the reason behind it? Regards, Tom On Sun, 12 Nov 2023 at 17:42, Tom Yan <tom.ty89@xxxxxxxxx> wrote: > > Hi, > > So I notice that the write_cache sysfs file seems to be broken for WCE > (SBC) setting. > > First of all, "write back" gets rejected as "Invalid argument". > > On the other hand, while "write through" can be written to the file, > it does not seem to actually change the WCE bit (as per sdparm > reports). There's no new cache setting reporting kernel log either. > However, reading the file after the write does give "write through". > > Nevertheless, the file does change accordingly when I set WCE to 0 or > 1 with sdparm. > > I am reproducing this on 6.6.1. It seems that it at least affects the > 6.1.x LTS branch as well though. (I can't tell for sure since for the > latter I am using the raspberrypi tree.) > > Regards, > Tom