[PATCH 1/3] ide: check only for CACHE FLUSH command support in ide_id_has_flush_cache()

From: Bartlomiej Zolnierkiewicz
Date: Wed Jul 30 2008 - 18:23:40 EST


All devices supporting CACHE FLUSH EXT command should also support
CACHE FLUSH command so it is sufficient to check only for CACHE FLUSH
in ide_id_has_flush_cache().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
---
include/linux/ide.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1451,8 +1451,8 @@ extern struct mutex ide_cfg_mtx;
extern struct bus_type ide_bus_type;
extern struct class *ide_port_class;

-/* check if CACHE FLUSH (EXT) command is supported (bits defined in ATA-6) */
-#define ide_id_has_flush_cache(id) ((id)[ATA_ID_CFS_ENABLE_2] & 0x3000)
+/* check if CACHE FLUSH command is supported (as defined in ATA-6) */
+#define ide_id_has_flush_cache(id) ((id)[ATA_ID_CFS_ENABLE_2] & 0x1000)

/* some Maxtor disks have bit 13 defined incorrectly so check bit 10 too */
#define ide_id_has_flush_cache_ext(id) \
--
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/