From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <20020705195706.13627.qmail@web11404.mail.yahoo.com> From: John DeGood Subject: Re: [9fans] WD hard disk not available in partdisk To: 9fans@cse.psu.edu In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 5 Jul 2002 12:57:06 -0700 Topicbox-Message-UUID: c322ab0a-eaca-11e9-9e20-41e7f4b1d025 Based on reading the ATA-1 and ATA-2 specs (http://www.t13.org/project/d0791r4c.pdf and http://www.t13.org/project/d0948r4c.pdf) I agree that the if statement clauses in sdata.c appear to be reversed. FWIW, the ATA-6 draft (http://www.t13.org/project/d1410r3a.pdf) declares: ---- 8.15.26 Word 53: Field validity Bit 0 of word 53 is obsolete. ... 8.15.27 Word (58:54): Obsolete ---- Does this suggest that this code in sdata.c may cause problems in the future if it continues to always assume that the content of bit 0 of word 53 is valid? > I've tested this on a WD AC2120 (125MB, my disc is smaller than your disc). I'd try my ST225 (21.4 MB), but I don't think its controller is supported. :-) John --- jmk@plan9.bell-labs.com wrote: > A dumb bug, I fear, introduced between the 2nd and 3rd Edition, but I'd like > confirmation from another party. I believe the code around line 590 of > sdata.c > has the 'current' and 'logical' sectors swapped and should be > > if(drive->info[Ivalid] & 0x0001){ > drive->c = drive->info[Iccyl]; > drive->h = drive->info[Ichead]; > drive->s = drive->info[Icsec]; > } > else{ > drive->c = drive->info[Ilcyl]; > drive->h = drive->info[Ilhead]; > drive->s = drive->info[Ilsec]; > } > > Your old drive does not have LBA mode so this assignment becomes important. > What puzzles me is that this hasn't caused problems before, as it can lead to > division by zero later on. This applies to both the kernel and 9load. > > In the later ATA/ATAPI 'standards' all this was finessed away by stating that > all drives will support LBA mode. > > I've tested this on a WD AC2120 (125MB, my disc is smaller than your disc). > > --jim > > > On Thu Jul 4 16:46:16 EDT 2002, nu3e@arrl.net wrote: > > I tried to install 4th Edition on an old Western Digital AC2340 340 MB hard > > drive. The hard drive is recognized by the BIOS and works with DOS and > > Win95, but it does not appear in "partdisk" during the Plan 9 install. I > > also tried an old Seagate ST3243A 214 MB hard drive and "partdisk" > > recognizes it fine. I tried all master/slave combinations of the AC2340 > and > > ST3243A, and in every case only the ST3243A is available in "partdisk". > > > > Here are snippets of what I get with the ST3243A as primary master and the > > AC2340 as primary slave. In every case the AC2340 appears to be recognized > > early in the boot process, but it is never available in "partdisk": > > ---- > > dev A0 port 1F0 config 045A capabilities 0000 mwdma 0000 dma 00000000 rwm > > 8 > > dev B0 port 1F0 config 427A capabilities 0100 mwdma 0000 dma 00000000 rwm > > 16 > > dev A0 port 170 config 8580 capabilities 0B00 mwdma 0003 dma 00000000 rwm > > 0 > > ---- > > The following disk devices were found. > > > > sdC0 - ST3243A > > * p1 0 1023 (1023 cylinders, 203.80 MB) FATHUGE > > empty 1023 1024 (1 cylinders, 204.00 KB) > > > > sdD0 - NEC CD-ROM DRIVE: 2523.18 > > ---- > > This system has an old Intel Plato (aka Premier/PCI II) motherboard > (Pentium > > 90 w/ 430NX chipset). > > > > I also tried a 3rd Edition 9disk.9fd and had the same problem. > > > > Am I doing something dumb or is this a bug/feature? :-) > > > > John > > > __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com