Commit Graph

23 Commits

Author SHA1 Message Date
Nate Williams
768e8947c6 From: bde@kralizec.zeta.org.au (Bruce Evans)
o merged and fixed timeout code from sos.
	o merged DOS partition support from sos.
	o fixed "extra" interrupts.
	o check if malloc retuns NULL :-(.
	o print drive size as in NetBSD
	o after an error, return the residual count, not 0.
	o give up early for > 16 heads.
	o cleaned up the old-drive detection in wdgetctlr().
	o rewrote wddump().  I'd been putting this off because
	  I'd had the dump disabled since 0.0 and had no idea
	  if even the standard version worked.  It didn't:
	  (0) syscons' sgetc() interface broke some keyboard
	  stuff.
	  (1) CADDR1 is mapped using pmap() and pmap got a NULL
	  pointer trap (at least when I got to wddump() using
	  call diediedie from ddb) because the pte for CADDR1
	  is only supposed to be hacked on directly (e.g. in
	  physcopyseg()).
	  (2) bad144 handling was not done.
	  (3) it was slooow (3600 sectors/minute) because my
	  controller doesn't cache writes.
	o miscellaneous other cleanups, e.g., removed scattered
	  patchkit/terry dates.
	o lots of reformatting.

To be done:
	o Merge/fix TIH/NetBSD bad144 code (doesn't belong in any
	  particular driver.  Why aren't we using i386/dkbad.c?).
	o Merge/fix Dyson/NetBSD clustering code (large parts
	  should be shared).
	o Fix/extend the partition in use bits.  Support extended
	  partitions.  This should be shared by all disk drivers.  Swap
	  to a DOS partition so that the swap space can be shared with
	  linux.
	o Don't use polling except for initialization.  Need to
	  reorganise the state machine.  Then "extra" interrupts
	  shouldn't happen (except maybe one for initialization).
	o Fix disklabel, boot and driver inconsistencies with
	  bad144 in standard versions.
	o Look at latest linux clustering methods.  Our disksort()
	  gets in the way of clustering.
	o cleaned up the ATA changes (needs more work.  I think
	  the ATA specs say that the only thing really wrong with
	  the original version of wx is that there was no test
	  for drive-ready before some commands.  400 nsec delay
	  suffices for almost everything and 400 nsec delay is
	  usually "free").
1994-02-01 05:55:21 +00:00
Rodney W. Grimes
a8e9d1d5b7 Increased TIMEOUT in wdwait from 2000 to 20000 since it seems many people
have needed to do this in order for the wd driver to work for them.
1994-01-22 11:00:01 +00:00
Nate Williams
af60ea293c When a probe fails print a 'not found' line instead of nothing 1994-01-08 00:00:52 +00:00
Nate Williams
12da8ccb6e Whoops, I committed an older version that didn't have some warnings fixed.
This version fixes all warnings given the default compiler flags with some
casts.
1994-01-04 20:20:38 +00:00
Nate Williams
4aba964ef1 New wd driver, based on Bruce Evans 'wx/altwd' driver which has passed
enough tests to be considered more stable than current driver.

Lots of work by Bruce, David G., and Guido have gone into this version, and
more is to come in the future.

Support for multiple controllers is in, but doesn't work correctly with
different controllers (IDE AND MFM), but multiple alike controllers appears
to work.

Most of the stray interrupts problems should be fixed, although you will
get a couple 'extra interrupts' when disklabeling and on startup.
1994-01-04 20:05:26 +00:00
Garrett Wollman
aaf08d94ca Make everything compile with -Wtraditional. Make it easier to distribute
a binary link-kit.  Make all non-optional options (pagers, procfs) standard,
and update LINT to reflect new symtab requirements.

NB: -Wtraditional will henceforth be forgotten.  This editing pass was
primarily intended to detect any constructions where the old code might
have been relying on traditional C semantics or syntax.  These were all
fixed, and the result of fixing some of them means that -Wall is now a
realistic possibility within a few weeks.
1993-12-19 00:55:01 +00:00
Garrett Wollman
381fe1aaf4 Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, and
add same (sans -Werror) to Makefile for future compilations.
1993-11-25 01:38:01 +00:00
Nate Williams
997e3029c9 Subject: Panic - can't mount route (Soren's changes)
From: Geoff Rehmet  <g89r4222@braae.ru.ac.za>

Description:
	On bootup, probe of wd drives fails (CP30104), and kernel panics
	- cannot mount root
	It appears that the device probe just times out.
	Increasing the timeout back to its old value fixes the problem.
Repeat-By:
	SUP FreBSD-current,  Find a CP30104 .....  (ok ok ok)
	Basically - Soren's changes barf my disk.
1993-11-23 21:36:37 +00:00
Nate Williams
1b0b2339ce Stop gap measure until we can get Bruce's driver debugged.
---
From: sos@login.dkuug.dk (S|ren Schmidt)
Subject: IDE-disk hangs - solution/patches NetBSD/FreeBSD
Summary: fixes for lost interrupts with IDE disks
Keywords: hanging-disk, IDE-disk, lost-interrupt


Due to "popular" demand I'm posting these patches to NetBSD/FreeBSD
instead of mailing them around the world :-)

