Commit Graph

97 Commits

Author SHA1 Message Date
Julian Elischer
7198bf4725 If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
Julian Elischer
53ac6efbd8 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +00:00
Bruce Evans
dc288b6fc5 Completed function declarations, added prototypes and removed redundant
declarations.
1995-11-21 14:56:02 +00:00
John Dyson
b0a50fff55 Correct some serious porting errors. The worst one was that the
vnode was being placed upon the mount point twice!!!
1995-11-19 20:24:15 +00:00
Bruce Evans
8633dd3209 Fixed the type of nic_listen(). A trailing arg was missing.
Fixed calls to s_intr().  There was sometimes an extra trailing arg.
1995-11-18 04:19:44 +00:00
Bruce Evans
a44f971709 Fixed a call to the listen function. A trailing arg was missing.
Fixed the type of isdn_check().  A trailing arg was missing.

Included "conf.h" to get some prototypes.

Completed function declarations.

Added prototypes.

Removed some useless includes.
1995-11-16 10:47:21 +00:00
Bruce Evans
7090e1977e Completed function declarations.
Added prototypes.
1995-11-16 10:44:48 +00:00
Bruce Evans
fc0c0c5604 Fixed the type of ity_input(). A trailing arg was missing.
Completed function declarations.

Added prototypes.

Removed some useless includes.
1995-11-16 10:35:29 +00:00
Bruce Evans
c4ccf33414 Fixed the type of itel_input(). A trailing arg was missing.
Included "conf.h" to get some prototypes.

Removed some useless includes.
1995-11-16 10:22:29 +00:00
Bruce Evans
2be9300965 Fixed the types of iioutput() and ii_input(). Trailing args were missing.
Completed function declarations.
1995-11-16 10:10:50 +00:00
Poul-Henning Kamp
af8364b0ad Get rid of the last debug sysctl variables of the old style. 1995-11-14 09:40:06 +00:00
Bruce Evans
b9286a3a0b ext2_inode_cnv.c:
Included <sys/vnode.h> and its prerequisite <sys/proc.h>, and cleaned
up includes.  The vop_t changes made the non-inclusion of vnode.h
fatal instead of just sloppy.

i386_bitops.h:
Changed `extern inline' to `static inline'.  `extern inline' is a
Linuxism that stops things from compiling without -O.  Fixed
idempotency identifier.

Misc:
Added prototypes.  Staticized some functions so that prototypes are
unnecessary.  Added casts.  Cleaned up includes.
1995-11-09 08:41:25 +00:00
Bruce Evans
f57e65478d Introduced a type `vop_t' for vnode operation functions and used
it 1138 times (:-() in casts and a few more times in declarations.
This change is null for the i386.

The type has to be `typedef int vop_t(void *)' and not `typedef
int vop_t()' because `gcc -Wstrict-prototypes' warns about the
latter.  Since vnode op functions are called with args of different
(struct pointer) types, neither of these function types is any use
for type checking of the arg, so it would be preferable not to use
the complete function type, especially since using the complete
type requires adding 1138 casts to avoid compiler warnings and
another 40+ casts to reverse the function pointer conversions before
calling the functions.
1995-11-09 08:17:23 +00:00
John Dyson
f3c33c9336 Cleaned up some lint and some obvious prototyping errors. 1995-11-08 04:50:00 +00:00
John Dyson
e017ddbd9a Omitted a '#if FIFO' in ext2_vnops.c
Submitted by:	Justin Gibbs
1995-11-06 04:05:01 +00:00
John Dyson
bacc8b1678 Changes to existing files for ext2fs support. The UFS mods need rework
in the future as they are a bit crufty -- but at least the stuff is in the
tree now.
1995-11-05 23:36:07 +00:00
John Dyson
c33a4405f7 Main code for the ext2fs filesystem. Please refer to the COPYRIGHT.INFO
file for GPL restrictions.  This code was ported to the BSD platform
by Godmar Back <gback@facility.cs.utah.edu> and specifically to FreeBSD
by John Dyson.  This code is still green and should be used with caution.
Additional changes to UFS necessary to make this code work will be commited
seperately.
Submitted by:	Godmar Back <gback@facility.cs.utah.edu>
Obtained from:	Lites/Mach4
1995-11-05 23:25:12 +00:00
John Dyson
c15c761192 Fix ufs_bmap so that triple indirect blocks might work.
Submitted by:	Godmar Back <gback@facility.cs.utah.edu>
1995-11-05 23:07:37 +00:00
Bruce Evans
4fda91c705 Moved prototypes for devswitch functions from conf.c and driver sources
to <machine/conf.h>.  conf.h was mechanically generated by
`grep ^d_ conf.c >conf.h'.  This accounts for part of its ugliness.  The
prototypes should be moved back to the driver sources when the functions
are staticalized.
1995-11-04 13:25:33 +00:00
Bruce Evans
52a593eaf2 Fix select().
Remove some unused code and never-working backwards compatibility code.

Add prototypes.
Reviewed by:	babkin@hq.icb.chel.su (Serge Babkin)
1995-10-12 23:28:41 +00:00
Jordan K. Hubbard
1d8812734b I have applied my last changes correcting the bug in dgbselect() to it
and here is the patch.  Submit it please. Thank you!

BTW, there is a new option "NDGBPORTS". By default it is equal to
NDGB*16 and means the number of ports of all Digiboards for which the
tty structures are reserved. It can be set to the real value in config-file
like:

       options "NDGBPORTS=8"
Submitted by:	Serge A. Babkin <babkin@hq.icb.chel.su>
1995-10-04 21:51:26 +00:00
Bruce Evans
2e69f359d1 Fix benign type mismatches in isa interrupt handlers. Many returned int
instead of void.
1995-09-19 18:55:37 +00:00
Bruce Evans
6003967057 Fix benign type mismatches in devsw functions. 82 out of 299 devsw
functions were wrong.
1995-09-08 11:09:15 +00:00
Jordan K. Hubbard
cc483bc3d9 Finish bringing this driver up to rev 2.2 - now compiles without warnings. 1995-09-04 01:58:41 +00:00
John Dyson
c83ebe7781 Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block count
for VOP_BMAP.  Updated affected filesystems...
1995-09-04 00:21:16 +00:00
Jordan K. Hubbard
a50cd483d2 Bring the Digiboard driver (ALPHA version) into -current. Includes
latest patches for PC/Xe boards.
Submitted by:	"Serge A. Babkin" <babkin@hq.icb.chel.su>
1995-09-03 19:53:11 +00:00
Bruce Evans
b42d2104dc Use tsleep() instead of ttysleep() to wait for carrier since a generation
change isn't an error.
1995-07-31 21:28:42 +00:00
Bruce Evans
9fa18570a2 Obtained from: partly from ancient patches of mine via 1.1.5
Introduce TS_CONNECTED and TS_ZOMBIE states.  TS_CONNECTED is set
while a connection is established.  It is set while (TS_CARR_ON or
CLOCAL is set) and TS_ZOMBIE is clear.  TS_ZOMBIE is set for on to
off transitions of TS_CARR_ON that occur when CLOCAL is clear and
is cleared for off to on transitions of CLOCAL.  I/o can only occur
while TS_CONNECTED is set.  TS_ZOMBIE prevents further i/o.

Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp)
and TSA_HUP_OR_INPUT(tp).  The former address is now used only for
off to on carrier transitions and equivalent CLOCAL transitions.
The latter is used for all input events, all carrier transitions
and certain CLOCAL transitions.  There are some harmless extra
wakeups for rare connection- related events.  Previously there were
too many extra wakeups for non-rare input events.

Drivers now call l_modem() instead of setting TS_CARR_ON directly
to handle even the initial off to on transition of carrier.  They
should always have done this.  l_modem() now handles TS_CONNECTED
and TS_ZOMBIE as well as TS_CARR_ON.

gnu/isdn/iitty.c:
Set TS_CONNECTED for first open ourself to go with bogusly setting
CLOCAL.

i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c:
We fake carrier, so don't also fake CLOCAL.

kern/tty.c:
Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to
test CLOCAL.  TS_ISOPEN was tested instead, but that broke when we disabled
the clearing of TS_ISOPEN for certain transitions of CLOCAL.

Testing TS_CONNECTED fixes ttyselect() returning false success for output
to devices in state !TS_CARR_ON && !CLOCAL.

Optimize the other selwakeup() call (this is not related to the other
changes).

kern/tty_pty.c:
ptcopen() can be declared in traditional C now that dev_t isn't short.
1995-07-31 21:02:00 +00:00
Bruce Evans
abe8bea470 Obtained from: partly from ancient patches of mine via 1.1.5
Give names to the magic tty i/o sleep addresses and use them.  This makes
it easier to remember what the addresses are for and to keep them unique.
1995-07-22 16:45:22 +00:00
Bruce Evans
a16721a13a Move the inline code for waking up writers to a new function
ttwwakeup().  The conditions for doing the wakeup will soon become
more complicated and I don't want them duplicated in all drivers.

It's probably not worth making ttwwakeup() a macro or an inline
function.  The cost of the function call is relatively small when
there is a process to wake up.  There is usually a process to wake
up for large writes and the system call overhead dwarfs the function
call overhead for small writes.
1995-07-22 01:30:45 +00:00
Bruce Evans
6644e30617 Obtained from: partly from ancient patches by ache and me via 1.1.5
Nuke `symbolic sleep message strings'.  Use unique literal messages so that
`ps l' shows unambiguously where processes are sleeping.
1995-07-21 20:57:15 +00:00
Bruce Evans
0d1de831ea Obtained from: partly from an ancient patch of mine via 1.1.5
Temporarily nuke TS_WOPEN.  It was only used for the obscure MDMBUF
flow control option in the kernel and for informational purposes
in `pstat -t'.  The latter worked properly only for ptys.  In
general there may be multiple processes sleeping in open() and
multiple processes that successfully opened the tty by opening it
in O_NONBLOCK mode or during a window when CLOCAL was set.  tty.c
doesn't have enough information to maintain the flag but always
cleared it in ttyopen().

TS_WOPEN should be restored someday just so that `pstat -t' can
display it (MDMBUF is already fixed).  Fixing it requires counting
of processes sleeping in open() in too many serial drivers.
1995-07-21 16:30:59 +00:00
Bruce Evans
97e156674d Don't include <sys/tty.h> in drivers that aren't tty drivers or in general
files that don't depend on the internals of <sys/tty.h>
1995-07-16 10:13:08 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Rodney W. Grimes
b2b795f07c Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
John Dyson
e5f751a9b2 Changes to get rid of ufslk2 hangs when doing read/write to/from
mmap regions that are in the same file as the read/write.
1995-04-24 05:13:28 +00:00
Justin T. Gibbs
3cddb2a3e2 John Aycock's BSD copyrighted sequencer assembler and sequencer code. This
is identical to the older version, just the copyright has changed.  Many
thanks go to Dean Gehnert of the Linux camp who went the extra mile to make
this happen.

Other changes:

Update assembler man page to include the -v and -D options

Merge in Dean's latest changes to the assembler

Have the sequencer do a MSG_REJECT when the negotiated syncronous rate
is lower than the adapter supports.  This forces asyncronous mode which
is faster at these rates anyway.

This code will be moved shortly to the non-gpld portion of the tree.
1995-04-15 21:45:56 +00:00
Justin T. Gibbs
0b000afb3b More code optimizations. Use a slightly different approach to decide
whether a reconnecting target is a tagged device or not.
1995-04-09 06:40:16 +00:00
Justin T. Gibbs
cc865dd008 Off by one error in -MSG-START+0 was just Justin being tired -- revert to
old value.

Remove unnecessary check for active messages in setup SCB.  This same test
would also jump to p_mesgin_done which would "ACK" an extra time possibly
confusing the target.

Tell the kernel driver whenever we send an ABORT_TAG message.
1995-04-01 19:51:40 +00:00
Justin T. Gibbs
5743c01c3f Major overhaul of the aic7xxx driver:
- Report valid residual byte counts.  We actually pause the sequencer
	  when the residual is non-zero.  I thought about using DMA to do this,
	  bus sequencer program space is tight.

	- Fix embarassing off by one error in the computation of a 2's
	  compliment variable.  This was most likely the cause of the
	  many problems reported with the tagged queuing code.

	- Handle "MAX_SYNC" as a special case (ie we are the ones starting
	  the sync negotiation sequence).  This was done so that the target
	  scratch area can be initialed to 0 offset (asyncronous transfers)
	  safely.  The initialization to 0 (was 15) is necessary since in
	  some cases a Wide negotiation could run into problems if SCSIRATE
	  was set wrong and we went into data(in/out).

	- Trim the DMA routines a little by using some procedures.  Net
	  effect is more functionality with 3 less instructions after this
	  update.

	- Toggle the WIDEODD bit of the DFCNTRL whenever this is not the
	  last SG block.  It has no effect in the 8bit bus configuration,
	  but in the Wide configuration ensures that the overlap byte is
	  held in the SCSI block if the transfer is odd so it will end
	  up in the next SG (the correct behavior).
1995-03-31 14:06:02 +00:00
Bruce Evans
3aa12267a5 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) that I didn't notice when I fixed
"all" such warnings before.
1995-03-28 07:58:53 +00:00
David Greenman
edf8a81561 Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
Justin T. Gibbs
b8d72a5ae8 Make the aic7xxx assembler take quoted strings as a single token.
Make $Id the version variable which required the quoted string "feature".
1995-03-17 23:54:17 +00:00
Bruce Evans
b5e8ce9f12 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
Justin T. Gibbs
06f0e1ceb8 Be careful to maintain the bits in SBLKCTL that are reserved. 1995-03-07 09:00:44 +00:00
David Greenman
403ef252fa Removed obsolete vtrace() remnants. 1995-03-04 03:24:45 +00:00
Paul Traina
8c5c37cd75 Incorporate bde's code-review comments.
(a) bring back ttselect, now that we have xxxdevtotty() it isn't dangerous.
(b) remove all of the wrappers that have been replaced by ttselect
(c) fix formatting in syscons.c and definition in syscons.h
(d) add cxdevtotty

NOT DONE:
(e) make pcvt work... it was already broken...when someone fixes pcvt to
	link properly, just rename get_pccons to xxxdevtotty and we're done
1995-02-28 00:21:11 +00:00
Paul Traina
77f77631e7 (a) remove the pointer to each driver's tty structure array from cdevsw
(b) add a function callback vector to tty drivers that will return a pointer
    to a valid tty structure based upon a dev_t
(c) make syscons structures the same size whether or not APM is enabled so
    utilities don't crash if NAPM changes (and make the damn kernel compile!)
(d) rewrite /dev/snp ioctl interface so that it is device driver and i386
    independant
1995-02-25 20:09:44 +00:00
Justin T. Gibbs
7325b76b7d Add tagged queueing support to the aic7xxx sequencer code. 1995-02-22 01:37:52 +00:00
Jordan K. Hubbard
1d5f5f9312 Fix a few bogons introduced when config lost the 3 char limitation. 1995-02-16 08:06:28 +00:00