Commit Graph

69 Commits

Author SHA1 Message Date
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
Jordan K. Hubbard 7b2e66b08b Fix a few more nits. Should compile better now! :_) 1995-02-15 11:59:41 +00:00
Jordan K. Hubbard 7543a838ee Fix up include paths, nuke some warnings. 1995-02-15 06:28:29 +00:00
Jordan K. Hubbard 2933703e6d Julian E. says the code is out of date, but I can at least make the
includes look right until we get a chance to fix the rest of this.
1995-02-14 22:33:10 +00:00
Jordan K. Hubbard e316b1a9de An ISDN driver that supports the EDSS1 and the 1TR6 ISDN interfaces.
EDSS1 is the "Euro-ISDN", 1TR6 is the soon obsolete german ISDN Interface.
Obtained from: Dietmar Friede <dfriede@drnhh.neuhaus.de> and
	Juergen Krause <jkr@saarlink.de>

This is only one part - the rest to follow in a couple of hours.
This part is a benign import, since it doesn't affect anything else.
1995-02-14 15:00:39 +00:00
Jordan K. Hubbard 3268f6b644 Get scdreg.h from new location. 1995-02-14 04:05:04 +00:00
Jordan K. Hubbard 640ed9d2a8 Remove duplicate functions.
Submitted by:	gj
1995-02-09 11:30:07 +00:00
Jordan K. Hubbard ace891ef08 Commit Gary's diffs for adding xcdplayer support to the Sony CDROM driver.
Submitted by:	gj
1995-02-06 22:35:07 +00:00
Justin T. Gibbs 1bca1a0922 Have version number track CSV version number. No other change. 1995-02-03 17:18:44 +00:00
Poul-Henning Kamp d1544fa9af Fix the include path to scdreg.h. 1995-01-30 05:29:03 +00:00
Jordan K. Hubbard e9dd2c6798 Second version of this driver.
Submitted by:	Mikael Hybsch <micke@dynas.se>
1995-01-29 22:51:41 +00:00
Jordan K. Hubbard 8ed9cf223f Nuke out a printf that otherwise spews crap at probe() time. A no-no. 1995-01-28 06:40:23 +00:00
Jordan K. Hubbard f40f848a55 Look for scdreg.h in the right place. Whoops. 1995-01-28 05:32:53 +00:00
Jordan K. Hubbard 4265ddc50f Add the soundblaster CDROM driver back in, but this time under the GPL
since the Linux driver was used as the principle reference.
Submitted by:	Mikael Hybsch <micke@dynas.se>
1995-01-28 04:18:42 +00:00
Justin T. Gibbs c135d93bbf aic7xxx.c:
Print out the length of the compiled sequencer program.

aic7xxx.seq:
	More optimizations.  Replace generic bcopy routine with bcopy_3
and bcopy_4 (ie unroll the loops) since these are the only two cases used.
Initialize SIMODE1 and SXFRCTL1 from the kernel in ahc_init instead of
at each selection/reselection since this is expensive and only needs to
be done once.  Condense function returns into previous instruction if possible.
Reorder some sections to kill superflous jumps.  These optimizations kill
the ~150k/s penalty adding support for Twin/Wide cards was costing since
the last place in the commaon path of execution where we had to do ugly,
convoluted testing for the type of card in the sequencer has gone away.
Next stop tagged queuing and target mode.
1995-01-22 00:46:53 +00:00
Justin T. Gibbs 0d56403998 At $Ids to all files. Have the sequencer use DMA to tranfer its SCB
(SCSI control block) instead of having the host PIO it down.  Also
reimplement WDTR and SDTR optimization to remove code in the sequencer
and place the responsibility of knowing when to initiate SDTR or WDTR
on the kernel driver.  This vastly shortens the sequencer program yet
yeilds the same performance.
1995-01-16 16:31:21 +00:00
Justin T. Gibbs 20c5e65572 Full support for 294x and Wide devices. Fixed month old bug in the SCSI
sense retrieval code that messed up CDROM devices.  This code will also
responde correctly to SDTR and WDTR messages from devices that start a
negotiation sequence.
1995-01-13 02:22:11 +00:00
David Greenman 0d94caffca These changes embody the support of the fully coherent merged VM buffer cache,
much higher filesystem I/O performance, and much better paging performance. It
represents the culmination of over 6 months of R&D.

The majority of the merged VM/cache work is by John Dyson.

