Commit Graph

63 Commits

Author SHA1 Message Date
Andrey A. Chernov
879d1ff90a Temporary plug CLOCAL security hole, while sticky bits
yet not implemented. Only for bidirectional case.
1994-01-02 10:17:29 +00:00
Andrey A. Chernov
126518a182 Use separate fields for format GAP and read/write GAP.
Restore usage of read/write GAP.
1993-12-21 05:09:21 +00:00
Rich Murphey
7f66f26d0c Don't cast 2nd arg to fillw() per David's comments. The cast
breaks cursor positioning.
1993-12-21 03:27:26 +00:00
Rich Murphey
81664caf74 cast arg 2 of fillw() calls to type caddr_t as in pccons.
add "manual escape to debugger" arg in call to Debugger().
cast 1st arg to untimeout() to type timeout_func_t as done for timeout().
1993-12-21 02:49:13 +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
Andrey A. Chernov
b39c878e2b Media table reorganization.
Entries for 800 and 820 fixed.
From vak@kiae.su:
incorporate Joerg Wunsch formatting code
correct handle timeouted operations
fixed entry for 720 media
1993-12-19 00:40:49 +00:00
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
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
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
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
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
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
Andrey A. Chernov
0d04ba084f New sio driver from Bruce. 1993-11-14 23:29:01 +00:00
Andrey A. Chernov
fe04cbf968 Add missing read flush code to siostop 1993-11-08 19:36:32 +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
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
Rodney W. Grimes
2110b1cd9d Put back the $Id$ strings 1993-10-28 06:15:14 +00:00
Jordan K. Hubbard
33853f9752 This is syscons version 1.1 1993-10-28 05:27:36 +00:00
Jordan K. Hubbard
538430ae1a Patch from stever@csuohio.edu (Steve Ratliff) to make FAT_CURSOR work
on HDA/CGA displays.
1993-10-18 02:19:54 +00:00
Rodney W. Grimes
dd05fde699 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 19:17:18 +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
David Greenman
cc44412791 Disassociate DTR and RTS. They were coupled together and shouldn't have
been. This was necessary to work around problems with some equipment
that don't respond favorably to having these both dropped simultaneously.
1993-10-14 09:13:54 +00:00
Rodney W. Grimes
b05fb556cf Use KERNBASE for locating stuff in kernel virtual memory, not hard coded
constants.
1993-10-12 06:59:36 +00:00
David Greenman
357eebce38 incorporated patches from Marc Frajola (marc@escargot.rain.com) to
unset TS_TBLOCK when the RBLEN falls below the low water mark.
1993-10-12 06:32:28 +00:00
Jordan K. Hubbard
11851b0ee1 Removed FAT_CURSOR as default since it breaks certain CGA displays
and it is better to conform to the lowest common denominator.
Those wishing to retain it can always use options FAT_CURSOR in
their config files.
1993-10-08 21:21:59 +00:00
Jordan K. Hubbard
bd41f6854b Latest changs for XFree86 2.0 1993-10-04 22:23:03 +00:00
Rodney W. Grimes
380888c9fa Change #include <sys/console.h> to <machine/console.h>, file will be moved
shortly
1993-09-30 23:59:49 +00:00
Jordan K. Hubbard
0e583a0138 From: "Andrew A. Chernov, Black Mage" <ache@astral.msk.su>
AltGr Lock code for zero repeat count ommited, so AltGr Lock
works only one time and never again :-)
1993-09-29 00:42:10 +00:00
Jordan K. Hubbard
b5275b8103 Version number support for XFree86 1993-09-28 20:53:48 +00:00
Jordan K. Hubbard
fae56ff15f Change to sio for recognising the last serial port on a multiport
card correctly.

Updated syscons to 0.2e, added features for upcoming XFree86 2.0,
fixed crashbug.
1993-09-28 00:01:18 +00:00
Rodney W. Grimes
92ed385a09 >From: bde@kralizec.zeta.org.au (Bruce Evans)
Date: Thu, 16 Sep 93 01:35:10 +1000
Julian writes:

>In fact DEVIDLE and FINDWORK ended up being basically equivalent.
>the bit I wonder about, is the returning of 0.. What (other than
>another request from somewhere else in the kernel) is going to start
>work on the next item on the queue?

