Messages in this thread | | | Date | Thu, 17 Jul 2003 14:19:03 +0200 | From | David Zaffiro <> | Subject | Re: [PATCH] pdcraid and weird IDE geometry |
| |
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"!!!)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |