Commit Graph

153 Commits

Author SHA1 Message Date
mycroft 6067dc9ea8 Minor cleanup. 1993-10-17 05:34:23 +00:00
mycroft 2ce6de16d5 Add isa_establish(), for all it's worth (which is to say, nothing). 1993-10-16 05:25:21 +00:00
mycroft c73d85d341 Panic if DMA with odd length attempted on a 16-bit channel. 1993-10-16 03:55:59 +00:00
mycroft 4f94812b29 New file with DMA code from isa.c, modified to check for some errors. 1993-10-14 05:22:57 +00:00
mycroft e9b92335b0 Add DRQUNK and IOBASEUNK. 1993-10-06 12:09:25 +00:00
andrew e256404adc Cyclades Cyclom-{4/8/16}Y multiport async serial board driver. 1993-10-06 09:30:16 +00:00
davidg 892a4681ae * Revision 2.5 93/09/30 17:44:14 davidg
* patch from vak@zebub.msk.su (Serge V.Vakulenko) to work around
 * a hardware bug in cheap WD clone boards where the PROM checksum
 * byte is always zero
 *
 * Revision 2.4  93/09/29  21:24:30  davidg
 * Added software NIC reset in NE probe to work around a problem
 * with some NE boards where the 8390 doesn't reset properly on
 * power-up. Remove initialization of IMR/ISR in the NE probe
 * because this is inherent in the reset.
 *
 * Revision 2.3  93/09/29  15:10:16  davidg
 * credit Charles Hannum
 *
 * Revision 2.2  93/09/29  13:23:25  davidg
 * added no multi-buffer override for 3c503
 *
 * Revision 2.1  93/09/29  12:32:12  davidg
 * changed multi-buffer count for 16bit 3c503's from 5 to 2 after
 * noticing that the transmitter becomes idle because of so many
 * packets to load.
 *
 * Revision 2.0  93/09/29  00:00:19  davidg
 * many changes, rewrites, additions, etc. Now supports the
 * NE1000, NE2000, WD8003, WD8013, 3C503, 16bit 3C503, and
 * a variety of similar clones. 16bit 3c503 now does multi
 * transmit buffers. Nearly every part of the driver has
 * changed in some way since rev 1.30.
1993-10-01 02:01:43 +00:00
cgd 4a21fe3648 ifdef out the ttyfree()'s, so that fill_eproc doesn't panic when
a process's session still holds a ref to a tty which has been deallocated
and reused.
1993-09-29 02:36:21 +00:00
cgd b85a24ec4e get rid of stray printfs (turn them into "lprintf"s) 1993-09-28 21:26:59 +00:00
mycroft fd156a97fa New i386 code. 1993-09-14 17:28:06 +00:00
davidg 1c880d62bf As of this revision, all known bugs have been fixed. Some of the fixes include:
1) fixed 3c503 lock-up if the thinwire cable was disconnected at boot time
2) 8013EBT boards now work (quite well!) in 16bit/16k mode
3) ED_NO_DOUBLE_BUFFERING flag now works
4) slightly higer performance (about 3%) with 16bit WD/SMC boards
5) support for WD8013WC (10BaseT) boards

   Additionally, the probe code has been reorganized to be much cleaner. This
revision of the driver is 1.25. The release notes have been updated as well.
1993-09-09 09:40:56 +00:00
mycroft 0535b6089e Avoid clash of struct ns_addr with #define ns_addr. 1993-09-06 18:30:39 +00:00
jtc 4475f55d8f Include systm.h to get prototypes (and possibly inlines) of *max functions. 1993-09-04 00:02:48 +00:00
deraadt 9aed375ba3 tty XXstart() routines return void 1993-08-29 13:46:31 +00:00
brezak 62164fe535 Add find_isadev() and have sysbeep() use common defines. 1993-08-28 00:13:00 +00:00
cgd 225917bfe6 0.9 "official" patch 001:
(1)	added support for ed1 in both generic kernels at:
	device ed1 at isa? port 0x250 net irq 9 iomem 0xd8000 vector edintr
