Commit Graph

931 Commits

Author SHA1 Message Date
Joerg Wunsch
54e98df56b Increase the DELAY_GETREPLY to 5000000. Not dangerous, this is
actually a timeout only.  The existing behaviour caused a

  mcd0: timeout getreply

at halt/reboot time.

Submitted by:	graichen@sirius.physik.fu-berlin.de (Thomas Graichen)
1995-08-15 19:56:59 +00:00
Peter Wemm
1cf4903ecd Slight change to the location of the default termios flags to make them
a little easier to change, and revert to the "standard" specialix behavior
with CRTSCTS enabled in the initial cflag (but configurable).
1995-08-13 15:44:37 +00:00
Peter Wemm
bb65956af3 Next round of cleanups. Some more debugging hooks added, si_softc definition
moved to the driver proper, so that <machine/si.h> can be #included by user
programs without needing to include stuff from /sys/i386/isa..
Various (now) redundant features removed, eg: the locks on IXANY and HWFLOW
as these are now done with the "initial" and "lock" termios devices.
Note that it still (for reasons unknown) appears to be masking data to
7-bit with ppp - hence the cleanup to support the debugging via 'sicontrol'
1995-08-13 15:18:05 +00:00
Bruce Evans
6097a1e94f Disable fifos in sioclose(). Closes PR 576. 1995-08-13 07:49:35 +00:00
Peter Wemm
f64003830d Remove a deliberate #warning.. It's not polite, because I listed the the
driver in i386/conf/LINT...
Reviewed by:
Submitted by:
Obtained from:
1995-08-10 08:48:34 +00:00
Peter Wemm
1d0be877a4 Drat! I forgot to add this part of the Specialix Driver..
This is the firmware that is downnloaded onto the host card during boot.
Obtained from:Specialix International, via Andy Rutter <andy@acronym.co.uk>
1995-08-10 08:10:57 +00:00
Peter Wemm
b77990be3e Bring in my long-overdue version of the Specialix driver.
This was originally ported to BSDI by Andy Rutter <andy@acronym.co.uk>.
At the end of the day, this code has very little in common with Andy's
version, or the Specialix SYSV version.  Essentially it has been gradually
and almost completely rewritten, with LOTS of advice and inspiration from
Bruce Evans.  There are a couple of missing bits still, but they are minor.

The user-mode "sicontrol" program is in sad shape and will come in soon.
Transparent printing died a timely death.. Maybe later..

Jeremy Rolls @ Specialix (Development directory) has confirmed this is OK
to distribute, and Andy personally sent me his version that I started from.

Although this driver stood up to a nasty stress-test in this form, I am not
confident that there are no nasty bugs lurking.

People are welcome to try it, but dont go out and buy one just yet.. :-)
And *DONT* use it on a mission-critical machine... This is ALPHA QUALITY!
1995-08-09 13:13:47 +00:00
John Dyson
302cf5869a Fixed a problem that malloc(..,..,M_NOWAIT) was being called without checking
for return values.  It just so happens that in the cases where it is likely
to fail, it is okay to change the M_NOWAIT to M_WAITOK -- and all will
be well.  This problem was manfest as a panic very regularly on a 4MB
system right after bootup.
1995-08-08 05:14:40 +00:00
Andrey A. Chernov
f49f5fa852 Allow any speed from 0..76800
Reviewed by:
Submitted by:
Obtained from:
1995-08-02 10:17:35 +00:00
Jordan K. Hubbard
d660e3ae8d Sync to author's Version 1.3.
Submitted by:	james
1995-08-01 07:07:42 +00:00
Bruce Evans
7922019b1c Eliminate the use of TS_TIMEOUT and ttstrt(). These are for handling
tab delays etc.  pcvt was using them to recover from a (rarely lost)
race.  Use a little more locking to avoid the race.
1995-07-31 21:35:17 +00:00
Bruce Evans
1856afe955 Sleep on a better address to wait for output to drain out of the
hardware.  Set the sleep-on flag for the address so there is more
than a small chance that the sleep address is actually used (this
used to work by timing out).  Don't bother clearing the sleep-on
flag after a timeout here or elsewhere since leaving it set just
generates a few null calls to wakeup().
1995-07-31 21:10:36 +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
f3b37f91c1 Improve input flow control.
Use input buffer watermarks of TTYHOG-512 (high) and (high)*7/8
(low) instead of TTYHOG/2 (high) and TTYHOG/5 (low) to agree with
some drivers.  512 is magic and some things depended on TTYHOG/2
>= TTYHOG-512 to work; now they depend on the 512 magic not changing
and TTYHOG-512 being significantly larger than 0.  This should be
handled in ttsetwater().

