Commit Graph

74 Commits

Author SHA1 Message Date
Bruce Evans
976d09b9f2 Untangled the Cyclades offsets a little. CY16_RESET and CY_CLEAR_INTR
were half of their physical offsets for ISA and 1/4 of their physical
offsets for PCI, while all other Cyclades offsets were physical/1 for
ISA and physical/2 for PCI.  Logically wrong macros were used to scale
CY16_RESET and CY_CLEAR_INTR to the correct physical offsets.

Fixed some style bugs (mostly long lines).
1998-11-23 13:58:55 +00:00
Bruce Evans
a84c84f5b0 Reduce i/o overheads by not preserving the channel access register in
interrupt handlers.  Instead, load and use it atomically as necessary.
This reduces mode switching overhead for "polled" mode interrupt handling
from 5 i/o's to 3 (per service type, per port) so that polled mode is only
slightly more inefficient than "interrupt" mode.
1998-11-22 17:40:32 +00:00
Bruce Evans
fe310de802 Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c.  Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato
1998-10-22 05:58:45 +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
4a74956bf7 Fixed devfs initialization which I broke in the previous commit.
Fixed an old name and disorder in the sio dictionary.
1998-08-20 05:21:50 +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
87543489d0 Cleaned up previous commit, mainly by moving repetitive calculations
of invariants to cyattach().

Fixed minor bugs:
- cyparam() returned without restoring the ipl in the error cases.  This
  was harmless because cyparam() is always called at spltty().
- one check for "rev. J or higher" actually checked for precisely rev. J.
1998-08-13 19:03:22 +00:00
Bruce Evans
fc64b69498 Updated for not-so-new version of Cyclom-Y boards (with 60MHz clock and
swapped RTS/DTR).  Merge the vendor's modification of the 2.2.6-release
version into -current for reference.  Will be cleaned up in next commit.

Obtained from:	ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/2.2.6/cyy226.tar.gz
1998-08-13 13:54:10 +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
7010319f16 Fixed sign extension bugs awoken by changing speed_t to an unsigned
type.  19200, 1200 and other relatively uninteresting speeds were
broken.

Submitted by:	Rob Mallory <rmallory@qualcomm.com>
1998-07-29 18:48:20 +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
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
David Greenman
4d88b7963a Protect against count of chars received being 0, which causes a panic
otherwise. Can apparantly happen with some firmware revs.

Submitted by:	Kouichi Hirabayashi <kh@mogami-wire.co.jp>
1998-03-18 20:52:28 +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
Bruce Evans
abee4d9808 YAMFsio.c (always call ttwwakeup() before returning from comstart()). 1997-12-28 06:23:03 +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
Bruce Evans
326b780b04 Fixed chip_offsets[] which I broke in rev.1.53. The offsets aren't
actually offsets, they are offsets scaled by dividing by 2^cy_align.
I use different values for cy_align since the -current values are
unnaturally scaled, so I need different offsets, and the wrong
offsets got committed.

Reported by:	nnd@itfs.nsk.su (N.Dudorov)
1997-11-10 15:46: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
Peter Wemm
35b8b2ddab Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
Bruce Evans
ef4ce80f95 Cleaned up revs 1.36-1.40 (mainly disordered declarations, non-bogus
indentation (it is supposed to be bogus to match sio.c), and long lines).
1997-09-03 01:50:24 +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
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
b3e4e390f6 Moved the COM_LOCK and COM_UNLOCK macros to machine/param.h. 1997-08-21 05:47:25 +00:00
Steve Passe
a2c1225d0e Attempt to make cy.c MP-safe.
I have no way of testing this one, first SMP/cy user please let me know...
It is my belief that sio and cy are the only FAST_INTR() ISRs.  If this
is a bad assumption please educate me.
1997-08-20 06:16:44 +00:00
Bruce Evans
f71d35e402 Removed unused #includes. 1997-07-20 14:10:18 +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
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
2c5136653b Fixed handling of modem status changes. Only the most common case of
connect/hangup in !CLOCAL mode was handled correctly.  mgetty and ppp
didn't work because they turn on CLOCAL and poll for carrier (or RI?).
1996-12-05 12:43:30 +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
David Greenman
a309908dc3 Fixed a bug that got introduced when I changed the CY16_RESET and
CY_CLEAR_INTR definitions. This might have affected probing of ISA
versions of the Cyclom 16/32-Y.
1996-10-14 16:43:11 +00:00
David Greenman
6fd560f670 Make this compile again for the CyDebug case. 1996-10-14 16:10:00 +00:00
David Greenman
7a28c2a8cd Change DEVFS device naming convention for cuac*, ttyc*. 1996-10-13 01:30:32 +00:00
David Greenman
3010cd6550 Changes to add support for the PCI version of the Cyclades Cyclom-Y
serial adapter, and support for multiple Cyclom controllers.
1996-10-13 01:09:24 +00:00
David Greenman
d41fe60984 Oops, missed a chunk in that last commit. 1996-10-04 14:17:32 +00:00
David Greenman
1c41fd74b9 Implemented a more sophisticated mechanism for finding the chip iobase
so that 32Y boards will work.
Fixed bogus indenting and added a pair of parens.
1996-10-04 10:33:13 +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
Bruce Evans
98a51b2b94 Synced with sio.c: added support for TIOCDCDTIMESTAMP and simplified
timestamp code.
1996-07-30 19:50:37 +00:00
Gary Palmer
c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +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
Bruce Evans
6c4591a089 Fixed ownerships of callout devices. 1996-03-27 20:03:32 +00:00
Poul-Henning Kamp
e8cbe8fa47 Avoid local sprintfs and other printf'isms. 1996-01-25 07:21:50 +00:00
Bruce Evans
526d7a354a Synced with sio.c. This fixed the DEVFS initialization. cy.c is
supposed to be identical with sio.c for hardware-independent details.
1995-12-22 15:02:22 +00:00
Bruce Evans
81ab2caf0a Replaced nxreset by noreset (if the reset function gets called, then the
device must be configured.  It's hard to tell whether a reset function
should be noreset or nullreset since reset functions are never called.
Most drivers use nullreset but noreset has the advantage of complaining
if somehow gets called).
1995-12-10 20:54:38 +00:00
Bruce Evans
26ec204be0 Replaced nxmmap by nommap (if the mmap function gets called, then the
device must be configured).
1995-12-10 20:34:53 +00:00
Bruce Evans
c73feca0b7 Removed new alias d_size_t for d_psize_t.
Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and
d_devtotty_t.

Sorted declarations of switch functions into switch order.

Removed duplicated comments and declarations of nonexistent switch
functions.
1995-12-10 15:55:34 +00:00
Poul-Henning Kamp
d2f265fab8 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00