summaryrefslogtreecommitdiff
path: root/drivers/scsi/stex.c
diff options
context:
space:
mode:
authorEd Lin <ed.lin@promise.com>2006-12-05 04:49:24 +0300
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-12-05 20:31:26 +0300
commitb4b8bed12345bc03dfcef80cbbe78582429b063c (patch)
tree12e1ff2cb22088a508fb9bdcb8926f75a519ef29 /drivers/scsi/stex.c
parent00769ec40074b753c9b218c2ccaba2bfbfffe056 (diff)
downloadlinux-b4b8bed12345bc03dfcef80cbbe78582429b063c.tar.xz
[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>
Diffstat (limited to 'drivers/scsi/stex.c')
-rw-r--r--drivers/scsi/stex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 185c270bb043..91d484c0dd93 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -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;
}