From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.lst.de (verein.lst.de [213.95.11.210]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 8DF77DDFD8 for ; Wed, 30 May 2007 20:21:46 +1000 (EST) Date: Wed, 30 May 2007 12:21:14 +0200 From: Christoph Hellwig To: Stephen Rothwell Subject: Re: [PATCH] [POWERPC] Fix viodasd geometry calculations. Message-ID: <20070530102114.GA25568@lst.de> References: <20070529160654.8e12e507.sfr@canb.auug.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20070529160654.8e12e507.sfr@canb.auug.org.au> Cc: ppc-dev , paulus@samba.org, Christoph Hellwig List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, May 29, 2007 at 04:06:54PM +1000, Stephen Rothwell wrote: > 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. Looking at the patch I can confirm that it introduced this abitrary changes and your patch reverts it to the original. ACK. > > Thanks to Rusty Russell for noticing this. > > Signed-off-by: Stephen Rothwell > --- > drivers/block/viodasd.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > Paul, this is not too urgent as in most (all) cases the fallbacks will > not be taken. > > -- > Cheers, > Stephen Rothwell sfr@canb.auug.org.au > > 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; > } > -- > 1.5.1.4 ---end quoted text---