Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/amiga/dev/ser.c
RevisionDateAuthorComments
 1.86  26-Oct-2022  riastradh ddb/db_active.h: New home for extern db_active.

This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
 1.85  04-Oct-2022  rin Remove unused extern declaration of constty.
 1.84  21-Oct-2021  andvar fix various typos, mainly in comments, but also in man pages and log messages.
 1.83  25-Jul-2014  dholland branches: 1.83.8; 1.83.18;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.82  16-Mar-2014  dholland branches: 1.82.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.81  22-Jan-2014  christos gcc-4.8.x unused variable fixes
 1.80  27-Oct-2012  chs branches: 1.80.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.79  24-Apr-2011  rmind branches: 1.79.4; 1.79.14;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.78  11-Jun-2008  tsutsui branches: 1.78.18; 1.78.24;
Use device_private() and device_lookup_private() to get softc.
 1.77  19-Nov-2007  ad branches: 1.77.14; 1.77.16; 1.77.18; 1.77.20; 1.77.22;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.76  04-Mar-2007  christos branches: 1.76.2; 1.76.18; 1.76.20; 1.76.24; 1.76.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.75  01-Oct-2006  elad branches: 1.75.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.74  01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.73  23-Jul-2006  ad branches: 1.73.4; 1.73.6;
Use the LWP cached credentials where sane.
 1.72  14-May-2006  elad integrate kauth.
 1.71  11-Dec-2005  christos branches: 1.71.4; 1.71.6; 1.71.8; 1.71.10; 1.71.12;
merge ktrace-lwp.
 1.70  06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.69  07-Aug-2003  agc branches: 1.69.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.68  23-Oct-2002  jdolecek branches: 1.68.6;
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
 1.67  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.66  01-Oct-2002  aymeric . treat a stream of framing errors as a single break
. trigger ddb upon receiving a break if we are the console
 1.65  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.64  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.63  06-Sep-2002  gehenna 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.
 1.62  17-Mar-2002  atatat branches: 1.62.4;
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.
 1.61  28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.60  27-Jan-2002  aymeric make sure we have CLOCAL set and HUPCL unset when the serial port is used as
a console.
 1.59  26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.58  05-Nov-2001  aymeric branches: 1.58.2;
defopt SERCONSOLE
 1.57  30-May-2001  lukem branches: 1.57.2; 1.57.4; 1.57.6;
add missing #include "opt_kgdb.h"
 1.56  02-May-2001  scw 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.
 1.55  13-Jan-2001  aymeric branches: 1.55.2;
Make these compile again, plus minor aesthetic changes.
 1.54  02-Nov-2000  eeh Adapt to new line discipline scheme.
 1.53  27-Apr-2000  is Fix thinko in fix for fix for cf_unit abuse.
 1.52  14-Apr-2000  is Make this work again after the last changes...
remember, folks, potential Amiga console devices run autoconfiguration
_twice_.
 1.51  07-Apr-2000  aymeric Prevent serial port from hanging when used as both console and terminal.
 1.50  16-Mar-2000  kleink Kill more broken cf_unit bogons.
 1.49  22-Jul-1998  is branches: 1.49.14;
Back out previous change. It breaks Seyon in a non-obvious way.
 1.48  18-Jul-1998  is Precompute lots of bitmasks etc. in serparam(). Results in slightly better
(but I suspect, insignificant) performance, and also prepares for 8bit +
parity support.
 1.47  07-Jul-1998  is The INTF_RBF bit of INTREQ is mirrored in SERDAT. As we would read this
register anyway when the bit is set, we can safe one of the (slow) custom
chip accesses by using this bit.
Sounds ridiculous, but at a hardware FIFO depth of 1 and ~1 usec per
access (at IPL 5) it might help the highspeed addicts.
 1.46  29-Jun-1998  is Synchronize shadow ciab.pra variable on first open.
 1.45  26-Jun-1998  is Fix a problem with bogus hangups that Thorsten Frueauf has reported.
 1.44  11-Apr-1998  is Make ser.c compile again (preliminary release). It needs still a lot of
cleanup, but at least mainstream usage should be possible again (worked
for me 5 minutes ago).
 1.43  12-Jan-1998  thorpej Adjust for changes to config.
 1.42  04-Oct-1997  mhitch Use a global variable to hold the current speed of the internal serial port.
This will be used by certain SCSI drivers to limit the length of DMA transfers
when the serial port is running at higher speeds. GVP and Phase5 DMA
interfers significantly with CPU execution, and significantly increases
receive buffer overruns (silo overflow). Reducing the DMA transfer length
can reduce the overruns.
 1.41  21-Sep-1997  is Deal with HUPCL, closing (but in a different way than proposed) PR 1010.
 1.40  18-Sep-1997  mhitch Read the received data register before clearing the RBF interrupt. Clearing
