提交 b4b8bed1 编写于 作者: E Ed Lin 提交者: James Bottomley

[SCSI] stex: fix biosparam calculation

Fix biosparam calculation.
Signed-off-by: NEd Lin <ed.lin@promise.com>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 00769ec4
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册