tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MNT Reform2 USB LCP flash
kre%munnari.OZ.AU@localhost (Robert Elz) writes:
>If you are able, try building a kernel with the patch below.
>I suspect this should probably apply without too many problems
>to any reasonably modern NetBSD kernel version, patch is to
>src/sys/dev/scsipi/sd.c
>+ if (dp->cyls == 0) /* very small devices */
>+ dp->cyls = 1; /* round up # cyls */
People using the cylinder count assume that a disk is made of cylinders,
heads (surfaces) and sectors and that cyls * heads * sectors is the capacity.
For modern disks that's not true.
The values are intentionally truncated so that such people cannot access
blocks beyond the end of the device and software that (still) uses C/H/S
coordinates has a chance to use modern devices.
An alternative handling would be round up the values so that you can reach
all blocks using C/H/S coordinates and non-existent blocks return errors.
But what purpose would such fictious C/H/S coordinates serve and would
software relying on C/H/S be able to handle the errors ?
Rounding up only for disks with less than one full cylinder only helps
people that suffer from oudenophobia.
Home |
Main Index |
Thread Index |
Old Index