[SCSI] stex: fix biosparam calculation
authorEd Lin <ed.lin@promise.com>
Tue, 5 Dec 2006 01:49:24 +0000 (17:49 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Tue, 5 Dec 2006 17:31:26 +0000 (11:31 -0600)
Fix biosparam calculation.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/stex.c

index 185c270bb0433f9dae1bb9427e61092d9c905796..91d484c0dd9365f00d7f943c225449987035c197 100644 (file)
@@ -1100,18 +1100,18 @@ static int stex_reset(struct scsi_cmnd *cmd)
 static int stex_biosparam(struct scsi_device *sdev,
        struct block_device *bdev, sector_t capacity, int geom[])
 {
-       int heads = 255, sectors = 63, cylinders;
+       int heads = 255, sectors = 63;
 
        if (capacity < 0x200000) {
                heads = 64;
                sectors = 32;
        }
 
-       cylinders = sector_div(capacity, heads * sectors);
+       sector_div(capacity, heads * sectors);
 
        geom[0] = heads;
        geom[1] = sectors;
-       geom[2] = cylinders;
+       geom[2] = capacity;
 
        return 0;
 }