[RFC/PATCH 2/7] enable honoring write cache setting of IDE drive

DORMANTno replies

From: Doug Maxey <hidden>
Date: 2005-01-28 18:16:22

    - add hook in ide-taskfile:ide_cmd_ioctl() to call the new
      function ide_write_cache().

 drivers/ide/ide-taskfile.c |   10 ++++++++++
 1 files changed, 10 insertions(+)

diff -X /home/dwm/lib/ide-excludes -Nwupar lk-2.6.11-rc2-bk5.a/drivers/ide/ide-taskfile.c lk-2.6.11-rc2-bk5.b/drivers/ide/ide-taskfile.c
--- lk-2.6.11-rc2-bk5.a/drivers/ide/ide-taskfile.c	2005-01-26 13:19:34.000000000 -0600
+++ lk-2.6.11-rc2-bk5.b/drivers/ide/ide-taskfile.c	2005-01-28 11:19:55.907361320 -0600
@@ -698,6 +698,16 @@ int ide_cmd_ioctl (ide_drive_t *drive, u
 	if (copy_from_user(args, (void __user *)arg, 4))
 		return -EFAULT;
 
+	if ((args[0] == WIN_SETFEATURES) &&
+	    ((args[2] == SETFEATURES_EN_WCACHE) ||
+	     (args[2] == SETFEATURES_DIS_WCACHE))) {
+		/*
+		 * Call the handler to support settings in the block layer.
+		 */
+		err = ide_write_cache (drive, (args[2] == SETFEATURES_EN_WCACHE));
+		return err;
+	}
+
 	memset(&tfargs, 0, sizeof(ide_task_t));
 	tfargs.tfRegister[IDE_FEATURE_OFFSET] = args[2];
 	tfargs.tfRegister[IDE_NSECTOR_OFFSET] = args[3];

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help