(2)	brought if_ed.c up to DG's 1.19 rev.
1993-08-26 00:26:50 +00:00
cgd 4543c1ebfd changes from 0.9-ALPHA2 to 0.9-BETA 1993-08-23 04:59:38 +00:00
cgd e5ea45d312 there are some devices out there which use... NO I/O PORTS! 1993-08-08 09:54:23 +00:00
glass 4a385c1228 with -Wall would bomb, on incomplete type 'selinfo'. bpfilter.h include
moved down, and select.h included.
1993-08-03 01:52:57 +00:00
mycroft 4862b84c92 Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
1993-08-01 19:22:24 +00:00
cgd 7b2afa7fe6 incorporate changes from 0-9-base to 0-9-ALPHA 1993-07-28 02:20:34 +00:00
cgd 8141ce5d83 kill damned RCS Log 1993-07-19 16:58:20 +00:00
cgd 886f6afa56 Reading file marks or writing end of tape return 0 bytes, AND THEY
DON'T SET THE ERROR BIT ON THE BUFFER UNLESS THE AUTHOR OF PHYSIO
IS STUPID!
1993-07-19 16:44:38 +00:00
mycroft 331148c31a Make these files GCC 2 happy. 1993-07-17 16:20:24 +00:00
deraadt 2ee2073a53 scsi_switch had wrong entries for these controllers... 1993-07-17 11:00:09 +00:00
mycroft ba408056a6 Use splnet, not splimp. 1993-07-13 21:53:06 +00:00
deraadt 6cc173695a moved bfdttach point to same place as other drivers, from greenman 1993-07-12 13:13:41 +00:00
mycroft 3be4221095 Change tty code to use clist interface, but with ring buffer implementation.
Also, fix a couple of bugs in tty.c and pccons.c, and some gross kluginess
in the hp300 stuff.
1993-07-12 11:36:53 +00:00
mycroft 0daaa4f16c Make splimp = splnet | spltty, and get rid of SLIP kluge for splnet and
spltty.
1993-07-11 14:03:51 +00:00
deraadt 80dc38edb3 documentation error 1993-07-08 08:22:17 +00:00
deraadt 1eacd36710 pccons.c now dynamically allocates it's "struct tty"
cons.c's "struct tty *cn_tty" wasn't used by any of the kernel, and goes away.
1993-07-07 11:00:23 +00:00
cgd bab148ba4e delete inclusion of rlist.h again. grr. 1993-07-07 06:52:39 +00:00
deraadt 9bff90a5c1 added a timeout debugging mode to wd.c so that people can see how slow
their controllers really are. Look for the WDCNDELAY_DEBUG definition.
1993-07-07 05:50:35 +00:00
deraadt d670635e8b ok, 5 second command timeouts.. 1993-07-07 01:05:42 +00:00
deraadt ceec40c98f clean up code for timeout/untimeout/wakeup prototypes. 1993-07-06 06:06:26 +00:00
deraadt 86999439b2 number of changes:
1. controller reset code moved into one function, called from more places now.
2. more places now do timeouts. TIPCAT code turned on.
3. blew away the unused WDOPENLOCK test code.
4. delay is now done using WDCNDELAY repetitions of DELAY(25). Up to 2.5 second
   pause accepted from controller (some controllers have some commands that are
   actually this slow)
