lkml.org 
[lkml]   [2005]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch ide-dev 6/9] check capacity in ide_task_init_flush()

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.041 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site