As many have found out there is a problem when using IDE disks on
FreeBSD. Following is a patch that fixes the problem with lost intterrupts.
Both fixes is based on a patch posted here some month ago by
Stefan Behrens?? (sorry I've lost the original article). But anyway it
works (for me :-).
Basically it does a timeout on lost interrupts, starting the operation
again and logging and error message on the console.

It additionally makes the allready present while loop timeouts
independent of CPU speed, and adds minor numbers for easy access to
dos partitions.
1993-11-22 23:25:46 +00:00
David Greenman
d333677271 added 5us delay before checking BUSY flag to conform to ATA spec -
as suggested by John Dyson (dyson@implode.rain.com)
1993-11-19 06:30:00 +00:00
Rodney W. Grimes
57bb0ee45f New version of scsi code from Julian 1993-11-18 05:03:27 +00:00
Garrett Wollman
35089dd415 Fixed comments that start within a comment, so code compiles cleanly with
-Wcomment.
1993-11-17 23:25:28 +00:00
Rodney W. Grimes
6f78ca6026 Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 13:48:52 +00:00
Rodney W. Grimes
d2f07716e2 >From: "Andrew A. Chernov, Black Mage" <ache@astral.msk.su>
Date: Wed, 29 Sep 1993 01:54:53 +0300

To bring this error try to make two swap partitons on one disk:
one of the partitions will be not recognized.
Fix is simple: set uninitialized val variable.
1993-09-29 01:11:19 +00:00
Rodney W. Grimes
0ad99dbc30 Reverting wd driver back to version before Bruces new driver until the
many bugs can be worked out of it...
1993-09-07 02:08:51 +00:00
Rodney W. Grimes
5c954fb68d Removed patch kit header, added $Id$
Increased timeout in wdwait from 1000 to 2000, this makes the st157A's
at least pass the probe routines :-)
1993-09-06 17:41:46 +00:00
Rodney W. Grimes
cfd895c81e Date: Fri, 3 Sep 93 01:25:44 +1000
From: bde@kralizec.zeta.org.au (Bruce Evans)

This fixes several problems.

It has almost everything that is in the FreeBSD version of Aug 22.
It is missing the bug for 2 drives and still prints <> around the
drive type.  It handles BADEND144 less verbosely.  It does wdgetctlr()
somewhat differently from NetBSD/FreeBSD.

Date: Sun Sep  5 06:45:12 PDT 1993
From: rgrimes@cdrom.com

Fixed printf's to be correct, since Bruce used the old ones.  This driver
still prints phantom wd1's on some Maxtor and other IDE drives, I have
a patch I am sending to Bruce for checking.
1993-09-05 13:46:17 +00:00
Rodney W. Grimes
89bc97311a xxxprobe now returns the correct number of I/O registers used so that
the probe output during boot gives the I/O range instead of just the
starting address
1993-08-28 03:02:52 +00:00
Rodney W. Grimes
905ee1678d Fix so that unit number 1 is found again. 1993-08-24 19:41:58 +00:00
Rodney W. Grimes
0f5b6b9987 Fixed for DQFLQUIET flag from: Terry Lee <terry@uivlsisd.csl.uiuc.edu>
I submitted the part of patch00155 that fixes wd.c not reporting any
bad blocks.  Unfortunately, the patch created a new problem that makes new
installations using that kernel impossible.  I have included a patch below that
should fix both problems.  The fix comes from Tom Ivar Helbekkmo's wd driver
(the Norway wd driver).  I've also eliminated the use of the DKFL_QUIET flag
completely, since it is not used anymore.

Fixed wdgetctrl routines for so that it returns a meaniful string for
non IDE disk drives.  It also nolonger returns success when a drive is
not really there.
1993-08-08 07:03:21 +00:00
David Greenman
2a6c898016 Modified attach printf's so that the output is compatible with the "new"
way of doing things. There still remain several drivers that need to
be updated.  Also added a compile-time option to pccons to switch the
control and caps-lock keys (REVERSE_CAPS_CTRL) - added for my personal
sanity.
1993-07-15 17:53:14 +00:00
Paul Richards
7c434002a4 Upgrade to GCC 2.X 1993-06-18 02:47:24 +00:00
Rodney W. Grimes
5b81b6b301 Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00