Commit Graph

155 Commits

Author SHA1 Message Date
Andrey A. Chernov
f4d3408967 Fix tsleep "waitvt" wait data from vak@kiae.su 1993-12-18 22:50:51 +00:00
Andrey A. Chernov
ed2fa05ece Reorganization of format table.
GAP values changed suitable for possible format code addition.
Read/write GAP always 2 now.
Interleave parameter added for possible format code addition.
Many logical formats added.
720K physical drive added.
Problems: still can't read 720..820 media in 1.44 drive.
1993-12-18 01:16:26 +00:00
Andrey A. Chernov
159569a418 RTCFDT_720K (physical drive 720K) added. 1993-12-18 01:12:47 +00:00
Andrey A. Chernov
2384b3a702 Added following formats (derived from MSDOS fdformat):
800K in HD 5.25in  (maximum for DD diskettes)
1.44M in HD 5.25in (for easy distributions)
1.46M in HD 5.25in (maximum for 5.25)
Some cosmetique changes.
1993-12-16 19:47:42 +00:00
Andrey A. Chernov
cf197426bb Change default dtrwait value to 2 seconds.
Change C-style into static initializer per Bruce request.
1993-12-16 04:38:27 +00:00
Andrey A. Chernov
7ca0641bb9 No more partition bits in floppy minor.
Now minor looks like UU DDDDDD, UU - unit, DDDDDD - density.
If density == 0, CMOS-detect format assumed.
Fix attach code for correct work with unknown CMOS
floppy types.
Trick diskerr to handle new minor.
1.722M floppy in 1.44M drive popular format added.
1993-12-16 04:28:42 +00:00
Andrew Moore
8b4d35c5ee wt.c - version 1.3
from:
Sergey Ryzhkov, Serge Vakulenko
E-mail: <sir@kiae.su>, <vak@zebub.msk.su>

This is the streamer tape driver for 386bsd and FreeBSD, which
supports Wangtek and Archive compatible QIC-02/QIC-36 controllers.
It was developed as a replacement of the old Wangtek tape driver from CMU.

In comparison with the CMU driver, this version has the following enhancements:
1) Support for Archive SC402 and SC499 tape controllers added.
2) Support for up to three tape controllers on the same machine.
3) Support for BSD-style ioctls MTIOCGET, MTIOCTOP.
   Mt command now works adequately with this driver.
2) Asynchronous REWIND and FSF operations, close() will not wait
   until they finish.  The next open() will wait for it instead.
4) Use of WTQICMD ioctl is limited to ERASE and RETENS operations.
   This prevents the user from locking the tape driver by strange
   tape operations.
