lkml.org 
[lkml]   [2000]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: Cylinder limits jumper for drives over 32GB
Okay, after posting the original identify info without cylinder limits set, here is
the diff with cylinder limits set:

--- identify Fri Mar 24 00:12:44 2000
+++ ../hda_nocyl/identify Thu Mar 23 23:51:27 2000
@@ -5,7 +5,7 @@
3938 5538 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 8010
0000 2f00 4000 0200 0000 0007 3fff 0010
-003f fc10 00fb 0100 ec50 03ef 0000 0007
+003f fc10 00fb 0100 5520 04c5 0000 0007
0003 0078 0078 0078 0078 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
003e 0017 7c69 4009 4000 7c69 0001 4000
@@ -29,4 +29,4 @@
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
-0000 0000 0000 0000 0000 0000 0000 f9a5
+0000 0000 0000 0000 0000 0000 0000 e9a5
Notice the one long field which has been lowered quite considerably. Also notice the
change at the end of the identify info.

I tried specifying CHS on the linux command line but it ignores me and uses the
incorrect LBA capacity... So I patched ide-disk.c like this:

--- linux/drivers/block/ide-disk.c.orig Tue Jan 4 12:12:14 2000
+++ linux/drivers/block/ide-disk.c Fri Mar 24 00:23:53 2000
@@ -100,6 +100,16 @@
id->lba_capacity >= 16383*63*id->heads)
return 1;

+ /*
+ * If C/H/S is (more than 4111)/255/63 and lba capacity is
+ * being reported as 66055248, then assume lba capacity is
+ * not correct and let it use the more correct (but not perfect)
+ * C*H*S trick.
+ */
+ if( (id->cyls > 4111) && (id->sectors == 63) &&
+ (id->heads == 255) && (id->lba_capacity == 66055248) )
+ return 0;
+
lba_sects = id->lba_capacity;
chs_sects = id->cyls * id->heads * id->sectors;

Which is a total hack and a half, but I wanna see what happens when Linux uses the
(nearly correct) CHS values to figure out the capacity. It looks to me like this
patch will work, but it is still not technically reporting the full capacity (which
I mentioned earlier). Assuming this patch works, I can at least move stuff off my old
drive and onto the new one-- I'll test by reading high numbered sectors, and also by
seeing if the mke2fs works on the new partition.
Also, hdparm -i now returns (running with limits set):

/dev/hda:

Model=Maxtor 54098U8, FwRev=DA620CQ0, SerialNo=K802XXBC
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
BuffType=3(DualPortCache), BuffSize=2048kB, MaxMultSect=16, MultSect=off
DblWordIO=no, OldPIO=2, DMA=yes, OldDMA=0
CurCHS=16383/16/63, CurSects=-66060037, LBA=yes, LBAsects=66055248
tDMA={min:120,rec:120}, DMA modes: mword0 mword1 mword2
IORDY=on/off, tPIO={min:120,w/IORDY:120}, PIO modes: mode3 mode4
UDMA modes: mode0 mode1 mode2 mode3 *mode4
Notice the fake LBA sectors number and the negative cursects number... cute. This is
with Red Hat's 2.2.15-2.5.0 RPM (like 2.2.15pre5 or something I think). I suppose
hdparm is getting this wrong, and not the kernel.

Anyway.. the kernel is building now, with the only change being the patch above...
I'll post back with results.

-Dave

Andre Hedrick wrote:

> Andries,
>
> I just one of these Draco Drives from Maxtor for evaluation.
> After working the kernel, hdparm, fdisk......I get........
>
> root@p6dnf% hdparm.big -i /dev/hdg
>
> /dev/hdg:
>
> Model=Maxtor 54098U8, FwRev=DA620CQ0, SerialNo=K802S4EC
> Config={ Fixed }
> RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
> BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
> CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=80041248
> IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
> PIO modes: pio0 pio1 pio2 pio3 pio4
> DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 *udma4
> Drive Supports : ATA/ATAPI-4 T13 1153D revision 17 : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5
> Kernel Drive Geometry LogicalCHS=79406/16/63 PhysicalCHS=79406/16/63
>
> root@p6dnf% fdisk /dev/hdg
>
> The number of cylinders for this disk is set to 79406.
> There is nothing wrong with that, but this is larger than 1024,
> and could in certain setups cause problems with:
> 1) software that runs at boot time (e.g., LILO)
> 2) booting and partitioning software from other OSs
> (e.g., DOS FDISK, OS/2 FDISK)
>
> Command (m for help): p
>
> Disk /dev/hdg: 16 heads, 63 sectors, 79406 cylinders
> Units = cylinders of 1008 * 512 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hdg1 1 79406 40020592+ 83 Linux
>
> Command (m for help):
>
> Andre Hedrick
> The Linux ATA/IDE guy
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.031 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site