Commit Graph

285 Commits

Author SHA1 Message Date
Matt Jacob
49c36ff4f3 fix it so it compiles on alpha again 1999-05-07 17:52:01 +00:00
Poul-Henning Kamp
46eede0058 Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw.  bdevsw() is now an (inline)
        function.

        Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
        to the order of the cmaj/bmaj arguments!)

        Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
        (ditto!)

(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
1999-05-07 10:11:40 +00:00
Kirk McKusick
e244fe31d6 Generalize to allow any serial port to be used as the GDB port.
Mark the GDB port in the config file with flags 0x80. Currently
only the sio driver checks these flags and sets up a GDB port,
but adding similar code to other serial drivers would be easy.
For backward compatibility, if an sio port is marked as the console
and no port is marked as the gdb port, the GDB port will be mapped
to the console port. This hack should go away at some point.
1999-05-07 06:50:41 +00:00
Peter Wemm
d5558c001a Fix up a few easy 'assignment used as truth value' and 'suggest parens
around && within ||' type warnings.  I'm pretty sure I have not masked
any problems here, I've committed real problem fixes seperately.
1999-05-06 18:44:42 +00:00
Poul-Henning Kamp
f711d546d2 Suser() simplification:
1:
  s/suser/suser_xxx/

2:
  Add new function: suser(struct proc *), prototyped in <sys/proc.h>.

3:
  s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/

The remaining suser_xxx() calls will be scrutinized and dealt with
later.

There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.

More changes to the suser() API will come along with the "jail" code.
1999-04-27 11:18:52 +00:00
Dmitrij Tejblum
b079102dc5 Modify the non-i386 version of disable_intr() and enable_intr() so that they
don't produce a warning on every use.
1999-04-24 10:41:21 +00:00
Peter Wemm
f3a865fb76 Merge missing changes from i386/isa/sioreg.h (PC98 related) 1999-04-18 14:37:47 +00:00
Peter Wemm
0dd2ac5462 Tidy up a few things left over from the conversion from i386/isa/sio.c.
Leave two #if 0'd notes about the way things used to be done for reference.
1999-04-18 14:35:28 +00:00
Doug Rabson
e2117e478b Register sio interrupts as fast (fixing some silo overflow messages). 1999-04-18 14:11:01 +00:00
Peter Wemm
007e69315a Merge up to rev 1.234 (nice revision number!) of i386/isa/sio.c. 1999-04-17 01:02:27 +00:00
Peter Wemm
c976cd3849 Merge up to rev 1.226 of i386/isa/sio.c 1999-04-17 00:37:01 +00:00
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Poul-Henning Kamp
4e2d2aa1cd Use suser() to check for super user rather than examining cr_uid directly.
Use TTYDEF_SPEED rather than 9600 a couple of places.

Reviewed by:	bde, with a few grumbles.
1999-01-30 12:17:38 +00:00
Peter Wemm
d17e4ee67d Update the pccard hooks to use a module style declaration instead. 1999-01-19 00:21:53 +00:00
Steve Price
921543cf2f Add support for another 3COM/USR PNP modem, USR3031. 1998-12-13 23:12:54 +00:00
Doug Rabson
08b6a4cbee * Add hooks to allow the X server to access I/O ports and memory.
* Update drivers to the latest version of the bus interface.

The ISA drivers' use of the new resource api is minimal.  Garrett has
some much cleaner drivers which should be more easily shared between
i386 and alpha.  This has only been tested on cia based machines.  It
should work on lca and apecs but I might have broken something.
1998-11-15 18:25:17 +00:00
Doug Rabson
6f19d636a6 Merge changes from i386/isa/sio.c up to revision 1.215. 1998-09-26 14:47:16 +00:00
Peter Wemm
d4a2828cde Underlying ,v files were copied and detagged. Re-commit old versions
onto the head revision.  (mainly using sys/bus.h etc for alpha)
1998-09-26 14:00:29 +00:00
Eivind Eklund
dfef928b1c Support PnP compatibility IDs. This allow e.g. the ed driver to pick
up any PnP NE2000 compatible card, instead of forcing us to always
update ID lists.

Submitted by:	Ugo Paternostro <paterno@dsi.unifi.it>
1998-09-13 22:15:44 +00:00
Bruce Evans
1fcee46997 Fixed printf format errors. 1998-08-23 10:16:26 +00:00
Bruce Evans
cf8c7b0963 Added D_TTY to the cdevswitch flags for all tty drivers. This is required
for the Lite2 fix for always returning EIO in dead_read().

Cleaned up the cdevswitch initializers for all tty drivers.

Removed explicit calls to ttsetwater() from all (tty) drivers.  ttsetwater()
is now called centrally for opens, not just for parameter changes.
1998-08-23 08:26:42 +00:00
Bruce Evans
9a02ad618f Fixed devfs initialization which I broke in the previous commit. 1998-08-20 05:12:48 +00:00
Bruce Evans
3fd2d29816 Enabled dynamically sized tty input buffers (with enough buffering
for 1 second's worth of input) and larger tty output buffers.  The
interrupt-level buffers are still too small for speeds above 115200
bps (only a little too small for 230400 bps if RTS flow control is
enabled).

Don't call ttsetwater() explicitly in open().  It is now called for
the TTYDISC l_open() and should be static.

Don't attempt to register the cdevsw more than once.
1998-08-19 04:17:38 +00:00
Bruce Evans
92971f1fd7 Register tty software interrupt handlers at run time using register_swi()
instead of at compile time using ifdefs.

Use _swi_null instead of dummycamisr.  CAM and dpt should call
register_swi() instead of hacking on ihandlers[] directly.
1998-08-11 17:01:32 +00:00
Bruce Evans
18da528d41 Changed %n to %r in devfs name format strings. %n has almost gone away. 1998-07-15 12:18:34 +00:00
Poul-Henning Kamp
e29bc9add4 Avoid some panics in sio_unload which gets called with various dirt
if the attach of a modem card failed.
1998-06-24 09:23:32 +00:00
Bruce Evans
eca52014bd Don't log "unexpected" events on never-opened devices. Events left
over from the probe are now expected for incompatible UARTs that
deliver IRQs as a strobe (low) instead of a level (high).

Discard events on going-away devices too.  Endless loops may have
been possible when an active pccard was removed.
1998-06-16 11:05:59 +00:00
Doug Rabson
ecbb00a262 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
Bruce Evans
12e1ed28e2 Force success of the probe (after doing it as before except in one
miscconfigured case) if the port is the console.  This fixes several
bugs:
- if all sioprobe()s failed, then the console driver followed null
  pointers in cdevsw[].
- if the sioprobe() for the console failed but another sioprobe()
  succeeded, then init hung early when the console couldn't be
  opened.
- it was silly for the console to not be there after printing boot
  messages on it.
Bugs introduced by this are hopefully no worse than old ones caused
by forcing the success of the `cn' level probe.
1998-06-03 12:30:10 +00:00
Bruce Evans
b76bb1d472 Fixed a printf() arg botch in the previous commit.
Only complain about an irq mismatch in the probe if the configured
irq doesn't become active, and then print the bitmap of irqs that
became active (including clock irqs) instead of just the first
(not including clock irqs).

Bugs reported by: msmith
1998-06-03 09:43:38 +00:00
Bruce Evans
cd55b8f46c Converted the ICU-level interrupt tests (3, 5 and 8) in sioprobe() into
a test of the irq number, and made failure of this test non-fatal.
Removed related unused complications for the APIC_IO case.  Removed the
no-test3 flag.

Deverbosified the failure messages for the other tests.  Removed the
per-port verbose flag - just use the general verbose flag.
1998-05-31 10:53:55 +00:00
Poul-Henning Kamp
d53fd54d9f LoadSoftModem() routine at sio.c does not trap general serial I/Os.
It fauls to probe eather DSI Modem or others.

PR:		4657
Reviewed by:	phk
Submitted by:	Kenji Saito <marukun@mx2.nisiq.net>
1998-05-20 06:46:58 +00:00
Poul-Henning Kamp
bdb8446393 The PnP code in 2.2.6 detects the Motorola ModemSurfer 56K,
but doesn't do much of anything with it.  I added it to siopnp_ids[]
and it was found and recognized as a serial port.

PR:		6605
Reviewed by:	phk
Submitted by:	Dave Marquardt <marquard@zilker.net>
1998-05-13 07:26:55 +00:00
Poul-Henning Kamp
b4362367e0 Detect USR PnP x2 modem.
PR:		6496
Reviewed by:	phk
Submitted by:	Kurt D. Zeilenga <Kurt@Boolean.NET>
1998-05-04 10:35:13 +00:00
Mike Smith
47959c89b9 PCCARD-code related style nits, as requested.
Submitted by:	bde
1998-02-27 06:39:32 +00:00
Mike Smith
9a70f9f75f Fix some style nits and remove an unused header.
Submitted by:	bde
1998-02-27 05:38:32 +00:00
Nate Williams
a021db1639 - If a PCCARD serial device is removed from the system, let the serial
driver 'break out' of the infinite loop waiting for a response from
  it.  This is a bad thing, but no worse than having the kernel hang.
1998-02-14 16:17:17 +00:00
Poul-Henning Kamp
a4daaa09f2 Implement the spirit but not the letter of Terrys hot-char patch.
The differences Terrys patch and this patch are:
 * Remove a lot of un-needed comments.
 * Don't put l_hotchar at the front of stuct linesw, there is no need to.
 * Use the #defines for the hotchar in the SLIP and PPP line disciplines
1998-02-13 12:46:28 +00:00
Eivind Eklund
7b778b5e61 Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.
This introduce an xxxFS_BOOT for each of the rootable filesystems.
(Presently not required, but encouraged to allow a smooth move of option *FS
to opt_dontuse.h later.)

LFS is temporarily disabled, and will be re-enabled tomorrow.
1998-01-24 02:54:56 +00:00
Atsushi Murai
844451dc95 1. Supporting a bogus 16550A compatible PCMCIA CARD stuffs
- IIR_TXRDY is never off even if reading a IIR register.
    - Know as PIAFS "Palido 321S", "DC-*S" oemed by Sharp corp.

 2. Omiting a restrict probing if it's already probed by pccardd.
    Note: Define a new id_flags as follows

           0x40000 - NO PROBE (Already probed as serial)
           0x80000 - Has a bogus IIR_TXRDY register

	Sato Junichi <junichi@astec.co.jp>
	Nrihiro Kumagai <kuma@slab.tnr.sharp.co.jp>
	Hirao Tetsuya <ai.cs.fujitsu.co.jp>
	Toshiharu Asai <asai@mbc.infoshere.or.jp>
	Shin'ya Kumabuchi <kumabu@t3.rim.or.jp>
        Freebsd-users-jp@jp.freebsd.org
	bsd-nomads@ai.cs.fujitsu.co.jp
1998-01-08 04:53:43 +00:00
Bruce Evans
88754aaf0e Fixed initialization of the divisor latch. We depended on siocnopen()
initializing it for the (usual) (siocniobase != 0) case, but
siocnopen() doesn't initialize it if the latch registers already
have the correct values.
1997-12-28 06:36:35 +00:00
Bruce Evans
e932603093 Always call ttwwakeup() before returning from comstart(). It isn't
necessary to call it when the tty layer's output state has not been
changed, but siostop() sometimes changes the TS_BUSY state and then
calls comstart() mainly for its side effect of calling ttwwakeup().
1997-12-28 06:20:47 +00:00
Eivind Eklund
5591b823d1 Make COMPAT_43 and COMPAT_SUNOS new-style options. 1997-12-16 17:40:42 +00:00
Bruce Evans
239b7b699e Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that are
not handled at a particular level.  This fixes mainly restarting
of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
1997-12-06 13:25:01 +00:00
Nate Williams
133c8c2f49 - Renamed <pccard/card.h> -> <pccard/cardinfo.h>.
Forgotten by:		me
Reminded by:		Bruce
1997-11-20 15:48:41 +00:00
Nate Williams
241fe562b4 - MF22: (I reversed these). Simplify code. 1997-11-02 21:26:14 +00:00
Nate Williams
075a76a29e - Instead of relying on a functional call to register PCARD-capable drivers,
use a Linker Set.  Note, if a driver is loaded as an LKM  if will have
  to use the function call, but since none of the existing drivers
  are loadable, this made things cleaner and boot messages nicer.

Obtained from:	PAO-970616
1997-10-26 21:08:42 +00:00
Nate Williams
8bb7a8fc95 - Functional changes to PCCARD support.
* Kill individual drivers 'suspend' routines, since there's no simple/safe
   way to suspend/resume a card w/out going through the complete probe
   at initialization time.
 * Default to using the apm_pccard_resume sysctl code, which basically
   pretends the card was removed, and then re-inserted.  Suspend/resume
   is now 'emulated' with a fake insert/removal.  (Hence we no longer
   need the driver-specific suspend routines.)
1997-10-26 04:54:16 +00:00
Nate Williams
e7e437dbfa - Do a bunch of gratuitous changes intended to make the code easier to
follow.
 * Rename/reorder all of the pccard structures, change many of the member
   names to be descriptive, and follow more closely other 'bus' drivers
   naming schemes.
 * Rename a bunch of parameter and local variable names to be more
   consistant in the code.
 * Renamed the PCCARD 'crd' device to be the 'card' device
 * KNF and make the code consistant where it was obvious.
 * ifdef'd out some unused code
1997-10-26 04:36:24 +00:00
Poul-Henning Kamp
a1c995b626 Last major round (Unless Bruce thinks of somthing :-) of malloc changes.
Distribute all but the most fundamental malloc types.  This time I also
remembered the trick to making things static:  Put "static" in front of
them.

A couple of finer points by:	bde
1997-10-12 20:26:33 +00:00
Justin T. Gibbs
02a199102d aha1542.c aic6360.c cy.c fd.c ft.c
if_ie.c if_wl.c if_zp.c isa.c isa_device.h
labpc.c mcd.c ncr5380.c scd.c seagate.c si.c
sio.c tw.c ultra14f.c wcd.c wd.c:

	Update for changes in the callout interface.

apic_vector.s icu_vector.s ipl.s ipl_funcs.c:

	Add CAM software/hardware interrupt support.
1997-09-21 21:41:49 +00:00
John-Mark Gurney
6a796ce0a1 teach sio how to attach to isa PnP cards. This is mainly for use with
internal modems.  Currently detects a USR modem, and a couple Supra
modems...  vendor id's for sio capabile cards welcomed...

document new option EXTRA_SIO that will increase sio's internal data
structures to support X more serial ports...  these are used by the
PnP part of sio for attaching...  If you don't have it specified, it
will default to 2...  This is defaulted to 0 if you don't have PnP
compiled into your kernel...

also document that if you set the PnP flags (pnp x flags y) to 0x1 that
the modem will be refused to be recognized by the sio driver... this
is for people that want the traditional isa driver to probe and attach
the modem... (for keeping legacy sio numbering)
1997-09-19 15:25:49 +00:00
Peter Wemm
35b8b2ddab Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
Steve Passe
1de995bb1f General cleanup of the sub-system locking macros.
Eliminated the RECURSIVE_MPINTRLOCK.
clock.c and microtime use clock_lock.
sio.c and cy.c use com_lock.

Suggestions by:	Bruce Evans <bde@zeta.org.au>
1997-09-01 07:45:37 +00:00
Steve Passe
adc91a77c1 Created a private simple_lock to control accesses to com data structs
and hardware.
There is now another simple_lock around clock data/hardware accesses in
clock.c and microtime.s.  It is my belief that this is the only area
sio/cy might stumble into during an unblocked INTerrupt.  Thus I separated
the sio/cy code from the generic disable_intr()/enable_intr() routines.

Controlled by smptests.h: USE_COMLOCK, ON by default.
1997-08-31 03:17:18 +00:00
Steve Passe
78292efeef Another round of lock pushdown.
Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel.
UP kernel expects that this is enough to guarantee exclusive access to
regions of code bracketed by these 2 functions.
Add a simplelock to bracket clock accesses in clock.c: clock_lock.

Help from:	Bruce Evans <bde@zeta.org.au>
1997-08-30 08:08:10 +00:00
Steve Passe
f2cf811ca6 Fixed a warning about undefined isa_irq_pending(). (UP kernel only) 1997-08-21 06:16:12 +00:00
Steve Passe
b3e4e390f6 Moved the COM_LOCK and COM_UNLOCK macros to machine/param.h. 1997-08-21 05:47:25 +00:00
Steve Passe
7b185ef809 Preperation for moving cpl into critical region access.
Several new fine-grained locks.
New FAST_INTR() methods:
 - separate simplelock for FAST_INTR, no more giant lock.
 - FAST_INTR()s no longer checks ipending on way out of ISR.
sio made MP-safe (I hope).
1997-08-20 05:25:48 +00:00
Steve Passe
9d37772f68 Added include of intr_machdep.h to eliminate compiler warning for APIC_IO. 1997-08-04 19:12:54 +00:00
Bruce Evans
f71d35e402 Removed unused #includes. 1997-07-20 14:10:18 +00:00
John Dyson
955bc15107 Add some support for the 16650 type UARTS. 1997-07-17 06:01:15 +00:00
Paul Traina
5ea6cb03f3 Bring back CONSPEED as a last-ditch default if you can't change the speed
any other way.

Requested by: dfr
1997-06-04 16:25:15 +00:00
Paul Traina
2334749d02 If the boot blocks were using the serial port, read the system console
speed using the boot blocks, instead of a hardcoded value stuck in the
kernel.  This way, you can have systems using the same kernel but different
console speeds.

Add a sysctl entry for changing the system console speed.
Lock the user tty speed to match the system console speed.

Nuke CONSPEED.
Reviewed by:	bde
1997-06-04 04:52:40 +00:00
Poul-Henning Kamp
55d2795997 I've given up on the idea of sizing FIFO's. You can set it with a flag
value now, if you know that you have a fifo deeper than 16.
1997-06-01 20:42:01 +00:00
Peter Wemm
7a14de6260 No longer need opt_smp.h here 1997-05-29 05:00:35 +00:00
Poul-Henning Kamp
468d825d86 Whoops, missed a zero there. Flags 0x10000 it is. 1997-05-18 21:22:11 +00:00
Poul-Henning Kamp
e12ca851a6 Flags 0x1000 on sio now disables the dreaded test#3.
PR:		3395
1997-05-18 21:19:04 +00:00
Poul-Henning Kamp
8463cf03a9 Detect various supersets of 16550A based on fifo depth.
PR:		i386/3523
Reviewed by:	phk
Submitted by:	vak@cronyx.ru
1997-05-18 20:53:52 +00:00
Peter Wemm
477a642cee Man the liferafts! Here comes the long awaited SMP -> -current merge!
There are various options documented in i386/conf/LINT, there is more to
come over the next few days.

The kernel should run pretty much "as before" without the options to
activate SMP mode.

There are a handful of known "loose ends" that need to be fixed, but
have been put off since the SMP kernel is in a moderately good condition
at the moment.

This commit is the result of the tinkering and testing over the last 14
months by many people.  A special thanks to Steve Passe for implementing
the APIC code!
1997-04-26 11:46:25 +00:00
Bruce Evans
63e32a69f2 Don't call timeout() for DTR wakeup or busy check if the relevant timeout
is already active.  This fixes "timeout table full" panics under 100%
interrupt load and other weird conditions.
1997-04-18 18:28:09 +00:00
Bruce Evans
24bb2ffb15 Removed defaults for dead options CONADDR and CONUNIT. 1997-04-05 13:15:50 +00:00
Bruce Evans
de09b61a0c Use device flags instead of options for serial console configuration
(see LINT).  There is a new low-level console type that is more suitable
for use with gdb-remote.

Fixed setting of speed at probe time for the serial console (if any).

Reviewed by:	dfr
1997-04-05 13:11:27 +00:00
Bruce Evans
fce002fdef Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include
it when it is not used.  In most cases, the reasons for including it
went away when the special ioctl headers became self-sufficient.
1997-03-24 11:25:10 +00:00
Bruce Evans
3ac4d1ef0c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.
Fixed everything that depended on getting fcntl.h stuff from the wrong
place.  Most things don't depend on file.h stuff at all.
1997-03-23 03:37:54 +00:00
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Bruce Evans
d1adf9f099 Fixed the SMC fifo bug fix. sioopen() hung while input was streaming in
with <= 100 usec between each character arrival time.  This didn't happen
until rev.1.75 of clock.c because DELAY(100) used to delay for closer to
80 usec than 100 usec, and the minimum time between character arrivals is
87.8 usec at the maximum supported speed of 115200 bps 8N1.

Clear DCD timestamp flag on close (the input timestamp flag is already
cleared).
1997-02-01 16:04:16 +00:00
Bruce Evans
160da193e0 Fixes and workarounds for Hayes ESP:
- don't uselessly initialize the fifo "DMA" bit at attach time.
- initialize the fifo "DMA" bit at open time.  Without this, the device
  interrupts for every character received, reducing input performance
  to that of an 8250.
- don't uselessly initialize the fifo trigger level to 8 (scaled to
  256) at attach time.
- don't scale the fifo trigger level to 512 bytes.  The driver's pseudo-
  dma buffer has size 256, so it can't handle bursts of size 512 or 256.
  It should be able to handle the second lowest ftl (2 scaled to 64).
- don't reset the fifos in siostop().  Reset triggers a hardware bug
  involving wedging of the output interrupt bit  This workaround
  unfortunately requires ESP support to be configured.
1997-01-29 21:50:02 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
b75504fdc2 Use breakpoint() instead of Debugger() in siointr1(). Debugger() doesn't
work in fast interrupt handlers because it calls db_printf() which uses
%es for string stuff and %es isn't initialized.
1996-12-23 19:57:33 +00:00
Bruce Evans
c252c2507e Fixed input of BREAKs when IGNPAR is set and IGNBRK is not set. BREAKs
are always together with Framing Errors and they were incorrectly
treated as FE's and discarded.

Reorganized the BREAK/FE/PE tests.

Found by:	NIST-PCTS
1996-11-30 15:52:56 +00:00
Bruce Evans
eea9b0845f Reset h/w fifos (if any) in siostop(). Now ttyflush() works fairly well
with sio devices (not perfectly, since there is no way to flush the tx
holding register on 8250-16450's.  I'm not sure if resetting the fifos
flushes the tx shift register).

Reminded by:	NIST-PCTS
1996-11-30 15:29:31 +00:00
Bruce Evans
4670f800ec Fixed sloppy clearing of TS_BUSY. Don't clear it until the transmitter
is completely empty.  There is no interrupt for output completion, so
poll for it every 10 ms after output is nearly complete.  Now ttywait()
works right.

Reminded by:	NIST-PCTS
1996-11-30 15:19:19 +00:00
Bruce Evans
38e81cedcf Throw away input if CREAD is not set. POSIX requires no characters to be
received in this case even if the hardware doesn't have a CREAD bit.

Found by:	NIST-PCTS
1996-11-30 15:03:05 +00:00
Bruce Evans
9924e17950 Cleaned up CONSPEED changes. `comdefaultrate' gives the default
speed for the "com" console, not for general purpose "com" ports,
so there was no need to split it into comdefaultrate and condefaultrate.
1996-11-30 14:51:04 +00:00
Bruce Evans
750059bbc5 Don't fiddle with RTS if RTS flow control is off. This gives applications
almost complete control over RTS (control of its initial value is still
missing).

This fixes PR 1644 for sio.

The author of PR 1644 wants it in 2.1.6 and 2.2.  This may be safe since
the complications are only in rarely used cases that I hope I've covered.
1996-11-13 18:31:57 +00:00
Paul Traina
39daae723d add in CONSPEED option which controls console serial port speed 1996-11-02 02:26:06 +00:00
Bruce Evans
92d0aa20dc Work around UMC8669F and Startech UART bugs by not writing to the
divisor latch registers if the registers wouldn't change.

Use the default console cfcr setting while setting the divisor
latch registers for console i/o.  Input may be messed up by
transiently changing the cfcr.

Use a usual cfcr setting while setting the divisor latch registers
in the probe.  This shouldn't matter, but this is not the place to
test the UART's handling of 5 bit words.

Removed a stale devfs comment.
1996-09-30 12:22:27 +00:00
Bruce Evans
daed6ffd24 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

syscons.c:
Added missing spl locking in sccncheckc().  Return the same value as
sccngetc() would.  It is wrong for sccngetc() to return non-ASCII, but
stripping the non-ASCII bits doesn't help.
1996-09-14 04:27:46 +00:00
Poul-Henning Kamp
bfbb029d87 Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
Julian Elischer
75d050aeaa some internal modems need LOTS of time to generate an interrupt
on demand.. increase DELAY from 1000 uS to 10000uS
1996-07-17 22:07:23 +00:00
Bruce Evans
7d64a7fe80 Added support for TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).
Original version by John Hay.

Simplified timestamp code by reading the time exactly when necessary.
This may slow down the interrupt handler with extra calls to microtime(),
but only in bad configurations - the input fifo should normally be
disabled if timestamps on input are being used, since otherwise the
timestamp won't be precisely associated with any particular input event.
The interrupt handler remains slowed down by one test and branch for
each input (and now DCD change) event - avoiding this is not practical
yet.

The simplifications also fixed:
- timestamps for input sometimes being clobbered by output and modem
  status interrupts.
- valid timestamps not being available unless the port is configured with
  vector siointrts.  siointrts no longer exists.
- compiler warnings about siointr* in some configurations.

Simplified timestamp and probe code by depending on recent changes in
microtime() and DELAY() to preserve the interrupt enable flag.
1996-06-17 14:23:39 +00:00
Poul-Henning Kamp
a8c5fef5e6 KGDB is dead. It may come back one day if somebody does it. 1996-05-02 09:34:51 +00:00
Nate Williams
e12ac36c96 Format the already applied PCCARD additions to use KNF form. No
functional changes.
1996-04-23 18:36:56 +00:00
Bruce Evans
aef18d6ed7 Another try: fixed bogus change of the fifo settings for the non-speed of 0.
rev.1.30 incorrectly changed the behaviour from always disabling the fifo
to always enabling it.
1996-04-13 14:55:18 +00:00
Bruce Evans
3745f80a48 Moved AUTO_EOI_[12] and most sio and pcvt options out of the makefile. 1996-04-11 21:18:49 +00:00
Marc G. Fournier
6d4bca5b8a removed RS_IBUFSIZE #ifndef - have been informed it was a bad idea 1996-04-10 18:09:58 +00:00
Marc G. Fournier
f4f119017f Placed an #ifndef around RS_IBUFSIZE so that it can be changed in the
config file ... PR#528 is reportly fixed by adding 'options RS_IBUFSIZE=1024'
to the config file
1996-04-10 04:18:36 +00:00
Bruce Evans
6c4591a089 Fixed ownerships of callout devices. 1996-03-27 20:03:32 +00:00
Bruce Evans
3b3bedbc0e Added some delays to the probe. This might fix some incompatible UARTs
(the ones that take more than a few hundred nsec and less than 1 msec to
switch their IRQ output).
1996-02-25 21:10:54 +00:00