5. some of the old timeout code was really whacked.
1993-07-06 00:42:43 +00:00
cgd 2d53469109 get rid of extraneous inclusion of rlist.h 1993-07-06 00:31:52 +00:00
deraadt 2cb34d6d65 added a missing {/} pair that barsoom seems to have taken out, but
which the standard 386bsd 0.1 driver did have. This is for a piece of
code in the bad block handling. found/fixed by hpeyerl.
1993-07-05 04:44:48 +00:00
deraadt 3322c7b691 all timeout code now calls DELAY() so the timeout delays are the same
length on all processors. Where possible, the controller is reset if it
times out.
1993-07-05 03:20:57 +00:00
deraadt ed61b76822 increased the timeout inside wdcommand(). Some controllers impliment some
commands very slowly.
1993-07-05 00:08:27 +00:00
cgd 7e940b55e0 add support for David Greenman "ed" driver 1993-07-03 12:21:07 +00:00
cgd d77e126ab2 add support for David Greenman's "ed" driver. 1993-07-03 12:19:36 +00:00
mycroft 3c4b913d33 Fix a bunch of things. 1993-07-01 00:24:09 +00:00
andrew f7dd4be020 Updated comments. 1993-06-30 04:13:34 +00:00
andrew 51ac6a0997 ANSIfications. 1993-06-27 06:27:29 +00:00
deraadt 277c73694e print "maddr 0xd0000 msize 65536" as "maddr 0xd0000-0xdffff" instead. 1993-06-20 07:24:53 +00:00
cgd d1ed63195d fix the divide-by-zero problem w/old disks. this patch is ws's "fault." 1993-06-18 20:45:35 +00:00
mycroft 5a2b8d1abb Fix typo. 1993-06-16 02:59:42 +00:00
mycroft 94df11ad63 Make sysbeep() take a frequency, not a timer count, and add constants
BEEP_FREQ and BEEP_TIME which can be overridden in the config file.
1993-06-16 02:57:17 +00:00
mycroft 528edf6037 Move definitions of TIMER_FREQ to timerreg.h, and fix value of CF for DELAY(). 1993-06-15 21:37:14 +00:00
mycroft 930a773dce Clean up beep code a miniscule amount, add interrupt protection, and
make multiple beeps generate a continuous tone.
1993-06-15 20:34:54 +00:00
mycroft 5592ad3fbb Ignore interrupts if the device isn't open. This prevents stray interrupts
from hosing the works.  What a stupid architecture.
1993-06-15 01:50:32 +00:00
andrew 925a429d35 Reduced bus-on time from the default of 11ms -> 9ms, to prevent floppy from
becoming data-starved during simultaneous fd & scsi activity.
1993-06-14 04:16:03 +00:00
deraadt f37ee25bb2 sigh. one day i'll finish this driver, meanwhile, one more fix.. 1993-06-10 04:50:42 +00:00
deraadt f6779cbdce minor silliness related to two or more controllers 1993-06-09 22:36:40 +00:00
cgd f1b8c74730 make getc() and ungetc() be rb{un,}getc(), so getc() and ungetc()
don't conflict w/ansi prototypes...
1993-06-06 23:04:42 +00:00
cgd 8a05b36058 incorporate Bruce Evans' interrupt changes, as hacked by Rod grimes,
for patchkit patch 158.  it appears to work well.
1993-06-06 04:14:01 +00:00
cgd 9d6a908bb7 patch from rgrimes to add delay to let data port stabilize, also
make "lpflag" unique to each driver
1993-06-05 22:58:29 +00:00
deraadt 2adecf84f6 1. It is now possible to build a kernel that does not have a pc0 device driver.
2. "press any key to reboot" reads the key from the console.
3. wddump() still needs a non-blocking getc() routine (or flush)
1993-05-28 09:10:52 +00:00
deraadt 2f0c0eb674 tty dynamic allocation 1993-05-26 10:06:41 +00:00
cgd fe1802950b add include of select.h if necessary for protos, or delete if extraneous 1993-05-22 11:40:42 +00:00
cgd 30177b538f add rcsids to everything and clean up headers 1993-05-22 07:56:12 +00:00
deraadt dde4fa6fe1 fixed typo 1993-05-22 07:40:46 +00:00
deraadt e34f239662 First cut at cpu independent disklabels.
There will be niggly little details no doubt..
1993-05-20 22:48:23 +00:00
cgd 8d6c77881c make kernel select interface be one-stop shopping & clean it all up. 1993-05-18 18:18:40 +00:00
deraadt e439c311cd Whoops. One more 0x0ffff to expunge.. 1993-05-11 04:15:22 +00:00
deraadt 4c40e74463 1. id_irq is a u_short
2. "irq ?" sets it to (u_short)-1
3. "irq #" sets it to (1<<#)
4. not specifying an interrupt sets it to 0.

Until someone else comes up with a better scheme, that's the way it is.
If you have a driver that turns the interrupt off, set it to ZERO.

If, after calling XXprobe(), id_irq is still (u_short)-1, that is the same
as if  probe() failed.
1993-05-11 04:06:23 +00:00
deraadt 545cc18754 This patch allows the wd device driver to tell how big the disks are on
WD1007-derived controllers. In this example, wdc0 is a WD1007-clone,
and wdc1 is a WD1003-clone. WD1007 controllers are generally ESDI
and IDE controllers.
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wd0 at wdc0 targ 0: 322MB 1224 cyl, 15 head, 36 sec <disktype>
wdc1 at 0x170-0x17f irq 7 on isa
wd2 at wdc1 targ 0: (unknown size) <disktype>
1993-05-10 05:53:22 +00:00
deraadt 5ae997897e i thought i deleted this line before! 1993-05-09 04:25:48 +00:00
deraadt ca0db18897 multiple master controllers would probe tthe first one N times instead of
once each. never mind not worth worrying about what i;m talking about.
1993-05-08 00:50:10 +00:00
cgd ca1b23d6dd no irq == -1, or, actually, 0x0ffff (f*ing unsigned short...).
this would break devices w/o interrupts (like lpa).
1993-05-07 10:38:04 +00:00
cgd 5220c82b50 fix lpt driver and add lpa driver. from 386bsd pk patch 133 1993-05-07 05:38:55 +00:00
deraadt a0bcb17e60 support for making dev->id_alive be set, this is for iostat to
find disk devices. wee bit of a kludge. sub-device attach()
routines must now return 1 for successful attach(), 0 otherwise.
Other bsd's do this too..
1993-05-04 08:27:29 +00:00
cgd 70754f5c6b fixed loopback == nuke problem.
This fix is probably not optimal, but it works.
1993-05-04 02:37:27 +00:00
mycroft 6c15f33674 Fix error in last change. B-P 1993-05-01 19:12:45 +00:00
mycroft c3c6f70cea Move bpfattach() call into hpattach(). 1993-04-30 23:44:03 +00:00
mycroft dbeb3a98e0 HP cards use 32 I/O ports, not 16. 1993-04-28 23:57:42 +00:00
mycroft 81b91f4488 Fix subtle word-size error. 1993-04-19 06:02:16 +00:00
mycroft 0105f6f55d Return correct value for new probe sequence. 1993-04-18 10:14:15 +00:00
deraadt e2a9eb19a4 slight code quality improvement. not related to the bug with very
old controllers or disks! :-)
1993-04-18 10:03:20 +00:00
mycroft ba40575afe Use new format for attach message. 1993-04-17 04:46:12 +00:00
mycroft e415187cd4 Add driver for HP ISA and EISA ethernet adapters. 1993-04-17 01:39:27 +00:00
deraadt 6bee5294bc ioconf changes, see previous cvs's that dumped core 1993-04-15 07:57:50 +00:00
deraadt fbecd3e987 Once more: some changes to the ioconf.c structure. It will now handle
devices hanging off controllers, any kind of controller.
A device on isa0 is called at probe(self), then attach(self)
A controller on isa0 is called at probe(self), then all it's children with
    defined unit numbers are initialized by calling attach(subdev); next all
    subdevices with unit ? are initialized by calling attach(sundev).
