Commit Graph

95 Commits

Author SHA1 Message Date
thorpej 221edc1cb1 Define and use zsccf_channel as an alias for cf_loc[ZSCCF_CHANNEL]. 2004-06-20 18:07:35 +00:00
simonb 2763a4b916 Fix NTP PPSAPI support (enabled with "options PPS_SYNC"):
From PR kern/13702 from Charles Carvalho.  Tested on alpha and
i386 with a Laipac TF10 PPS-capable GPS.  The com.c change was
copied wholesale from Charles' z8530tty.c patch.
2004-01-23 05:01:19 +00:00
keihan b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr c372874b88 More changes for providing lwpid for ktrace (sparc GENERIC built) 2003-06-29 09:56:28 +00:00
pk be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
pk a22484a1ea zs_shutdown: lower IPL before sleeping. Also note the fact that the
effectiveness of that very tsleep() call is dubious at best.
2003-01-24 20:46:45 +00:00
wiz 7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
thorpej 73f78d5e61 Fix signed/unsigned comparison warnings. 2002-11-09 18:52:20 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej e9d707fbd5 Use CFATTACH_DECL(). 2002-09-30 21:17:57 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
ad d5a6fc237b Deal with the strange SCC wiring on TC IOASIC machines. Thanks to Bill
Studenmund and Jonathan Stone for useful comments.
2002-09-24 13:23:31 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
lukem a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
lukem d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
thorpej 18e25d5feb Add a flag to suppress SCC reset at attach time.
From Rafal K. Boni.
2001-05-11 01:40:48 +00:00
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
tsutsui 06237a6a03 Add some delay in zstty_attach() to wait previous console output
to complete before hardware initialization.
2001-03-12 15:46:56 +00:00
wdk 688a84b1b2 Add missing \n during probe if port is dedicated to kgdb 2001-03-11 09:06:09 +00:00
eeh faa5920bd2 Use the MI console magic sequence framework. 2000-11-08 23:13:03 +00:00
chs b6b3ee8657 remove what looks to be a bit of leftover debug code. 2000-11-05 23:00:10 +00:00
eeh 2a860a3de9 Adapt to the new line discipline scheme. 2000-11-01 23:54:57 +00:00
toshii faf55ac40c Change tiocm_to_{com,zs}'s second argument to u_long to match with
the type in their caller.
2000-09-17 22:07:39 +00:00
thorpej cb450cc444 Use device_lookup(). 2000-07-06 01:47:34 +00:00
pk 321bc31690 Remove spurious splx() call. 2000-04-14 20:33:48 +00:00
hannken 43e3ea96f3 Fix typos from last commit (callout). 2000-03-24 11:46:46 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
pk 6d04005134 Check for console input and output separately.
XXX - split input/output for /dev/console is not yet supported.
2000-03-19 12:42:45 +00:00
jdc 797ac20035 Add power management hooks. 2000-03-14 21:20:51 +00:00
jonathan 0588cdfc88 Update user-level PPS-API to match -05 draft.
Change PPS_<xxx> ioctls to PPS_IOC_<xxx>.
1999-11-04 05:33:58 +00:00
jonathan b31080319e Fix nanosecond/microsecond botch in PPSAPI:
remove bogus TIMESPEC_TO_TIMEVAL() after applying any {assert,clear} offset.
1999-10-15 06:16:15 +00:00
pk c3f1aa0d3e Don't send any data upstream if we're not open yet. 1999-04-22 20:37:37 +00:00
wrstuden df93e67c02 PPS support. Copied off of com.c support, with changes as DCD interupts
are only enabled if needed and if ok'd by MD layer.
1999-03-27 01:22:36 +00:00
mycroft 568f4aa704 Minor changes to tiocm code. 1999-02-03 23:51:06 +00:00
mycroft b63b0fd80b Redo the N previous changes, plus a couple of other things:
* Move the printf() delay to just after the printf(), where it actually makes
  sense.
* Use zstty_stint() and zstty_softint() from zsparam(), to force an immediate
  update of the carrier and flow control status.  Abuse this in the attach and
  open functions to defer all of that work.  This insures that we don't lose
  any status updates.
* Don't screw with register 1 when closing the console.
* Fix bugs in TIOCM??? (stay semicolon, clearing DTR while transmitting).
* Add comments in a couple of places.
1999-02-03 20:15:51 +00:00
wrstuden 36c50aaa14 Add the patch I floated on tech-kern. Andreas Eltrich <elchy@dahoam.de>
says it got pppd working for him.
1999-01-31 21:41:00 +00:00
wrstuden ccf442a971 Fix thinko in part of rev 1.53.
Thanks to Scott for pointing this out to me (I got his mail and figured out
this change before seeing the discussion on tech-kern) and to Charles for
the initial explanation.
1999-01-25 17:53:13 +00:00
christos e79b8222a6 Put back modem control ioctl's 1999-01-13 11:55:20 +00:00
wrstuden f0559087e0 Changes to deal with mac serial ports having clock sources on DCD or CTS.
- When doing a first open, don't enable receive & status interupts before
	the MD layer has had a chance to set things up.
- Enable logic to only enable DCD/CTS interupts if we are looking for/
	expecting interupts on those pins. Disable otherwise.
- in zs_param, only pass up the state of ZSRR0_DCD if we have enabled
	interupts on that pin.

Henry Hotz (<hotz@jpl.nasa.gov>) and Greg walsh <gwalsh@artec.com> have
tried these changes to get certain printers from hanging at boot. They
work in a 1.3.2 kernel for Greg.
1998-11-23 22:10:09 +00:00
drochner 1693b8b4a6 minor changes to console handling in zstty_attach():
-wait 20ms between printf() and reconfiguring the hardware
-set cn_tab->cn_dev here because this is the place where the real minor
 number is known
1998-10-01 18:52:42 +00:00
cgd d58173741d kill the last remnants of __BROKEN_INDIRECT_CONFIG. (only the pica port
used it, and it's non-working and apparently slated for replacement.)
1998-08-31 22:28:04 +00:00
wrstuden b1bb9aa490 Oops. We do still need to set t_dev in the first open part of zsopen,
so we get ttyXX vs cuaXX right. Leave the initialization in attach.
1998-08-09 18:36:45 +00:00
wrstuden 26e55969e4 Initialize the struct tty's t_dev field at attach rather than first open.
The attach routine calls zsparam if we're setting up the console, and
zsparam needs this field to tell which zstty to set up. Otherwise, we
set up zstty0 even if it's not the console!
1998-08-09 06:17:07 +00:00
mycroft d4da63c6c3 Eliminate cs_heldchar. It is not necessary in my version of the driver. 1998-03-30 02:41:21 +00:00
mycroft 2bb5067e13 Move the code to wait for carrier on a tty into a common function, since it
depends only on device-independent state bits.
Implement SunOS-style `dialout' devices.
1998-03-22 00:55:37 +00:00
mycroft 834a8ac07a Fix pasto. 1998-03-21 04:31:10 +00:00