From: David Zaffiro <davzaffiro@tasking.nl>
To: linux-kernel@vger.kernel.org
Cc: waltabbyh@comcast.net
Subject: Re: [PATCH] pdcraid and weird IDE geometry
Date: Thu, 17 Jul 2003 14:19:03 +0200 [thread overview]
Message-ID: <3F169437.8000802@_netscape_._net_> (raw)
In-Reply-To: <3F160965.7060403@comcast.net>
I don't think this has any to do with the calculation, you probably just have to use:
CONFIG_PDC202XX_FORCE=y
(well, combined with...
CONFIG_BLK_DEV_PDC202XX_NEW=y
CONFIG_BLK_DEV_PDC202XX=y
CONFIG_BLK_DEV_ATARAID=y
CONFIG_BLK_DEV_ATARAID_PDC=y
...and a lot of other options...)
With 2.4.20 the FORCE option had to be set at "n", now it should be set at "y".
> The calc_pdcblock_offset function calculates lba by taking the capacity
> of the drive and dividing it by (head * sector), multiplying the result
> times (head * sector) and subtracting the sector (SPT) count.
> Unfortunately, with the strange geometry reported by the new drive,
> using INTs to store these values will fail.
Avoiding floating-point precision, this would do the same as your calculation:
lba = ideinfo->capacity - ideinfo->sect;
However, I don't think the expression "fails". the way it is expressed now, it will divide something integer-wise and then multiply it with the same value (and then minus sect), thus I assume this was intended: To round the capacity value to the next multiple of (head * start), and then do a minus sect...
I don't think any hardcore programmer ever does a integerwise divide /before/ an integerwise multiply without a very good reason... (And don't give me that "you'd be surprised"!!!)
next prev parent reply other threads:[~2003-07-17 12:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-17 2:26 Walt H
2003-07-17 8:49 ` Arjan van de Ven
2003-07-17 14:37 ` Walt H
2003-07-17 14:58 ` Alan Cox
2003-07-17 15:34 ` Jeff Garzik
2003-07-17 16:03 ` Andries Brouwer
2003-07-17 15:34 ` Andries Brouwer
2003-07-18 2:33 ` Walt H
2003-07-18 8:58 ` Andries Brouwer
2003-07-18 13:56 ` Walt H
2003-07-17 12:19 ` David Zaffiro [this message]
2003-07-18 14:51 Walt H
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F169437.8000802@_netscape_._net_ \
--to=davzaffiro@tasking.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=waltabbyh@comcast.net \
--subject='Re: [PATCH] pdcraid and weird IDE geometry' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).