[PATCH] cciss: set default raid level when reading geometry fails
authorMike Miller <mike.miller@hp.com>
Mon, 18 Dec 2006 09:59:39 +0000 (10:59 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 18 Dec 2006 09:59:39 +0000 (10:59 +0100)
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@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/cciss.c

index d719a5d8f4355e45905410f4a1c0b506702d5bb4..67a6d4a9343a660d038cfd4c0bf297a5cac82cf8 100644 (file)
@@ -1907,6 +1907,7 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
                               "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];