- use new config variable BLK_DEV_HDWC in idedisk_setup code.
include/linux/ide.h | 5 +++++
drivers/ide/ide-disk.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff -X /home/dwm/lib/ide-excludes -Nwupar
lk-2.6.11-rc2-bk5.a/include/linux/ide.h lk-2.6.11-rc2-bk5.b/include/linux/ide.h
--- lk-2.6.11-rc2-bk5.a/include/linux/ide.h 2005-01-28 09:47:00.000000000
-0600
+++ lk-2.6.11-rc2-bk5.b/include/linux/ide.h 2005-01-28 11:31:50.671700624
-0600
@@ -1548,5 +1548,10 @@ extern struct bus_type ide_bus_type;
/* common write_cache setting. */
int ide_write_cache(ide_drive_t *, int);
+#ifdef CONFIG_BLK_DEV_HDWC
+#define BLK_DEV_HDWC 1
+#else
+#define BLK_DEV_HDWC 0
+#endif /* CONFIG_BLK_DEV_HDWC */
#endif /* _IDE_H */
diff -X /home/dwm/lib/ide-excludes -Nwupar
lk-2.6.11-rc2-bk5.a/drivers/ide/ide-disk.c
lk-2.6.11-rc2-bk5.b/drivers/ide/ide-disk.c
--- lk-2.6.11-rc2-bk5.a/drivers/ide/ide-disk.c 2005-01-26 13:19:34.000000000
-0600
+++ lk-2.6.11-rc2-bk5.b/drivers/ide/ide-disk.c 2005-01-28 11:27:46.417832856
-0600
@@ -1083,7 +1083,7 @@ static void idedisk_setup (ide_drive_t *
if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5)))
drive->wcache = 1;
- write_cache(drive, 1);
+ write_cache(drive, (BLK_DEV_HDWC ? drive->wcache : 1));
/*
* We must avoid issuing commands a drive does not understand
@@ -1093,7 +1093,7 @@ static void idedisk_setup (ide_drive_t *
* LBA48 is not available so we don't need to recheck that.
*/
barrier = 0;
- if (ide_id_has_flush_cache(id))
+ if (ide_id_has_flush_cache(id) && drive->wcache)
barrier = 1;
if (drive->addressing == 1) {
/* Can't issue the correct flush ? */
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html