Date: Tue, 17 Dec 2002 14:40:36 +0100 From: phk@FreeBSD.ORG To: Takahashi Yoshihiro <nyan@jp.FreeBSD.org> Cc: sos@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: ata driver Message-ID: <19314.1040132436@critter.freebsd.dk> In-Reply-To: Your message of "Tue, 17 Dec 2002 21:46:22 %2B0900." <20021217.214622.74695206.nyan@jp.FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I really wish somebody could tell us conclusively when to use
the compat geometry and when not ?
Is it only for ATA/IDE disks ?
Does it depend on the size of the disks ?
Does it also affect SCSI disks ?
Poul-Henning
In message <20021217.214622.74695206.nyan@jp.FreeBSD.org>, Takahashi Yoshihiro
writes:
>The current ata driver on pc98 has a problem. I think that the
>following patch solves the problem. Please review it. This change
>must be in RELENG_5_0 branch.
>
>
>Index: sys/dev/ata/ata-disk.c
>===================================================================
>RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v
>retrieving revision 1.137
>diff -u -r1.137 ata-disk.c
>--- sys/dev/ata/ata-disk.c 3 Dec 2002 20:19:37 -0000 1.137
>+++ sys/dev/ata/ata-disk.c 8 Dec 2002 08:50:01 -0000
>@@ -123,6 +123,14 @@
> adp->heads = atadev->param->heads;
> adp->sectors = atadev->param->sectors;
> adp->total_secs = atadev->param->cylinders * adp->heads * adp->sectors;
>+#ifdef PC98
>+ if (adp->total_secs < 17 * 8 * 65536) {
>+ /* convert PC98 geometry */
>+ adp->sectors = 17;
>+ adp->heads = 8;
>+ atadev->param->cylinders = adp->total_secs / (17 * 8);
>+ }
>+#endif
> adp->max_iosize = 256 * DEV_BSIZE;
> bioq_init(&adp->queue);
>
>Index: sys/geom/geom_pc98.c
>===================================================================
>RCS file: /home/ncvs/src/sys/geom/geom_pc98.c,v
>retrieving revision 1.20
>diff -u -r1.20 geom_pc98.c
>--- sys/geom/geom_pc98.c 3 Dec 2002 20:18:35 -0000 1.20
>+++ sys/geom/geom_pc98.c 8 Dec 2002 04:47:43 -0000
>@@ -190,10 +190,6 @@
> sectorsize = cp->provider->sectorsize;
> if (sectorsize < 512)
> break;
>- if (cp->provider->mediasize / sectorsize < 17 * 8 * 65536) {
>- fwsectors = 17;
>- fwheads = 8;
>- }
> gsp->frontstuff = sectorsize * fwsectors;
> spercyl = (off_t)fwsectors * fwheads * sectorsize;
> buf = g_read_data(cp, 0,
>
>
>---
>TAKAHASHI Yoshihiro <nyan@FreeBSD.org>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-current" in the body of the message
>
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19314.1040132436>
