diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-05-29 02:06:54 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-10 07:40:28 -0400 |
commit | 36a700307ece3ca090d1f8f071db085087ddc627 (patch) | |
tree | c061f720ccb9e85bc5377c1e0f0838800c168e6e /drivers/block/viodasd.c | |
parent | b8ce2272becc87894d95cbdbba42ae72115131f2 (diff) |
[POWERPC] Fix viodasd geometry calculations
Commit a885c8c4316e1c1d2d2c8755da3f3d14f852528d that introduced the
getgeo block device method changed the fallback number of sectors and
introduced a bug into the fallback cylinder number calculation.
Thanks to Rusty Russell for noticing this.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/block/viodasd.c')
-rw-r--r-- | drivers/block/viodasd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 68592c336011..dae39911a11d 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
@@ -252,10 +252,10 @@ static int viodasd_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
252 | struct gendisk *disk = bdev->bd_disk; | 252 | struct gendisk *disk = bdev->bd_disk; |
253 | struct viodasd_device *d = disk->private_data; | 253 | struct viodasd_device *d = disk->private_data; |
254 | 254 | ||
255 | geo->sectors = d->sectors ? d->sectors : 0; | 255 | geo->sectors = d->sectors ? d->sectors : 32; |
256 | geo->heads = d->tracks ? d->tracks : 64; | 256 | geo->heads = d->tracks ? d->tracks : 64; |
257 | geo->cylinders = d->cylinders ? d->cylinders : | 257 | geo->cylinders = d->cylinders ? d->cylinders : |
258 | get_capacity(disk) / (geo->cylinders * geo->heads); | 258 | get_capacity(disk) / (geo->sectors * geo->heads); |
259 | 259 | ||
260 | return 0; | 260 | return 0; |
261 | } | 261 | } |