The following highlights the most significant changes. Additionally, there are
(mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to
support the new VM/buffer scheme.

vfs_bio.c:
Significant rewrite of most of vfs_bio to support the merged VM buffer cache
scheme.  The scheme is almost fully compatible with the old filesystem
interface.  Significant improvement in the number of opportunities for write
clustering.

vfs_cluster.c, vfs_subr.c
Upgrade and performance enhancements in vfs layer code to support merged
VM/buffer cache.  Fixup of vfs_cluster to eliminate the bogus pagemove stuff.

vm_object.c:
Yet more improvements in the collapse code.  Elimination of some windows that
can cause list corruption.

vm_pageout.c:
Fixed it, it really works better now.  Somehow in 2.0, some "enhancements"
broke the code.  This code has been reworked from the ground-up.

vm_fault.c, vm_page.c, pmap.c, vm_object.c
Support for small-block filesystems with merged VM/buffer cache scheme.

pmap.c vm_map.c
Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of
kernel PTs.

vm_glue.c
Much simpler and more effective swapping code.  No more gratuitous swapping.

proc.h
Fixed the problem that the p_lock flag was not being cleared on a fork.

swap_pager.c, vnode_pager.c
Removal of old vfs_bio cruft to support the past pseudo-coherency.  Now the
code doesn't need it anymore.

machdep.c
Changes to better support the parameter values for the merged VM/buffer cache
scheme.

machdep.c, kern_exec.c, vm_glue.c
Implemented a seperate submap for temporary exec string space and another one
to contain process upages. This eliminates all map fragmentation problems
that previously existed.

ffs_inode.c, ufs_inode.c, ufs_readwrite.c
Changes for merged VM/buffer cache.  Add "bypass" support for sneaking in on
busy buffers.

Submitted by:	John Dyson and David Greenman
1995-01-09 16:06:02 +00:00
Justin T. Gibbs 8ff1d93efb Update the sequencer code to handle both channels of Twin channel devices.
You can now sling 14 devices off of a 274xT.  In the process of adding
twin channel support, I removed all evident restrictions on supporting
Wide channeled devices, but I do not have a Wide controller to test them
on.

aic7770_seq.h, the pre-compiled header, is no longer needed since config
handles this dependancy.
1994-12-31 19:26:54 +00:00
Bruce Evans e4bebee03e Use the same current time throughout ITIMES(). I want all current
timestamps for an atomic operation such as rename() on a local file
system to be identical.

Uniformize yet another idempotency ifdef.  The comment nesting was
bogus.
1994-12-27 13:59:14 +00:00
Justin T. Gibbs cb0d548bf4 Merge in latest Linux sequencer code release with my changes. This should
make the sequencer code fully compatible with the aic7870 (ie 294x adaptors).
I've also added to my local mods putting the sequencer into "FASTMODE" clock.
This gives upwards of 2M/sec write preformance improvement in some scenarios.
There haven't been any reports of this causing problems, and I have been
reaping the benifits of it for more than a week now.

This also includes a new version of the pre-generated file <ugh>

Obtained from: John Aycock (aycock@cpsc.ucalgary.ca) and myself
1994-11-29 23:04:23 +00:00
Justin T. Gibbs 8d244f9e3b Previous changes to the sequencer compiler backed out. We go back to
generating the .h file, and a pregenerated file is included.
1994-11-18 09:11:35 +00:00
Jordan K. Hubbard 9cc6cb724f Make the compiler spit out a .c file instead of a .h file. 1994-11-18 08:17:20 +00:00
Jordan K. Hubbard 1885873c70 Make this a precompiled script - don't bother autogenerating it.
It makes me crazy.
1994-11-18 08:16:59 +00:00
Jordan K. Hubbard 3363722633 Another file Justin missed. Hope this is the right one! :-(
I found it by hunting around in his home directory..
1994-11-18 05:40:07 +00:00
Justin T. Gibbs 0ef8c3017a John Aycock's aic7770 sequencer code and assembler. There is currently
a discussion going on about removing this code from the burden of the
GPL, but it won't happen before Beta, and this code should be tested
before release.

Supports 27/2842 class adaptec cards and is almost capable of supporting
aic7870 based adapters (294X series cards).  It does not support Wide
controllers or the second channel on Twin boards although I have work in
progress on getting both channels and running.

I have also added a few performance improvements to this version that give
us approximately a 25% boost over the original driver.  These patches have
been submitted to the author.

Obtained from: Linux aic7770 driver (John Aycock - aycock@cpsc.ucalgary.ca)
1994-11-17 20:19:10 +00:00
Poul-Henning Kamp 0f954e5d09 POSSIBLE BOGUS CODE found, (related to dos-partitions) in ufs_disksubr.c,
look for CC_WALL.
Cosmetics, a couple of unused vars.
1994-10-08 06:57:29 +00:00
David Greenman 824789192c Use tsleep() rather than sleep so that 'ps' is more informative about
the wait.
1994-10-06 21:07:04 +00:00
Bruce Evans f6d370a798 Fix the consistent mistranslation of Linux's get_fs_word() and
put_fs_word() to fuword() and suword().  Linux words are 16 bits
but BSD words are 32-bits, at least on vax's.  Writing a too-large
word trashed the neighbouring short word.

Bruce
1994-09-21 22:22:48 +00:00