Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36a700307ece3ca090d1f8f071db085087ddc627
Commit:     36a700307ece3ca090d1f8f071db085087ddc627
Parent:     b8ce2272becc87894d95cbdbba42ae72115131f2
Author:     Stephen Rothwell <[EMAIL PROTECTED]>
AuthorDate: Tue May 29 16:06:54 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 21:40:28 2007 +1000

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 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 68592c3..dae3991 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)
        struct gendisk *disk = bdev->bd_disk;
        struct viodasd_device *d = disk->private_data;
 
-       geo->sectors = d->sectors ? d->sectors : 0;
+       geo->sectors = d->sectors ? d->sectors : 32;
        geo->heads = d->tracks ? d->tracks  : 64;
        geo->cylinders = d->cylinders ? d->cylinders :
-               get_capacity(disk) / (geo->cylinders * geo->heads);
+               get_capacity(disk) / (geo->sectors * geo->heads);
 
        return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to