[PATCH 1/2] cciss: set default raid level when reading geometry fails

From: Mike Miller (OS Dev)
Date: Fri Dec 15 2006 - 16:05:29 EST


PATCH 1 of 2

This patch sets a default raid level on a volume that either does not support
reading the geometry or reports an invalid geometry for whatever reason. We
were always setting some values for heads and sectors but never set a raid
level. This caused lots of problems on some buggy firmware. Please consider
this for inclusion.

Thanks,
mikem

Signed-off-by: Mike Miller <mike.miller@xxxxxx>
--------------------------------------------------------------------------------

drivers/block/cciss.c | 1 +
1 files changed, 1 insertion(+)

diff -puN drivers/block/cciss.c~cciss_set_default_raidlevel drivers/block/cciss.c
--- linux-2.6-work/drivers/block/cciss.c~cciss_set_default_raidlevel 2006-12-13 11:04:39.000000000 -0600
+++ linux-2.6-work-mikem/drivers/block/cciss.c 2006-12-13 11:05:06.000000000 -0600
@@ -1907,6 +1907,7 @@ static void cciss_geometry_inquiry(int c
"does not support reading geometry\n");
drv->heads = 255;
drv->sectors = 32; // Sectors per track
+ drv->raid_level = RAID_UNKNOWN;
} else {
drv->heads = inq_buff->data_byte[6];
drv->sectors = inq_buff->data_byte[7];
_
-
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/