I think removing FINDWORK would make things clearer.

Nothing much is going to start work on the next item.  However, it is
pointless to continue processing the queue for the same unready drive.
Aborting all reads and trying harder to perform all writes would be
better.
Julian writes.

> no, actually it should be:
> fdt = fd_data[FDUNIT(minor(dev))].ft;

Fixed.
From: bde@kralizec.zeta.org.au (Bruce Evans)
Date: Thu, 16 Sep 93 22:56:01 +1000
The fd driver reported the wrong cylinder/head/sector numbers after an
error (ST3 is only valid after a sense-drive command), and didn't report
fs block numbers (diskerr was not used).

There was an old problem with writes to block fd devices.   Try this:

1. write protect floppy in fd0.
2. tar cf /dev/fd0a /dev/null.  Repeat a few times.  Later writes tend to
   terminate earlier.
   3. un-write protect floppy.
   4. repeat step 2.  The writes tend to return 0, 2048, 4096, ... and then
      succeed.

This was caused by a bug in vfs__bios.c.  (The bug is fixed in NetBSD's
vfs_bio.c.)  fd.c sets bp->b_resid to nonzero after an error.  vfs__bios.c
was not initializing bp->b_resid.  This causes some writes to terminate
early (e.g., writes to block devices; see spec_write()).

Related funnies:

1. Nothing tries to write the residual bytes.
2. The wd driver sets bp->b_resid to 0 after an error, so there's no
   way anything else could write the residual bytes.
3. I use the block fd device for tar because the raw device seemed to
   have more bugs long ago, and because it ought to be able to handle
   buffering more transparently (I don't want to have to know the
   device size).  But spec_write() always uses the size BLKDEV_IOSIZE
   == 2048 which is too small.  For disks it should use the size of
   one track (rounded down to meet the next track boundary or the i/o
   size).  Here it would help if the DIOCGPART ioctl worked.  But
   DIOCGPART is not implemented for floppies, and the disk size is
   ignored except for partitions of type FS_BSDFFS.

Bruce
1993-09-23 15:22:57 +00:00
Rodney W. Grimes
dc4ff321f2 Removed $Log$ section and patch kit headers. And here is the full
message for Bruces changes:

>From: bde@kralizec.zeta.org.au (Bruce Evans)
>Subject: fixes for fd driver

I think I've fixed some bugs in the 0.2.4 fd driver.

1. The main cause of hangs was that there was no timeout for seeks.  So
   attempting i/o with no floppy in the drive hung iff a seek was required.

2. Opens of unattached drives were allowed.  The kernel usually paniced
   soon after due to a bad pointer.

3. Some timeout functions ran at splclock() instead of splbio().  This
   may not have mattered.

4. The state machine was left in a funny state after a timeout.

5. Some function headers were new-style.

6. I picked up some code posted the other day to implement label ioctls.
   Now `disklabel fd0' works.  See a comment for how to modify conf.c.
1993-09-15 23:27:45 +00:00
Rodney W. Grimes
02aa90d831 >From: paul@u.tvt.se (Paul Pries)
>Subject: Bad bug in kbdtables.h [FreeBSD]

I found a bug in /sys/i386/isa/kbdtables.h which contain the
different keyboard layouts for syscons.  This regards all tables exept
the Danish and US.  When compiling the kernel with any other keymapping
than Danish or none at all (US), you get an error that 'key_map' is undefined.
This is because there is a typo in the name of the struct containing
the tables, keymap intead of key_map.
1993-09-15 23:03:21 +00:00
Jordan K. Hubbard
f5f7ba035f Bruce's multifarious patches for the floppy driver (not well tested, but
since what we have is crap as it is, it can't do much worse!).
1993-09-14 19:34:32 +00:00
Rodney W. Grimes
e793dbb026 From guido@gvr.win.tue.nl Wed Sep 8 13:34:16 1993
That is because TIOCMGET was broken. Yes...this is known for some time
and no, we (Bruce and me) never posted it. Why? Simply because we choose
to post fixes when we fixed most of the bugs.

Anyway..now that the slip problems are coming, here is a fix for
correct TIOCMGET behaviour.

-Guido
Note: this should be tested first (Rich?).  Tested by rgrimes
1993-09-10 16:59:16 +00:00