It seems Takahashi Yoshihiro wrote:
> In article <[EMAIL PROTECTED]>
> [EMAIL PROTECTED] writes:
> 
> > Is it only for ATA/IDE disks ?
> > Does it depend on the size of the disks ?
> 
> Only for the internal IDE controller.  The internal IDE controller on
> pc98 uses the fixed geometry which is 8 heads and 17 sectors.  If the
> size of the disk is larger than 4.2GB (65535C x 8H x 17S x 512B), a
> different geometry depend on the disk is used.

OK, could you try this patch then (and probably still rip out the
stuff in GEOM)...

Index: ata-all.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-all.h,v
retrieving revision 1.55
diff -u -r1.55 ata-all.h
--- ata-all.h   3 Dec 2002 20:19:37 -0000       1.55
+++ ata-all.h   17 Dec 2002 14:29:12 -0000
@@ -213,9 +213,10 @@
     int                                flags;          /* controller flags */
 #define                ATA_NO_SLAVE            0x01
 #define                ATA_USE_16BIT           0x02
-#define                ATA_ATAPI_DMA_RO        0x04
-#define                ATA_QUEUED              0x08
-#define                ATA_DMA_ACTIVE          0x10
+#define                ATA_USE_PC98GEOM        0x04
+#define                ATA_ATAPI_DMA_RO        0x08
+#define                ATA_QUEUED              0x10
+#define                ATA_DMA_ACTIVE          0x20
 
     struct ata_device          device[2];      /* devices on this channel */
 #define                MASTER                  0x00
Index: ata-cbus.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-cbus.c,v
retrieving revision 1.1
diff -u -r1.1 ata-cbus.c
--- ata-cbus.c  3 Dec 2002 20:19:37 -0000       1.1
+++ ata-cbus.c  17 Dec 2002 14:28:21 -0000
@@ -239,7 +239,7 @@
            ch->unit = i;
     }
     free(children, M_TEMP);
-    ch->flags |= ATA_USE_16BIT;
+    ch->flags |= ATA_USE_16BIT | ATA_USE_PC98GEOM;
     ch->intr_func = ata_cbus_intr;
     ch->lock_func = ata_cbus_banking;
     return ata_probe(dev);
Index: ata-disk.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v
retrieving revision 1.138
diff -u -r1.138 ata-disk.c
--- ata-disk.c  6 Dec 2002 19:29:53 -0000       1.138
+++ ata-disk.c  17 Dec 2002 14:34:27 -0000
@@ -124,6 +124,11 @@
     adp->sectors = atadev->param->sectors;
     adp->total_secs = atadev->param->cylinders * adp->heads * adp->sectors;    
     adp->max_iosize = 256 * DEV_BSIZE;
+    if (adp->device->channel->flags & ATA_USE_PC98GEOM &&
+       adp->total_secs < 17 * 8 * 65536) {
+       adp->sectors = 17;
+       adp->heads = 8;
+    }
     bioq_init(&adp->queue);
 
     lbasize = (u_int32_t)atadev->param->lba_size_1 |


-Søren

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to