RBF appears to also clear the OVRUN bit in the receive data, resulting in
the loss of of overflow status.
 1.39  23-Dec-1996  veego branches: 1.39.10;
Get rid of __BROKEN_INDIRECT_CONFIG.
 1.38  13-Oct-1996  christos backout previous kprintf change
 1.37  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.36  02-Sep-1996  mycroft tty stop functions really should return void, not int, and certainly not both.
 1.35  06-Jun-1996  mhitch Add tty_attach() calls for pstat -t. Closes PR #2519
 1.34  27-Apr-1996  veego branches: 1.34.4;
Make the compiler happy if you make a kernel with -Wall
 1.33  23-Apr-1996  is Protect two critical lines of ser.c with splser(). Without this, a
race condition exists which makes the internal serial drop incoming
characters under heavy load.
 1.32  23-Apr-1996  is Changed the speed calculations of the Amiga-builtin-serial driver to
allow any baudrate the hardware allows, and to forbid two baudrates
(50 and 75) which the hardware does NOT support but which the old
speed conversion table pretended to support.
 1.31  21-Apr-1996  veego - Cleanup for -Wall and -Wstrict-prototypes
- Added support for multiple floppy drives
- CyberVision64:
- has now a real console mode
- another bugfix for boards with the new S3 chip
- Ariadne:
- fixed crashes with aeput (mbuf failure)
 1.30  17-Mar-1996  mhitch Clean up typos and other errors from new device attachment changes.
 1.29  17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.28  30-Nov-1995  jtc merge in changes from 1.1 release branch
 1.27  23-Apr-1995  chopps branches: 1.27.2;
bring up-to-date with recent conf.c and sunos changes.
 1.26  12-Feb-1995  chopps Many changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
Now use amiga HW for soft interrupts, non-contig options (2 or many chunks),
interrupt handler lists, 4066 ethernet, 1291 scsi, option to defer level 6
interrupts to level 4 (deal with icky built-in serial port)
 1.25  28-Dec-1994  chopps consolidate the zbusses. le support for multiple tx buffs and full use of 32k
RAM. AGA dbl PAL mode added for console. Many changes to siop--most not
yet done. All from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.24  01-Dec-1994  chopps bring up to current. change sun to sunos. handle changes in device
open params and autoconf match function params.
 1.23  26-Oct-1994  cgd new RCS ID format.
 1.22  06-Oct-1994  chopps branches: 1.22.2;
fix flow control and a couple bugs. from:
niklas@appli.se (Niklas Hallqvist) and
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.21  31-Aug-1994  chopps cleanup diagnostic messages
 1.20  16-Jun-1994  chopps fix boot diag output.
 1.19  04-Jun-1994  chopps started out cleaning up amiga_init.c ended up touching alot of files.
 1.18  22-May-1994  chopps an ide driver and hack reload device to do symbols.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.17  16-May-1994  chopps remove uneeded function from ser.c and fix common bad arg to sbicintr() in ahsc
and atzsc
 1.16  11-May-1994  chopps general cleanup including boot diag messages.
 1.15  08-May-1994  chopps resistance is futile, you will be assimilated.
amiga goes: config.new *and* /sys/scsi.
clock code coerced into a single .c file adding an accurate usec delay().
disklabel.c updated to DTRT, code to write RDB's to be added soon.
sbic (old scsi) converted over to new scsi and config this covers about
90% of users. Other drivers soon.
 1.14  22-Apr-1994  chopps update to deal with ttyflags from tsarna@endicor.com (Ty Sarna),
major design changes by me which include shrinking of ring buffer
size from 16k to 256 bytes and removing code that realloced the
clists for the tty from default to 8192 (was using 24k) suggested
as suggested by theo.
 1.13  30-Mar-1994  chopps remove dlists.h oops.
 1.12  28-Mar-1994  chopps some scsi changes, 4M system hack, and a boot messgae addition. from
Michael Hitch.
 1.11  17-Feb-1994  chopps modified to use generic cons. (and some grf defs changed)
 1.10  13-Feb-1994  chopps cleaned up include's relocated grf/* stuf to grfabs*.
 1.9  11-Feb-1994  chopps Add missing Id's
 1.8  11-Feb-1994  chopps ioctl's always pass proc.
 1.7  01-Feb-1994  chopps SCSI re-org, and misc. cleanup of compiler warnings.
 1.6  30-Jan-1994  chopps Re-enabled views, fixed warning in serial driver.
 1.5  26-Jan-1994  mw Integrate recent changes done to the amiga branch. Includes support
for the '40.
Support for more scsi controllers (zeus, magnum)
Support for more tapes (in st.c)
New custom chip console code integrated.
 1.4  30-Oct-1993  mw new tree for amiga, replacing the bogous previous one.