Separate the decision about whether to do input flow control from
doing it.  ttyblock() now just starts input flow control (hardware
and/or software) and there is a new function ttyunblock() to stop
it.  The decisions are the same except for the watermark changes
and allowing for input expansion for PARMRK.

When flushing input, try harder at first to send a start character
if required, but give up if the first attempt fails.

cy.c, rc.c, sio.c:
Simplify: let ttyinput() handle input flow control if it is not
being bypassed.  Use ttyblock() to start flow control otherwise.

rc.c:
Use same input flow control test as elsewhere: test in a more
efficient order and start flow control at >= highwater instead of
at > highwater.
1995-07-31 18:29:51 +00:00
Peter Dufault
c8bb1269a8 Return the correct number of I/O ports as part of the probe so that the
conflict resolution works.
1995-07-31 09:38:21 +00:00
Bruce Evans
d49c99ba9c Fix enough of the recently introduced brokenness for LINT to compile.
The U6850* changes in sound_config.h are probably wrong.

Recent commits lost:
- include paths.
- copyrights.
- cvs Ids.
- infamous whitespace changes.
- other cosmetic changes.
1995-07-29 14:20:54 +00:00
Paul Richards
73f0203186 The lemac driver didn't pass transmitted packets to bpf. Now it does.
Reviewed by:
Submitted by:
Obtained from:
1995-07-29 13:00:17 +00:00
Bruce Evans
28f8db1403 Eliminate sloppy common-style declarations. There should be none left for
the LINT configuation.
1995-07-29 11:44:31 +00:00
Bruce Evans
611c22c117 Don't let IXOFF or ECHONL stop the setting of TS_CAN_BYPASS_L_RINT. IXOFF
is handled at a low level, and ECHONL only applies if ICANON is set,
although tty.c sometimes bogusly applies it when ICANON isn't set.
1995-07-29 08:33:13 +00:00
Bruce Evans
4ce7d32178 Always wake up writers after clearing TS_BUSY. This will soon be
essential when I fix excessive wakeups for output-below-low-water.
In cy.c and sio.c, wake up via the driver start routine to also
eliminate duplicated code involving the clearing of TS_TTSTOP.

Always (except in code to be replaced soon) call driver start
routine directly instead of going through ttstart().
1995-07-29 04:05:57 +00:00
Jordan K. Hubbard
8000cec155 This file got left out for some reason - merge it in with the rest of
the VOXWARE 3.05 stuff.
Submitted by:	Amancio Hasty and Jim Lowe
Obtained from: Hannu Savolainen
1995-07-28 23:37:32 +00:00
Jordan K. Hubbard
ae28ee13b4 Update the sound driver to VOXWARE 3.05 with one GUS patch from
Amancio.  There is some SoundSource support here that is primitive and
probably doesn't work, but I'll let the two submitters let me know
how my integration of that was since I don't have this card to test.
I've only tested this on my GUS MAX since it's all I have.

This all probably needs to be re-done anyway since we're widely variant
from the original VOXWARE source in the current layout.
Submitted by:	Amancio Hasty and Jim Lowe
Obtained from:  Hannu Savolainen
1995-07-28 21:40:49 +00:00
David Greenman
c5bb0d718c Fixed bug where a bogus packet length could cause a panic if the length
was less than sizeof(struct ed_ring).
1995-07-28 12:15:16 +00:00
Bruce Evans
3e3de3f369 Change bogus extern inline' to static inline'.
This finishes making the kernel compile without -O.

The "optimized" asm version of the function being inlined
(translate_bytes()) uses slow instructions.  On a 486, assuming
everything is in the cache (unlikely), it is 21/15 times slower
than the dumb C version and 21/3 times slower than the best
possible bytewise method.
1995-07-25 23:03:22 +00:00
Bruce Evans
1c85ed9abd Change memcmp() to bcmp(). memcmp() isn't declared or implemented
for the kernel, but gcc provides an inline version of it if the
kernel is compiled with -O.
1995-07-25 22:18:56 +00:00
Bruce Evans
e150a6d25b Restore the the fix in revision 1.23 that was blown away by a later commit:
remove unused variable `u_char bt_scratch_buf[256];'.
1995-07-25 16:06:06 +00:00
Bruce Evans
3ba7df0ba7 First step of fixing the remaining sloppy common-style declarations.
Declare `cheat' as static.  It was bogusly shared between the aha1742 and
ultrastor drivers.

