The cache_type file in sysfs lets users configure the disk cache in
write-through or write-back modes. However, ata disks do not support
writing to the file because they do not implement the MODE SELECT
command.
This patch adds a translation from MODE SELECT (for the caching page
only) to the ATA SET FEATURES command. The set of changeable parameters
answered by MODE SENSE is also adjusted accordingly.
Cc: Sergei Shtylyov <sshtylyov@xxxxxxxxxx>
Cc: Jeff Garzik <jgarzik@xxxxxxxxx>
Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
v2->v3: ensure that only the first page of the sg list is
accessed
drivers/ata/libata-scsi.c | 194 +++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 188 insertions(+), 6 deletions(-)