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 <[EMAIL PROTECTED]>, 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 <[EMAIL PROTECTED]> > >To Unsubscribe: send mail to [EMAIL PROTECTED] >with "unsubscribe freebsd-current" in the body of the message > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | 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 [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message