Even static variables should have unique names so that they can be
debugged, but fixing them can wait.
1995-07-25 15:53:11 +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
2ce42987d3 Obtained from: partly from ancient patches of mine via 1.1.5
Move static termioschars() from a couple of drivers to tty.c.  Now there
is only one copy of ttydefchars[].
1995-07-21 22:52:01 +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
Bruce Evans
1be9be9647 Fix compiler warnings (systm.h wasn't included). 1995-07-16 10:07:40 +00:00
Jordan K. Hubbard
2c3c9fc440 The following patch for v1.8 (2.0.5R) of seagate.c allows it to work with
Future Domain TMC-885 controllers. These beasts were just different enough in
a number of perverse ways to be recognised but not work with the seagate
stuff. I also whacked in blind transfers for DATAIN and DATAOUT phases - this
more than doubles my throughput. If you're dubious about that, comment out the
definition of SEA_BLINDTRANSFER. Anyway if you're running an ST01 or TMC-950
controller, please give this a go, I'd like to see if anything's broken for
those beasts.

Submitted by:	Stephen Hocking <sysseh@devetir.qld.gov.au>
1995-07-13 15:01:38 +00:00
Bruce Evans
d800e06858 Fix races in scstart(). q_to_b() wasn't called at spltty(), so there
were two races:
- q_to_b() might unexpectedly return 0 (e.g, after a keyboard signal
  flushes the output queue and isn't echoed).  ansi_put() interprets
  0 bytes as 4GB...
- more output (e.g. for echoes) might arrive afer q_to_b() returns 0.
  Then scstart() returns presumably and the new output might not be
  handled for a long time.

Remove unused function scxint().

Fix prototypes (foo() isn't a prototype).
1995-07-11 18:34:30 +00:00
Bruce Evans
f2fb20ef41 Speed up the inner loop of ansi_put() by a few percent.
syscons' output is now only about 4-5 times slower than I want.
It loses a factor of 2 for scrolling output by unnecessarily copying
the screen buffer, a factor of 4/3 for dumb OPOST processing, and
a factor of 3/2 for clist processing.
1995-07-11 17:59:22 +00:00
Jordan K. Hubbard
15c761840a Release summary: (detailed descriptions in Edit History in matcd.c)
Adds support for non-Sound Blaster host adapters, including those
distributed by Reveal, Lasermate, IBM, Media Vision, Crystal and others.
The driver automatically senses the correct adapter type and you can
have both in the system at the same time.
(This change should eliminate a few complaints.)

Corrected bit-masking problem that prevented use on SB Vibra-16 boards.

Declared some internal data and functions static that should have been
that way all along.

Documentation changes reflect the new hardware support and change the
appearance version to 2.0.5 (was 2.1).    Nice and tidy.   :-)


Beta testers have verified functionality on SB16, Vibra-16, Media Vision
and Reveal adapters.   -Wall still shows no warnings.

                                        Frank Durda IV
                                        uhclem%nemesis@fw.ast.com
Submitted by:	Frank Durda IV <uhclem%nemesis@fw.ast.com>
1995-07-11 03:03:47 +00:00
Bruce Evans
42854d0eac Multiplex the soft tty interrupt some more to support the cy driver.
This should be configured better, perhaps by providing a software
interrupt and mask bit to go with every hardware interrupt.
1995-07-05 14:35:34 +00:00
Bruce Evans
aa96081f8b Fix error logging:
- get the timeout countdown right
- report everything before turning timeouts off.
1995-07-05 14:30:07 +00:00
Bruce Evans
94ec1fba9a Rewrite:
- use pseudo-dma
- provide the same features and interface as sio
- support multiple boards
- fix bugs.

Some compile-time configuration constants are set to support higher
speeds and Cyclom-16Y's at a 30% relative cost in efficiency.
Cyclom-16Y support is untested.
1995-07-05 12:15:52 +00:00
David Greenman
9f77221854 Protected entire epioctl routine with splimp(). In this case, it is better
form to do this than it is relying on individual subroutines (the logic
in epioctl is itself very minimal). Ideally, unnecessary splimp()'s should
now be removed if they exist; I'll leave this for a later date (a complete
code review of the driver needs to be done). Fixes a bug I noticed that
would show up when ifconfig'ing the interface down.
1995-07-05 07:21:34 +00:00
Justin T. Gibbs
6b172e59a6 First pass cleanup of this driver. This pass does not include the sequencer
optimizations I have been working on yet, but does bring in some bug fixes
and performance improvments that were easy to regression test:

Setup the data fifo threshold and bus off timing correctly for 27/284x cards.
Users of these adapters with fast periferals (greater than 5MB/s) will notice
a big performance difference. (Sometimes as large as going from 3.7->8.3MB/s).

Fix handling of the active target flags.  Some of the outbs where missing
the base offset in the abort code.  The abort code still needs lots of work.

Support 3940 controllers, but only with 16 SCBs for now.  Eventually I'll
add support for all 255, but I need to find a tester for the code first since
we have to enable the cards external SRAM to do this.

Add Dan Eischen's serial eeprom reading facilities.  This allows the 2940
adapters to pull additional information left over from SCSI-Select right out
out of the configuration seeprom.

If the BIOS is disabled on 274x controllers, reset all target parameters
to there defaults since you can't rely on what is stored in scratch ram.

Report motherboard controllers as such.

Stick the first SG address and count into the SCB data and count areas for
all transfers in preparation of a later sequencer optimization.

Keep track of which targets can are allowed to have the disconnection
priveledge since this will be handled by the kernel driver in the future.

If a target issues a message reject in response to a tagged message,
disable tagged queuing for that target.  Some seagates say they can do
tagged queuing, but lie, and its a shame to have to disable tagged queuing
on all devices just because you have one that can't cope.
1995-07-04 21:14:45 +00:00
Stefan Eßer
d2a2d5ec41 The PCI config mechanism 1 test failed for the Intel Aries.
Make it less strict ...

Submitted by:	NIIMI Satoshi <sa2c@and.or.jp>
1995-06-30 16:11:42 +00:00
Andrey A. Chernov
5575abefeb Fight with hanging modems continued:
return EIO after t_timeout expired instead infinite looping in "siotx"
in comparam, consuming CPU time.
1995-06-28 17:58:14 +00:00
Stefan Eßer
0847c06d2e PCI configuration mechanism now determined by a method, that doesn't
fail on new hardware (Compaq Prolinea and Compaq Prosignea), and that
doesn't erroneously identify old mech. 2 chip sets as using mech. 1.
(See section 3.6.4.1.1 of the PCI bus specs rev. 2.0)
1995-06-28 15:54:57 +00:00
Joerg Wunsch
85cd1fc590 The BT scsi driver has recently had a message changed - it could be
clearer.  The "informational message" almost looks like an instruction to
the user to change settings on the card....

It's cosmetic, but...

Submitted by:	peter@haywire.dialix.com
1995-06-25 17:45:05 +00:00
Bruce Evans
33dc7e1b84 Reduce timeout frequency from `hz' to 0 if no ports are open or to 1 if
no ports are active, provided there are no polled ports and no
`LOSESOUTINTS' ports.  Do a little more in the interrupt handler instead.
This is a little less efficient if there are are many active ports but
a little more efficient otherwise.  Polled ports are ones with no irq
specified (as before).  `LOSESOUTINTS' ports are ones with 0x08 set in
their config flags.  Unless this flag is set, it will now take up to one
second to recover from lost output interrupts, if any.  Some 8250s and
16450s lose output interrupts.

Improve output buffering: copy the clist buffer to 2 linear buffers if
necessary and possible instead of to 1.  Handle an arbitrary queue of
buffers in the interrupt handler.  Check for waking up sleepers after
copying characters out of the clist buffer instead of before.

Delay translation of TIOCM_DTR to MCR_DTR etc. so that the top level
routines are more machine independent.

Fix bogus device register in unused code.
1995-06-25 04:51:01 +00:00
Doug Rabson
975c53c7b0 Add an option to the psm driver to skip the parts of the probe which break
some laptops with PS/2 mice.

Submitted by:	nsayer@quack.kfu.com
1995-06-22 10:56:56 +00:00
David Greenman
108b7c8091 Use ifr_mtu for the mtu value rather than ifr_metric. 1995-06-22 07:03:20 +00:00
David Greenman
381e6190c0 Change interface type...IFT_SLIP -> IFT_PARA. 1995-06-21 10:23:23 +00:00