Almost all device entry points is now like the vax/sun model (intr being
the weird one)
1993-04-15 07:52:08 +00:00
glass 6eb0490333 NDDB made a re-appearance.... 1993-04-15 07:11:01 +00:00
deraadt e42c6edf94 ooops. DDB instead of NDDB. A typo, i swear 1993-04-15 07:09:23 +00:00
deraadt 653e85f75a #ifdef DDB fix 1993-04-15 07:01:16 +00:00
deraadt bf6814fb30 wd driver would fail on calling wdgetctlr() for older drives and
controllers. New behaviour is that if the standard method fails, try
to recalibrate the drive. Success means the drive exists.  patch by
hpeyerl@novatel.cuc.ab.ca (who owns several of these historical
artifacts)
1993-04-15 06:39:00 +00:00
deraadt f262b564a2 new scsi subsystem.
changes also in config/mkioconf.c & sys/scsi/*
1993-04-12 08:17:23 +00:00
cgd 506ea71fe9 was saying "not responding" on failed probe. that's bogus. 1993-04-10 21:09:13 +00:00
glass 034707f9e5 fixed to be compliant, subservient, and to take advantage of the newly
hacked config(8)
1993-04-10 12:04:35 +00:00
cgd fa76d62392 have probe return size of io space on successful return, rather
than simply 1.
1993-04-09 16:43:56 +00:00
cgd c2176edbac have probe return size of io space on successful return, rather
than simply 1.
1993-04-09 16:25:07 +00:00
cgd 2bbe287e49 make printing of i/o addresses a bit prettier, and fix off-by-one error. 1993-04-09 16:24:26 +00:00
cgd cf15785585 from Rodney W. Grimes (rgrimes@agora.rain.com) (patchkit patch 117):
This patch adds the symbol names to icu.s that vmstat expects
the interrupt counters to be called.  It also adds code to config
so that the names of the interrupts are written at the end of vectors.s
so vmstat can report real device names.  It also cleans up and enables
the logging of stray interrupts.  The counters for false interrupts
are added but the fix for them is not (the fix I have is not done
very good.) A false interrupt is when a device asserts it's interrupt
signal, then removes it before the 8259 can latch it.  This is the number
one cause of stray IRQ7's and IRQ15's.

        Additional device probe information is now printed.  This includes
ending I/O address (many drivers do not return the correct value from a
probe this still needs to be fixed), memory address and size, driver
flags passed in by config.
1993-04-09 13:43:40 +00:00
deraadt b9bd4b25de dmesg output at boottime now tries to print out information as
soon as it is available. The output looks much more like Sunos.
1993-04-08 08:26:46 +00:00
deraadt de24d978d5 wd7000 device driver, put in IO_WDS entry in isa.h. You can now build a
kernel with it. Hope your dma works better than mine <grr>
1993-04-06 20:58:01 +00:00
deraadt a2b4863160 ripped out a message 1993-04-06 12:09:55 +00:00
deraadt 9b67a6d7ad Mod-barsoom wd additions. config program + kernel config files changed too.
fd support had to change slightly too.
1993-04-06 10:06:28 +00:00
deraadt c3d2e42be0 added: incomplete wd7000-asc scsi controller device driver. 1993-04-06 10:04:46 +00:00