summaryrefslogtreecommitdiffstats
path: root/sys/dev/si
Commit message (Collapse)AuthorAgeFilesLines
* Some warning cleanups. There were some needless casts that also causedpeter1996-09-271-15/+12
| | | | | gcc -Wcast-qual to scream. There's still quite a few left, but since I'm cleaning out my tree, I'll commit these now.
* Remove devconf, it never grew up to be of any use.phk1996-09-061-34/+1
|
* Extend the poll code so that it can periodically scan the host cardspeter1996-08-121-4/+11
| | | | | | | for work regardless of whether there was an interrupt. This needs more work, it should be able to run better when there are more than 3 host cards present, ie: all cards in polling-only mode with no IRQ. (The host cards have a choice of 3 irq's, 11, 12, or 15, or just polling)
* make si.c compile in kernels without COMPAT_43.peter1996-08-031-2/+5
|
* ttysleep() can return EWOULDBLOCK, not ETIMEDOUT as the comment in tty.cpeter1996-07-261-2/+2
| | | | | | suggests. Pointed out by: bde
* Apply a bandaid to a problem elsewhere in the driver, when the process ispeter1996-07-261-2/+5
| | | | | | | | blocked in a write() while waiting for the output to drain, sleep only for tp->t_timeout, not forever. This only seems to happen when there is either a modem lockup holding the hardware flow control down, or due to some problem in the driver with processes attempting to write after the modem has hung up (eg: elm, tf).
* Fix typo that prevented the initial/lock state devices from workingpeter1996-06-301-2/+2
| | | | correctly (accessing the lock device was not possible).
* When writing the settings for stop bits and output hardware flow control,peter1996-06-211-18/+24
| | | | | | | | | things tend to work better if you write the settings to the correct register.. (*blush*). This subtle bug has been haunting me for ages, and will solve a few problems that have been reported to me. Also, take a shot at fixing the serial BREAK processing, what was there before never really worked. (There is a PR on this I think)
* This time, get rid of the struct copies that were really causing gcc topeter1996-06-171-4/+4
| | | | | call memcpy.. It seems that gcc would not inline the implicit call when copying from a volatile...
* Fix cut/paste error; a read-only variable should have been read/write.peter1996-06-161-2/+2
|
* Clean up -Wunused warnings.gpalmer1996-06-121-8/+4
| | | | Reviewed by: bde
* Eliminate a struct copy that gcc doesn't inline and ends up as a call topeter1996-06-081-2/+2
| | | | memset().
* When estimating the time (in ms) left to drain the output queue basedpeter1996-05-301-4/+4
| | | | | | on the baud rate, dont get upset if it's been hung up by setting B0. Instead, sleep for a short time, as the host controller takes a while to go through the state changes.
* *blush* How did this slip through?peter1996-05-081-2/+5
| | | | | Fix a dynamic initialiser in a static variable, and make sure sysctl.h is #included.
* Change the logic of the interrupt/poll loop. It no longer loops untilpeter1996-05-051-4/+15
| | | | | | | | | | it empties all of the 256 byte incoming fifo, as it can spend more time processing one port than intended, especially if data is streaming in at 115.2K. The port fifo will be emptied and dumped into the tty system and left until next time. I've been running this for quite some time on one of my systems here. Also, if the tty layer is blocked or full it lets the hardware assert the flow control rather than loosing the data.
* Change the compiled-in polling parameters to a sysctl setting.peter1996-05-051-7/+11
|
* Switched from using devfs_add_sw() to using devfs_add_swf()scrappy1996-03-281-4/+4
| | | | Reviewed by: julian@freebsd.org
* Avoid local sprintfs and other printf'isms.phk1996-01-251-23/+16
|
* Use the new & improved printf rather than homegrown kludges.phk1996-01-161-9/+5
| | | | Proposed by: bde
* clean up si_dprintf a bit so that it uses vararg argument parsing that doespeter1996-01-091-6/+17
| | | | not cause warnings, and uses printf() to do a vprintf()-like output.
* Fix the number of ports created for devfs.. it had been only creatingpeter1996-01-021-2/+2
| | | | | | | enough nodes for the number of ports on the last module, not the number of ports _total_ that the driver is managing... Submitted by: Robert Sanders <rsanders@mindspring.com>
* Fix last "fix" - I had introduced a fencepost error.. :-(peter1996-01-021-2/+2
| | | | Happily pointed out by: julian :-)
* Fix up the DEVFS minor numbers that the Specialix driver registers...peter1996-01-021-7/+11
|
* Another shot at getting working si DEVFS entries.. Apparently, it didn'tpeter1995-12-161-10/+16
| | | | understand %02d in it's format string...
* Update the skeleton DEVFS code to match reality a little closer.. :-)peter1995-12-141-20/+11
|
* 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).
* Replaced nxmmap by nommap (if the mmap function gets called, then thebde1995-12-101-2/+2
| | | | device must be configured).
* 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-101-10/+10
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-2/+2
|
* Pass 3 of the great devsw changesjulian1995-12-081-40/+73
| | | | | | | | | | | | | | | | | | | | | | | 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.. :)
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+3
|
* Replaced #includes of <sys/user.h> by less gross headers, usuallybde1995-12-061-2/+3
| | | | | | | <sys/vm.h>. Many device drivers need only the definition of vtophys() from vm. Added nearby #includes of <sys/conf.h> where appropriate.
* aargh! I tested JREMOD, only to discover that the "good oil" part ofpeter1995-12-041-3/+3
| | | | it for si.c was accidently inside some #ifdef DEBUG code....
* 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-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | 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/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 */
* Removed all #includes of the unused file <sys/device.h>.bde1995-11-281-2/+1
|
* Mainly cosmetic cleanups... It now uses more consistant message reportingpeter1995-11-283-27/+29
| | | | | on the console, and no longer uses "SLXOS" which I suspect may be a trademark... (I'm not sure, but this is not really a SLXOS driver anyway)
* Sync the public source with what I'm currently running.peter1995-11-092-148/+208
| | | | | | Most of this is cleaning up, but there are some functional changes, doc/comment improvements, error checking, gcc -Wall cleanups. Input buffer flushing is enabled now, although I'm still not quite certain it's right.
* Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up thebde1995-11-041-2/+1
| | | | | | | | | | 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-2/+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.
* Remove unused functions and variables, make things static, and other cleanups.phk1995-10-281-5/+3
|
* Remove bogus #include <sys/device.h>, and the bogus instances ofpeter1995-10-211-22/+11
| | | | | "struct device" and the bogus unit number mentioned in the error message. Some other minor cleanups, all trivial.
* Add some hooks visible from outside via nlist, so pstat can read the ttypeter1995-09-221-5/+8
| | | | state.
* Remove the "Danger will robinson!" printf's at the start. I'm pretty happypeter1995-09-221-9/+1
| | | | | | with the driver's stability now. I've not had a single problem with it for weeks.. All that remains is a bit of performance tuning, and finishing the manpages.
* From Bruce Evans: (prototype related changes, other cleanups)peter1995-09-131-8/+20
| | | | | | | | | | | | | | | Add prototypes. Use static for function definitions to match existing prototypes. Otherwise leave functions that should be static as extern. TODO: declare everthing except sidriver and siintr as static. I use some new cdevs registration functions to do this for syscons and pcvt. Fix siintr() to match its prototype in ioconf.c (don't return anything). This may break the eisa support, but Julian says that eisa interrupts never worked anyway. (EISA support was never tested anyway - Peter) Submitted by: bde
* Move some kernel-only stuff to a kernel-only file.peter1995-09-131-12/+1
| | | | Submitted by: bde
* Restore two checks for TS_ISOPEN.. I managed to panic my machinepeter1995-09-111-3/+5
| | | | | without them.. I thought TS_CONNECTED implied TS_ISOPEN, but apparently that's not the case.
* Fix some outstanding bugs in the DCD modem control..peter1995-08-221-115/+93
| | | | | | | | | | | Implement the slip/ppp "hotchar" detection to improve latency Debug the L_RINT bypass code.. Fix an interesting feature that caused 8-bit chars to loose their top bit in some circumstances.. This finishes the remaining outstanding problems that I'm aware of, with the exception of efficiency... Optimizing can come later after it's fully debugged.
OpenPOWER on IntegriCloud