lkml.org 
[lkml]   [2004]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectcciss update [4/8] cylinder calculation fix

Patch 4 of 8

This patch fixes our cylinder calculations. Without his fix the number
of cylinders maxes out at 65535.
Aplies against 2.6.8-rc4. Please apply patches in order.

Thanks,
mikem
-------------------------------------------------------------------------------
diff -burpN lx268-rc3-p003/drivers/block/cciss.c lx268-rc3/drivers/block/cciss.c
--- lx268-rc3-p003/drivers/block/cciss.c 2004-08-05 10:40:00.865910000 -0500
+++ lx268-rc3/drivers/block/cciss.c 2004-08-05 11:16:03.222182640 -0500
@@ -1470,6 +1470,8 @@ static void cciss_geometry_inquiry(int c
drv->sectors = 32; // Sectors per track
drv->cylinders = total_size / 255 / 32;
} else {
+ unsigned int t;
+
drv->block_size = block_size;
drv->nr_blocks = total_size;
drv->heads = inq_buff->data_byte[6];
@@ -1477,6 +1479,10 @@ static void cciss_geometry_inquiry(int c
drv->cylinders = (inq_buff->data_byte[4] & 0xff) << 8;
drv->cylinders += inq_buff->data_byte[5];
drv->raid_level = inq_buff->data_byte[8];
+ t = drv->heads * drv->sectors;
+ if (t > 1) {
+ drv->cylinders = total_size/t;
+ }
}
} else { /* Get geometry failed */
printk(KERN_WARNING "cciss: reading geometry failed, "
-
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:05    [W:0.030 / U:1.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site