summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio
Commit message (Collapse)AuthorAgeFilesLines
* Work around UMC8669F and Startech UART bugs by not writing to thebde1996-09-301-11/+36
| | | | | | | | | | | | | | 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.
* Changed cncheckc() interface so that it is 8-bit clean - return -1bde1996-09-141-2/+2
| | | | | | | | | 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.
* Remove devconf, it never grew up to be of any use.phk1996-09-061-64/+1
|
* some internal modems need LOTS of time to generate an interruptjulian1996-07-171-2/+2
| | | | on demand.. increase DELAY from 1000 uS to 10000uS
* Added support for TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).bde1996-06-171-36/+15
| | | | | | | | | | | | | | | | | | | | | | | 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.
* KGDB is dead. It may come back one day if somebody does it.phk1996-05-021-57/+1
|
* Format the already applied PCCARD additions to use KNF form. Nonate1996-04-231-42/+40
| | | | functional changes.
* Another try: fixed bogus change of the fifo settings for the non-speed of 0.bde1996-04-131-3/+3
| | | | | rev.1.30 incorrectly changed the behaviour from always disabling the fifo to always enabling it.
* Moved AUTO_EOI_[12] and most sio and pcvt options out of the makefile.bde1996-04-111-2/+4
|
* removed RS_IBUFSIZE #ifndef - have been informed it was a bad ideascrappy1996-04-101-3/+1
|
* Placed an #ifndef around RS_IBUFSIZE so that it can be changed in thescrappy1996-04-101-1/+3
| | | | | config file ... PR#528 is reportly fixed by adding 'options RS_IBUFSIZE=1024' to the config file
* Fixed ownerships of callout devices.bde1996-03-271-9/+13
|
* Added some delays to the probe. This might fix some incompatible UARTsbde1996-02-251-1/+4
| | | | | (the ones that take more than a few hundred nsec and less than 1 msec to switch their IRQ output).
* Avoid local sprintfs and other printf'isms.phk1996-01-251-22/+18
|
* Convert DDB to new-style option.wollman1996-01-041-1/+3
|
* Restored likely_com_ports[] from rev.1.122 so that Hayes ESP support atbde1995-12-301-1/+3
| | | | least compiles.
* Added support for the Hayes ESP serial card.bde1995-12-291-1/+120
| | | | | | Submitted by: Sean Eric Fagan (sef@kithrup.com) Based on code by John Vinopal (banshee@resort.com) Cosmetic (I hope) changes by me (bde).
* Fixed bugs introduced in rev. 1.127 (some broken 16650 support wasbde1995-12-221-70/+54
| | | | | | | | | | | | | | | | | | | | | | | unintentionally committed): - the fifo was completely disabled for low speeds. Apart from being unnecessarily inefficient, this invalidated com->tx_fifo_size. - `ftl' became a bogus name. - the 16650 probe breaks the COM_NOFIFO() case and has other bugs (disabled, not fixed). Fixed bogus change of the fifo settings for the non-speed of 0. This bug made the above fifo bug occur even at non-low speeds. Fixed the modes of the cua devices. It isn't possible to set the uid and gid correctly since the kernel can't know who uucp.dialer is. Register the devswitch at device attach time. SYSINIT() is not the right way to initialize devswitches (if anything :->). Eventually, the devswitch should be deregistered at device detach and/or unload time and reregistered at device attach time ... Then some com->gone tests could be removed. Cleaned up some other recent changes.
* Replaced nxreset by noreset (if the reset function gets called, then thebde1995-12-101-2/+2
| | | | | | | 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).
* Removed new alias d_size_t for d_psize_t.bde1995-12-101-2/+2
| | | | | | | | | | 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.
* Staticize and cleanup.phk1995-12-102-65/+47
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-2/+2
|
* Pass 3 of the great devsw changesjulian1995-12-081-36/+70
| | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
* Removed unnecessary #includes of <sys/user.h>. Some of these were justbde1995-12-061-2/+1
| | | | | | | to get the definitions of TRUE and FALSE which happen to be defined in a deeply nested include. Added nearby #includes of <sys/conf.h> where appropriate.
* Removed builtin list of port addresses. The address for sio3bde1995-11-291-10/+5
| | | | | | | | | | conflicted with S3 graphics cards. Now users should put sio[2-3] in the config file if the hardware exisst, even if the probe is certain to fail due to an interrupt conflict. Otherwise, ports sharing the interrupt may fail the probe if the system is warm booted while sio[2-3] are active (perhaps under another OS). The same problem for nonstandard ports is now handled better than before.
* If you're going to mechanically replicate something in 50 filesjulian1995-11-291-2/+2
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-11-291-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | That's EVERY SINGLE driver that has an entry in conf.c.. my next trick will be to define cdevsw[] and bdevsw[] as empty arrays and remove all those DAMNED defines as well.. Each of these drivers has a SYSINIT linker set entry that comes in very early.. and asks teh driver to add it's own entry to the two devsw[] tables. some slight reworking of the commits from yesterday (added the SYSINIT stuff and some usually wrong but token DEVFS entries to all these devices. BTW does anyone know where the 'ata' entries in conf.c actually reside? seems we don't actually have a 'ataopen() etc... If you want to add a new device in conf.c please make sure I know so I can keep it up to date too.. as before, this is all dependent on #if defined(JREMOD) (and #ifdef DEVFS in parts)
* the second set of changes in a move towards getting devices to bejulian1995-11-281-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | totally dynamic. this is only the devices in i386/isa I'll do more tomorrow. they're completely masked by #ifdef JREMOD at this stage... the eventual aim is that every driver will do a SYSINIT at startup BEFORE the probes, which will effectively link it into the devsw tables etc. If I'd thought about it more I'd have put that in in this set (damn) The ioconf lines generated by config will also end up in the device's own scope as well, so ioconf.c will eventually be gutted the SYSINIT call to the driver will include a phase where the driver links it's ioconf line into a chain of such. when this phase is done then the user can modify them with the boot: -c config menu if he wants, just like now.. config will put the config lines out in the .h file (e.g. in aha.h will be the addresses for the aha driver to look.) as I said this is a very small first step.. the aim of THIS set of edits is to not have to edit conf.c at all when adding a new device.. the tabe will be a simple skeleton.. when this is done, it will allow other changes to be made, all teh time still having a fully working kernel tree, but the logical outcome is the complete REMOVAL of the devsw tables. By the end of this, linked in drivers will be exactly the same as run-time loaded drivers, except they JUST HAPPEN to already be linked and present at startup.. the SYSINIT calls will be the equivalent of the "init" call made to a newly loaded driver in every respect. For this edit, each of the files has the following code inserted into it: obviously, tailored to suit.. ----------------------somewhere at the top: #ifdef JREMOD #include <sys/conf.h> #define CDEV_MAJOR 13 #define BDEV_MAJOR 4 static void sd_devsw_install(); #endif /*JREMOD */ ---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT #ifdef JREMOD sd_devsw_install(); #endif /*JREMOD*/ -----------------------at the bottom: #ifdef JREMOD struct bdevsw sd_bdevsw = { sdopen, sdclose, sdstrategy, sdioctl, /*4*/ sddump, sdsize, 0 }; struct cdevsw sd_cdevsw = { sdopen, sdclose, rawread, rawwrite, /*13*/ sdioctl, nostop, nullreset, nodevtotty,/* sd */ seltrue, nommap, sdstrategy }; static sd_devsw_installed = 0; static void sd_devsw_install() { dev_t descript; if( ! sd_devsw_installed ) { descript = makedev(CDEV_MAJOR,0); cdevsw_add(&descript,&sd_cdevsw,NULL); #if defined(BDEV_MAJOR) descript = makedev(BDEV_MAJOR,0); bdevsw_add(&descript,&sd_bdevsw,NULL); #endif /*BDEV_MAJOR*/ sd_devsw_installed = 1; } } #endif /* JREMOD */
* Restored static variable `nsio_tty' which is used only by pstat(8). Madebde1995-11-211-1/+3
| | | | | | | it `const' to inhibit compiler warnings. Added #include of <pccard/driver.h> to get prototypes. <pccard/slot.h> is still necessary for its side effect of exporting non-slot things.
* Fix compiler warnings.phk1995-11-201-21/+20
|
* Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up thebde1995-11-041-3/+2
| | | | | | | | | | misplaced extern declarations (mostly prototypes of interrupt handlers) that this exposed. The prototypes should be moved back to the driver sources when the functions are staticalized. Added idempotency guards to <machine/conf.h>. "ioconf.h" can't be included when building LKMs so define a wart in bsd.kmod.mk to help guard against including it.
* Moved prototypes for devswitch functions from conf.c and driver sourcesbde1995-11-041-11/+1
| | | | | | | to <machine/conf.h>. conf.h was mechanically generated by `grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The prototypes should be moved back to the driver sources when the functions are staticalized.
* sio.c:bde1995-10-221-32/+15
| | | | | | | | | | | | | | | | | | | | Fix the tests for being a console by reverting to the ones that were used before the the RB_SERIAL changes. RB_SERIAL only needs to be tested in one place. The initialization of comconsole was wrong before the RB_SERIAL changes for the COMCONSOLE case. This may have been the cause of the unnecessary changes. Start eliminating #includes of <i386/i386/cons.h>. This header is supposed to be included from <machine> although it should be completely machine-independent and included from <sys>. Remove a wrong XXX comment. `comconsole' is used to test for being a console and even the tests for deciding the default termios state are necessary (the semi-reentrant i/o routines don't handle ordinary device i/o). cy.c: Sync with sio.c. The console tests are present but always fail.
* A mixed bag of changes, relating to getting the state in "lsdev" right,phk1995-10-211-2/+10
| | | | and pccard support to work sensibly. Better by far, but still not good.
* siostop() is a void function, so don't return a value.dg1995-09-241-3/+3
|
* The stuff needed to remove a pccard with a sio port on it...phk1995-09-191-10/+68
| | | | Not optimal, but pretty solid.
* Andrew McRae's pcmcia/pccard code, the kernel part.phk1995-08-241-1/+119
| | | | | | | | This is still very green, but I have managed to get my modem working. Lots of work still to do, but now at least we can commit it. /phk Reviewed by: phk Submitted by: Andrew McRae <andrew@mega.com.au>
* Disable fifos in sioclose(). Closes PR 576.bde1995-08-131-1/+9
|
* Sleep on a better address to wait for output to drain out of thebde1995-07-311-2/+3
| | | | | | | | 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().
* Improve input flow control.bde1995-07-311-26/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't let IXOFF or ECHONL stop the setting of TS_CAN_BYPASS_L_RINT. IXOFFbde1995-07-291-7/+5
| | | | | 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.
* Always wake up writers after clearing TS_BUSY. This will soon bebde1995-07-291-7/+4
| | | | | | | | | 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().
* Obtained from: partly from ancient patches of mine via 1.1.5bde1995-07-221-10/+4
| | | | | 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.
* Move the inline code for waking up writers to a new functionbde1995-07-221-15/+2
| | | | | | | | | | | 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.
* Obtained from: partly from ancient patches of mine via 1.1.5bde1995-07-211-11/+1
| | | | | Move static termioschars() from a couple of drivers to tty.c. Now there is only one copy of ttydefchars[].
* Fix error logging:bde1995-07-051-4/+10
| | | | | - get the timeout countdown right - report everything before turning timeouts off.
* Fight with hanging modems continued:ache1995-06-281-1/+8
| | | | | return EIO after t_timeout expired instead infinite looping in "siotx" in comparam, consuming CPU time.
* Reduce timeout frequency from `hz' to 0 if no ports are open or to 1 ifbde1995-06-251-142/+236
| | | | | | | | | | | | | | | | | | | | | 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.
* Remove trailing whitespace.rgrimes1995-05-301-12/+12
|
* Fix -Wformat warnings from LINT kernel.rgrimes1995-05-111-2/+2
|
OpenPOWER on IntegriCloud