5) Tape density switching added.
6) The status of the process, blocked on the tape operation,
   is displayed at the WCHAN column of the `ps' command as:

	wtread    reading data from the tape
	wtwrite   writing data to the tape
	wtrfm     reading the tape marker
	wtwfm     writing the tape marker
	wtrew     rewinding the tape
	wterase   doing WTQICMD ERASE operation
	wtretens  doing WTQICMD RETENS operation
	wtorew    doing MTIOCTOP REW/OFFL operation
	wtorfm    doing MTIOCTOP FSF operation
	wtowfm    doing MTIOCTOP WEOF operation

7) It's possible to use the tape with "default density",
   useful for devices which don't support density switching
   or do automatic format determination.
8) Some controllers support only 1024 block length.
   Setting WT_BSIZE bit in device minor number turns on this mode.

Minor number structure:
	0bfffuuu
Fields:
	uuu   - Unit number. It's possible to install
		up to three tape controllers on the same machine,
		using DRQs 1..3.  Hence, unit number can lie
		in range 0..2.
	fff   - Tape format number:
		0 - /dev/rwt0  - default density (auto select)
		1 - /dev/rwt0a - QIC 11 (obsolete)
		2 - /dev/rwt0b - QIC 24 (60 megabytes)
		3 - /dev/rwt0c - QIC 120 (120 megabytes)
		4 - /dev/rwt0d - QIC 150 (150 megabytes)
		5 - /dev/rwt0e - QIC 300 (300 megabytes?)
		6 - /dev/rwt0f - QIC 600 (600 megabytes?)
	b     - Long block size flag.  With this bit set,
		the driver will perform all i/o operations
		with the controller using 1024-byte
		blocks, instead of 512 ones.
		Some controllers need it (CMS for example).
		If you Wangtek controller does not stream well,
		you can try to use /dev/rWt0 device instead
		of /dev/rwt0 (uncomment needed lines in /dev/MAKEDEV
		to create it).

Block interface (writing blocks less than 2048 bytes) is not functioning
pwoperly.  Use raw interface instead.

Thanks to all who helped to test it on the following hardware:

Controller           Drive            Volume    Interface     Thanks to
---------------------------------------------------------------------------
Archive SC-499       Archive 2150L    150 Meg   QIC-02        KIAE
CMS?                 ?                150 Meg   QIC-02        KIAE
Everex EV 831/833    ?                ?         QIC-36        Joergen Haegg
Wangtek ASSY         Wangtek          60 Meg    QIC-02        Ken Whedbee
Tecmar QT150i?       Wangtek 5150EQ   ?         QIC-02?       Marko Teiste
?                    Wangtek 5099EK   60 Meg    QIC-36        Robert Shien
Archive SC400S       ?                60 Meg    ?             Warren Toomey
1993-12-13 18:38:44 +00:00
David Greenman
d39cf18213 set output flags to ttydefault if COMCONSOLE is defined. 1993-12-13 13:20:50 +00:00
Andrey A. Chernov
fa4700b4f1 Add more strictly size check into Fdopen to eliminate
possible end-user errors.
Now:
1) on physical 1.2 can open logical 1.2, 720, 360H
2) on physical 1.44 can open logical 1.44, 720
3) on physical 360 can open logical 360
All other variants refused.
C-style improved in this check, multiply if's changed to switch.
1993-12-13 01:34:28 +00:00
Andrey A. Chernov
dffff499a9 Add 360K floppy support.
More work to add 720K floppy support.
Restore good old dependance of device and floppy type.
Now:
fd?a == 1.44
fd?b == 1.2
fd?c == 720
fd?d == 360 in HD
fd?e == 360
Add more strict size check in Fdopen, not it refuse:
1) Attempt to open any type expect fd?e, if you have only 360K drive.
2) Attempt to open fd?a if you have only 1.2 drive.
1993-12-12 20:26:56 +00:00
Andrey A. Chernov
20a2916818 Add popular 720k floppy in HD drive floppy type.
Restore check for NUMTYPES in Fdopen.
1993-12-12 16:46:54 +00:00
Jordan K. Hubbard
41d67a5615 Folllow Bruce's advice in reducing dma_pagesize to 4K (more conservative
estimate).  This seems to work well with my GUS at least.
1993-12-12 05:50:52 +00:00
Andrey A. Chernov
8cd0c83879 Remove compiler warning:
void function return int.
1993-12-11 00:37:55 +00:00
Andrey A. Chernov
04201cd182 Force HUPCL in bidirectional port open.
This don't allow it hangs forever.
1993-12-11 00:36:14 +00:00
Andrey A. Chernov
25915e75e3 1) Fix error with port recognition, speed initialization code
added to probe.
2) Force CLOCAL=on for outgoing ports and CLOCAL=off for
incoming ports into open in bidirectional case.
3) Add DELAY after writing to com_ier for fifo drain into probe.
1993-12-09 17:24:19 +00:00
Andreas Schulz
fadc21ae39 Fixed the error that a Fdopen succeeds without a found fd controller in
the system.
1993-12-04 16:13:18 +00:00
Andrew Moore
16111ced9f Reset fdc during probe.
From: <dec@lazarus.nrtc.northrop.com>
   Changes between EPSILON and RELEASE of FreeBSD have again caused
the kernel to not see my floppy disk drives.  I don't know what happened,
'cause I don't see any changes to fd.c, but here is an old fix that
I have applied to the probe routine which will solve the problem (at
least for me).  Since this is a rather brute-force solution - I understand
if you want to ignore it...

[Upgrading to pre-Beta FreeBSD caused this on my system. -AM]
1993-12-03 05:01:40 +00:00
Andrey A. Chernov
b4afc64b0b wmesg was too long (>7), fixed 1993-11-29 19:26:32 +00:00
David Greenman
97751a63e2 * Revision 2.16 1993/11/29 16:55:56 davidg
* merged in Garrett Wollman's strict prototype changes
 *
 * Revision 2.15  1993/11/29  16:32:58  davidg
 * From Thomas Sandford <t.d.g.sandford@comp.brad.ac.uk>
 * Add support for the 8013W board type
1993-11-29 17:07:33 +00:00
Andrey A. Chernov
b81db928c3 Direct #undefs removed to allow flexible manipulation
via config options. Unneded #defines removed.
Improved dependance of "snd.h" and NSND.
1993-11-28 10:55:59 +00:00
Andrey A. Chernov
4a8e05dd59 Move soundcard.h & ultrasound.h to proper location <machine/...>
to allow application access it.
1993-11-27 22:16:44 +00:00
Rich Murphey
23fc1c7148 Fix conflicting prototypes and return values. 1993-11-27 06:32:41 +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
Christoph Robitschko
5a0cfe828a Changed return(-1) in switch_scr to return(EINVAL), because -1 is
ERESTART on return from a system call.
1993-11-23 18:20:52 +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
047ea5bd0c * Revision 2.14 1993/11/22 10:55:30 davidg
* change all splnet's to splimp's
 *
 * Revision 2.13  1993/11/22  10:53:52  davidg
 * patch to add support for SMC8216 (Elite-Ultra) boards
 * from Glen H. Lowe
 *
 * Revision 2.12  1993/11/07  18:04:13  davidg
 * fix from Garrett Wollman:
 * add a return(0) at the end of ed_probe so that if the various device
 * specific probes fail that we just don't fall of the end of the function.
1993-11-22 11:08:16 +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
Andrey A. Chernov
aa0028f8cf Fix attach message, make separate line for it
(old version assumed that line is probe line)
1993-11-17 23:38:23 +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
Andrey A. Chernov
58e4f8835a If netmask == 0, new value changed from 0x8000 to 0x10000
(don't mess with IRQ15)
1993-11-17 00:21:03 +00:00
Andrey A. Chernov
1e064bd4be timeout+sleep changed to tsleep 1993-11-15 01:33:11 +00:00
Andrey A. Chernov
de0edfd4e3 if netmask == 0, then the loopback code can do some really
bad things.
workaround for this: if netmask == 0, set it to 0x8000,
which is value used by splsoftclock
1993-11-14 23:53:32 +00:00
Andrey A. Chernov
0d04ba084f New sio driver from Bruce. 1993-11-14 23:29:01 +00:00
David Greenman
0967373e1c First steps in rewriting locore.s, and making info useful
when the machine panics.

i386/i386/locore.s:
1) got rid of most .set directives that were being used like
	#define's, and replaced them with appropriate #define's in
	the appropriate header files (accessed via genassym).
2) added comments to header inclusions and global definitions,
	and global variables
3) replaced some hardcoded constants with cpp defines (such as
	PDESIZE and others)
4) aligned all comments to the same column to make them easier to
	read
5) moved macro definitions for ENTRY, ALIGN, NOP, etc. to
	/sys/i386/include/asmacros.h
6) added #ifdef BDE_DEBUGGER around all of Bruce's debugger code
7) added new global '_KERNend' to store last location+1 of kernel
8) cleaned up zeroing of bss so that only bss is zeroed
9) fix zeroing of page tables so that it really does zero them all
	- not just if they follow the bss.
10) rewrote page table initialization code so that 1) works correctly
	and 2) write protects the kernel text by default
11) properly initialize the kernel page directory, upages, p0stack PT,
	and page tables. The previous scheme was more than a bit
	screwy.
12) change allocation of virtual area of IO hole so that it is
	fixed at KERNBASE + 0xa0000. The previous scheme put it
	right after the kernel page tables and then later expected
	it to be at KERNBASE +0xa0000
13) change multiple bogus settings of user read/write of various
	areas of kernel VM - including the IO hole; we should never
	be accessing the IO hole in user mode through the kernel
	page tables
14) split kernel support routines such as bcopy, bzero, copyin,
	copyout, etc. into a seperate file 'support.s'
15) split swtch and related routines into a seperate 'swtch.s'
16) split routines related to traps, syscalls, and interrupts
	into a seperate file 'exception.s'
17) remove some unused global variables from locore that got
	inserted by Garrett when he pulled them out of some .h
	files.

i386/isa/icu.s:
1) clean up global variable declarations
2) move in declaration of astpending and netisr

i386/i386/pmap.c:
1) fix calculation of virtual_avail. It previously was calculated
	to be right in the middle of the kernel page tables - not
	a good place to start allocating kernel VM.
2) properly allocate kernel page dir/tables etc out of kernel map
	- previously only took out 2 pages.

i386/i386/machdep.c:
1) modify boot() to print a warning that the system will reboot in
	PANIC_REBOOT_WAIT_TIME amount of seconds, and let the user
	abort with a key on the console. The machine will wait for
	ever if a key is typed before the reboot. The default is
	15 seconds, but can be set to 0 to mean don't wait at all,
	-1 to mean wait forever, or any positive value to wait for
	that many seconds.
2) print "Rebooting..." just before doing it.

kern/subr_prf.c:
1) remove PANICWAIT as it is deprecated by the change to machdep.c

i386/i386/trap.c:
1) add table of trap type strings and use it to print a real trap/
	panic message rather than just a number. Lot's of work to
	be done here, but this is the first step. Symbolic traceback
	is in the TODO.

i386/i386/Makefile.i386:
1) add support in to build support.s, exception.s and swtch.s

...and various changes to various header files to make all of the
	above happen.
1993-11-13 02:25:21 +00:00
Andrey A. Chernov
e614aa8a3b Fixed minor bug in M[LSN] interpretation, added octave-tracking.
Added the slur-mark feature.
Name of ioctl's include sys/spkr.h changed to machine/speaker.h
1993-11-09 02:32:30 +00:00
Andrew Moore
2fc79c3815 Applied David Greenman's hack to disable IRQ conflict checking
when COM_MULTIPORT is defined.
1993-11-09 02:12:36 +00:00
Jordan K. Hubbard
fe40db7b2e Change from David Greenman to return properly unsigned irq. 1993-11-09 01:20:33 +00:00
Andrey A. Chernov
fe04cbf968 Add missing read flush code to siostop 1993-11-08 19:36:32 +00:00
Garrett Wollman
f4639581fd Get rid of WFJ's use of sleep() for more user-friendly tsleep(). 1993-11-07 21:47:19 +00:00
Garrett Wollman
13c0dce671 Made all header files idempotent and moved incorrect common data from
headers into a related source file.  Also fixed a bug in ed_probe() where
it was possible to fall off the end of the function
1993-11-07 17:44:34 +00:00
Andrey A. Chernov
03d24cbca4 DST offset calculation removed, it is wrong in any case. 1993-11-04 01:56:31 +00:00
Andrey A. Chernov
743eb022be Russian keymap (RUKEYMAP) changes:
New syscons keys added: NEXT, DBG, RBT
AltGr Shift removed from right Alt
Shift state on -,+ keys exchanged
1993-11-04 01:49:20 +00:00
Paul Richards
19bcb5e4a2 Restored comments that were removed from npx.c using # comment
format rather than /* */, as per advise from Jordan.
1993-11-03 23:32:35 +00:00
Paul Richards
81fc6236e6 Removed comments from within asm block.
New gas fails to parse comments within asm blocks properly. Simply
remove them until gas gets fixed.
1993-11-03 00:29:19 +00:00
Jordan K. Hubbard
9afdb1976e Now that STAR_SAVER and SNAKE_SAVER are kernel options, add code
to make sure that bad things don't happen if both are (incorrectly)
defined at once.
1993-10-31 00:19:01 +00:00
Jordan K. Hubbard
faa78b5f58 Fixed bug where syscons.c wouldn't compile if DDB was enabled.
Removed FAT_CURSOR and STAR_SAVER as compiled in defaults - these should
be kernel options!
1993-10-31 00:09:02 +00:00
Jordan K. Hubbard
4506032117 Update to latest Linux sound driver 2.0 1993-10-29 03:44:07 +00:00
Rodney W. Grimes
2110b1cd9d Put back the $Id$ strings 1993-10-28 06:15:14 +00:00