Browse Source

[SCSI] stex: fix biosparam calculation

Fix biosparam calculation.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Ed Lin 18 years ago
parent
commit
b4b8bed123
1 changed files with 3 additions and 3 deletions
  1. 3 3
      drivers/scsi/stex.c

+ 3 - 3
drivers/scsi/stex.c

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