9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: John DeGood <nu3e@yahoo.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] WD hard disk not available in partdisk
Date: Fri,  5 Jul 2002 12:57:06 -0700	[thread overview]
Message-ID: <20020705195706.13627.qmail@web11404.mail.yahoo.com> (raw)
In-Reply-To: <c17df1767d75fce8b3f6ff0533e20238@plan9.bell-labs.com>

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


  reply	other threads:[~2002-07-05 19:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-05 15:20 jmk
2002-07-05 19:57 ` John DeGood [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-05 21:33 jmk
2002-07-04 17:43 [9fans] rtl8139 troubles and 2 questions forsyth
2002-07-04 19:41 ` FJ Ballesteros
2002-07-04 20:52   ` [9fans] WD hard disk not available in partdisk John DeGood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020705195706.13627.qmail@web11404.mail.yahoo.com \
    --to=nu3e@yahoo.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).