[patch ide-dev 6/9] check capacity in ide_task_init_flush()
From: Bartlomiej Zolnierkiewicz
Date: Thu Feb 24 2005 - 09:56:10 EST
Use WIN_FLUSH_CACHE_EXT only if disk requires LBA48.
diff -Nru a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
--- a/drivers/ide/ide-io.c 2005-02-23 20:58:16 +01:00
+++ b/drivers/ide/ide-io.c 2005-02-23 20:58:16 +01:00
@@ -61,7 +61,8 @@
memset(task, 0, sizeof(*task));
- if (ide_id_has_flush_cache_ext(drive->id)) {
+ if (ide_id_has_flush_cache_ext(drive->id) &&
+ (drive->capacity64 >= (1UL << 28))) {
tf->command = WIN_FLUSH_CACHE_EXT;
tf->flags |= ATA_TFLAG_LBA48;
} else
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/