SunOS support works for a lot of executables now (static and dynamic).
 1.3  02-Sep-1993  mw new source release integrated from amiga-release.
 1.2  01-Aug-1993  mycroft Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
 1.1  05-Jul-1993  mw branches: 1.1.1;
Initial revision
 1.1.1.2  02-Sep-1993  mw Update of arch/amiga tree, includes
- realtime clock support for a2k and a3k
- scsi drivers for a2091 and gvp-II controllers in a2k
- working ethernet driver for a2065/ameristar lance-controllers
 1.1.1.1  05-Jul-1993  mw sys/arch/amiga tree. This is the machdep part required to get the kernel
up on an A3000. There are still (very) few changes required outside the
arch/amiga tree, so you can't recompile the kernel yet. Support for
third party SCSI controllers for the A2000 is on its way. The kernel is
fully functional (except for a missing ethernet-driver ...). This
tree is based on my version #390.
 1.22.2.2  06-Oct-1994  chopps fix flow control and a couple bugs. from:
niklas@appli.se (Niklas Hallqvist) and
osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.22.2.1  06-Oct-1994  chopps file ser.c was added on branch netbsd-1-0 on 1994-10-06 19:20:56 +0000
 1.27.2.2  23-Apr-1996  is Two fixes:
- add a missing splser()/splx() pair in ser.c. Without it, we used to
drop incoming characters under heavy load.
- delete the entries for 50 and 75 bps from the serspeedtab, as our
hardware doesn't support these speeds.
 1.27.2.1  20-Oct-1995  chopps take a couple devices from needs-count to needs-flag.
move tty pointers to softc structs
loadbsd now fails if it cannot allocate enough chipmem.
from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
 1.34.4.1  06-Jun-1996  mhitch Pull up from trunk:
> Add tty_attach() calls for pstat -t. Closes PR #2519
 1.39.10.2  14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.39.10.1  22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.49.14.3  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.49.14.2  22-Nov-2000  bouyer Sync with HEAD.
 1.49.14.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.55.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.57.6.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.57.4.2  13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.57.4.1  10-Oct-2001  fvdl Convert all remaining devices.
 1.57.2.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.57.2.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.57.2.2  11-Feb-2002  jdolecek Sync w/ -current.
 1.57.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.58.2.6  11-Nov-2002  nathanw Catch up to -current
 1.58.2.5  18-Oct-2002  nathanw Catch up to -current.
 1.58.2.4  17-Sep-2002  nathanw Catch up to -current.
 1.58.2.3  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.58.2.2  28-Feb-2002  nathanw Catch up to -current.
 1.58.2.1  05-Nov-2001  nathanw file ser.c was added on branch nathanw_sa on 2002-02-28 04:06:59 +0000
 1.62.4.1  16-May-2002  gehenna Add the character device switch.
Replace the direct-access to devsw table with calling devsw API.
 1.68.6.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.68.6.4  21-Nov-2004  skrll Adapt to branch.
 1.68.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.68.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.68.6.1  03-Aug-2004  skrll Sync with HEAD
 1.69.16.4  07-Dec-2007  yamt sync with head
 1.69.16.3  03-Sep-2007  yamt sync with head.
 1.69.16.2  30-Dec-2006  yamt sync with head.
 1.69.16.1  21-Jun-2006  yamt sync with head.
 1.71.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.71.10.3  13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.71.10.2  10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.71.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.71.8.2  11-Aug-2006  yamt sync with head
 1.71.8.1  24-May-2006  yamt sync with head.
 1.71.6.1  01-Jun-2006  kardel Sync with head.
 1.71.4.1  09-Sep-2006  rpaulo sync with head
 1.73.6.1  22-Oct-2006  yamt sync with head
 1.73.4.1  18-Nov-2006  ad Sync with head.
 1.75.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.76.26.1  08-Dec-2007  mjf Sync with HEAD.
 1.76.24.1  21-Nov-2007  bouyer Sync with HEAD
 1.76.20.1  09-Jan-2008  matt sync with HEAD
 1.76.18.1  21-Nov-2007  joerg Sync with HEAD.
 1.76.2.1  03-Dec-2007  ad Sync with HEAD.
 1.77.22.1  18-Jun-2008  simonb Sync with head.
 1.77.20.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.77.18.1  04-May-2009  yamt sync with head.
 1.77.16.1  17-Jun-2008  yamt sync with head.
 1.77.14.1  29-Jun-2008  mjf Sync with HEAD.
 1.78.24.1  06-Jun-2011  jruoho Sync with HEAD.
 1.78.18.1  31-May-2011  rmind sync with head
 1.79.14.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.79.14.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.79.4.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.79.4.1  30-Oct-2012  yamt sync with head
 1.80.2.1  18-May-2014  rmind sync with head
 1.82.2.1  10-Aug-2014  tls Rebase.
 1.83.18.1  27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.83.8.2  20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.83.8.1  19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@

RSS XML Feed