summaryrefslogtreecommitdiff
path: root/sys/dev/sio
Commit message (Collapse)AuthorAgeFilesLines
* Remove local hacks to set flags now that the device probe does this for us.Nate Lawson2004-10-141-4/+0
| | | | | | | | | | Tested on every device except sio_pci and the pc98 fd.c. Perhaps something similar should be done for the "disabled" hints also. MFC after: 2 weeks Notes: svn path=/head/; revision=136520
* Use generic tty code instead of local stuff.Poul-Henning Kamp2004-10-131-521/+79
| | | | | | | NB: device names are now consistent: {cua,tty}d$(port)[.lock,.init] Notes: svn path=/head/; revision=136478
* Use ttyconsolemode() to set the console tty modes.Poul-Henning Kamp2004-10-121-8/+1
| | | | Notes: svn path=/head/; revision=136450
* MFpc98: Check a pointer is NULL, remove unused variable.Yoshihiro Takahashi2004-09-201-3/+4
| | | | Notes: svn path=/head/; revision=135516
* Fix an issue with ng_tty which (ab)used the tty->t_sc field which isPoul-Henning Kamp2004-09-171-4/+6
| | | | | | | | | reserved for the device drivers: Add a t_lsc field for line discipline private use. Notes: svn path=/head/; revision=135406
* Use ttyalloc() instead of ttymalloc(NULL)Poul-Henning Kamp2004-09-171-1/+1
| | | | Notes: svn path=/head/; revision=135367
* Allocate tty at attach time rather than open time.Poul-Henning Kamp2004-09-161-49/+43
| | | | | | | | | | | Use the init/lock*in/out fields in struct tty and remove them from our softc. Use tty->t_sc to find out softc when convenient. Mostly OK'ed by: bde Notes: svn path=/head/; revision=135329
* If you insert a pccard modem and then eject it, you get a panic. ThisWarner Losh2004-07-221-1/+2
| | | | | | | | | | happens because the sio device was never opened and com->tp is therefore NULL. ttygone can't swallow a NULL, so guard against that possibility. Other places in this function make similar checks, so I believe this is correct. Notes: svn path=/head/; revision=132561
* Preparation commit for the tty cleanups that will follow in the nearPoul-Henning Kamp2004-07-151-2/+2
| | | | | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming. Notes: svn path=/head/; revision=132226
* Introduce ttygone() which indicates that the hardware is detached.Poul-Henning Kamp2004-07-111-38/+5
| | | | | | | Move dtrwait logic to the generic TTY level. Notes: svn path=/head/; revision=131981
* Update for the KDB framework. Sanitize the alpha console code now thatMarcel Moolenaar2004-07-101-209/+76
| | | | | | | | | | | | | | | | | | | | | it's in the way even more. Basicly: remove all alpha specific console support from gfb(4), sio(4) and syscons(4). Rewrite the alpha console initialization to be identical to all other platforms. In a nutshell: call cninit(). The platform specific code now only sets or clears RB_SERIAL and thus automaticly causes the right console to be selected. sio.c: o Replace the remote GDB hacks and use the GDB debug port interface instead. o Make debugging code conditional upon KDB instead of DDB. o Call kdb_alt_break() instead of db_alt_break(). o Call kdb_enter() instead of breakpoint(). o Remove the ugly compatibility of using the console as the debug port. Notes: svn path=/head/; revision=131939
* Define the tty methods as typedefs.Poul-Henning Kamp2004-06-301-3/+2
| | | | | | | | | Change the return type for t_break to void. Add t_ioctl (more about this later). Notes: svn path=/head/; revision=131373
* - Shorten the names for the TTY related swi interrupt handlers as theJohn Baldwin2004-06-281-2/+2
| | | | | | | | | | | 'tty:' prefix is largely redundant. - Fix the priority of the low-priority TTY SWIs that are hung off of the softclock thread. Submitted by: bde (2) Notes: svn path=/head/; revision=131242
* Guard against us having no tty pointer.Poul-Henning Kamp2004-06-271-1/+2
| | | | Notes: svn path=/head/; revision=131185
* Pick the hotchar out of the tty structure instead of caching privatePoul-Henning Kamp2004-06-261-6/+5
| | | | | | | | | | | copies. No current line disciplines have a dynamically changing hotchar, and expecting to receive anything sensible during a change in ldisc is insane so no locking of the hotchar field is necessary. Notes: svn path=/head/; revision=131134
* Use generic support for modemcontrol and BREAK ioctls.Poul-Henning Kamp2004-06-251-79/+64
| | | | Notes: svn path=/head/; revision=131094
* Remove the TIOCDCDTIMESTAMP option.Poul-Henning Kamp2004-06-221-12/+0
| | | | | | | | The RFC-2783 PPS-API (<sys/timepps.h>) provides better and more configurable service. Notes: svn path=/head/; revision=130938
* Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.Poul-Henning Kamp2004-06-211-0/+4
| | | | Notes: svn path=/head/; revision=130892
* Give control devices their own cdevsw{} so that we can eliminate themPoul-Henning Kamp2004-06-211-51/+111
| | | | | | | | | from the trafic functions. Do not use com_addr() when we don't need it. Notes: svn path=/head/; revision=130872
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-6/+6
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Deorbit COMPAT_SUNOS.Poul-Henning Kamp2004-06-111-2/+2
| | | | | | | | We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither a sparc32 port nor a SunOS4.x compatibility desire these days. Notes: svn path=/head/; revision=130344
* Add an entry to the PCI ID list to support the serial interface on theBill Paul2004-06-071-0/+1
| | | | | | | | | Broadcom 802.11g/GPRS CardBus card. Submitted by: Yann Berthier yb at sainte-barbe dot org Notes: svn path=/head/; revision=130194
* Centralize the line discipline optimization determination in a functionPoul-Henning Kamp2004-06-041-24/+4
| | | | | | | | | | | | called ttyldoptim(). Use this function from all the relevant drivers. I belive no drivers finger linesw[] directly anymore, paving the way for locking and refcounting. Notes: svn path=/head/; revision=130096
* Manual edits to change linesw[]-frobbing to ttyld_*() calls.Poul-Henning Kamp2004-06-041-2/+2
| | | | Notes: svn path=/head/; revision=130095
* Machine generated patch which changes linedisc calls from accessingPoul-Henning Kamp2004-06-041-8/+8
| | | | | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. Notes: svn path=/head/; revision=130077
* Make the remaining serial drivers call ttyioctl() rather than callingPoul-Henning Kamp2004-06-041-8/+3
| | | | | | | the linedisc directly. Notes: svn path=/head/; revision=130057
* There is no need to explicitly call the stop function. In all likelyhoodPoul-Henning Kamp2004-06-011-1/+0
| | | | | | | ->l_close() did it and ttyclose certainly will. Notes: svn path=/head/; revision=129939
* There is no need to explicitly call ttwakeup() and ttwwakeup() afterPoul-Henning Kamp2004-06-011-2/+0
| | | | | | | | ttyclose() has been called. It's already been done once by ttyclose, and probably once by the line-discipline too. Notes: svn path=/head/; revision=129937
* ttyclose() increments t_gen. Remove redundant increments in drivers.Poul-Henning Kamp2004-06-011-1/+0
| | | | Notes: svn path=/head/; revision=129934
* Fix disordering of pccarddevs.h noticed by bde. Also remove a fewWarner Losh2004-05-271-2/+2
| | | | | | | | | redundant includes and fix some of the include disordering. Submitted by: bde Notes: svn path=/head/; revision=129764
* Move to generating pccarddevs.h on the fly, both for the kernel andWarner Losh2004-05-261-1/+1
| | | | | | | | | | the modules. Also generate usbdevs.h automatically now, but a non-kernel file is stopping that at the moment. Notes: svn path=/head/; revision=129740
* Remove new options and my prevention of system freeze when the sio probeDoug Ambrisko2004-05-031-76/+49
| | | | | | | | | | returns okay when HW probe fails. This happens when comconsole flag is set but VGA console is used instead. Back out requested by: bde (He will be looking at other solutions from scratch) Notes: svn path=/head/; revision=128899
* Some enhancements and bug fix.Doug Ambrisko2004-04-301-49/+76
| | | | | | | | | | | | | | | | | | | | | - Define option FORCECONSPEED to force the serial console to be CONSPEED. I've run into a lot of boards in which the detect for prior speed doesn't work and ends up with broken console since it is at the wrong speed. - If a serial port is marked as a console, but console=vidconsole and if the serial ports doesn't exist it will be probed and attached at a 8250 chip. Then writes to that will freeze the system. - Add an option flags 0x400000 to mark this as a potential comconsole in-case the one flaged with 0x10 does not exist in the system. This makes it easier to deploy on systems with one or two serial ports. Obtained from: IronPort Notes: svn path=/head/; revision=128781
* Remove the sio EBus attachment, which never worked with an unpatchedThomas Moestl2004-04-301-114/+0
| | | | | | | | driver because sio(4) uses ISA-specific functions. uart(4) has full support for the respective hardware and should be used instead. Notes: svn path=/head/; revision=128771
* Back out last bad commit (again!)Warner Losh2004-04-071-12/+1
| | | | Notes: svn path=/head/; revision=128020
* Remove advertising clause from University of California Regent'sWarner Losh2004-04-073-13/+12
| | | | | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson Notes: svn path=/head/; revision=128019
* Last change was a bogusWarner Losh2004-04-071-12/+1
| | | | Notes: svn path=/head/; revision=127979
* Remove advertising clause from University of California Regent'sWarner Losh2004-04-071-1/+12
| | | | | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson Notes: svn path=/head/; revision=127977
* Back out code for auto-gdb detection that accidentally leaked into theNate Lawson2004-03-181-17/+5
| | | | | | | | | | bus_alloc_resource_any commit. Submitted by: bde Pointy-hat: njl Notes: svn path=/head/; revision=127157
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-7/+18
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Device megapatch 4/6:Poul-Henning Kamp2004-02-211-1/+2
| | | | | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
* Device megapatch 3/6:Poul-Henning Kamp2004-02-211-2/+0
| | | | | | | | | | | | | | | Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures. Notes: svn path=/head/; revision=126078
* Device megapatch 1/6:Poul-Henning Kamp2004-02-211-2/+0
| | | | | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
* Fixed a memory leak.Ruslan Ermilov2004-01-181-1/+3
| | | | | | | Submitted by: Stanford Metacompilation research group Notes: svn path=/head/; revision=124669
* Add detach methods so we can unload the sio module.Warner Losh2003-12-273-0/+3
| | | | Notes: svn path=/head/; revision=123910
* The record's stuck. The record's stuck. The record's stuck.Warner Losh2003-12-261-3/+0
| | | | | | | Remove a rendundant $FreeBSD$ Notes: svn path=/head/; revision=123850
* Fixed breakage of a check for boolean true by misusing NULL in rev.1.407.Bruce Evans2003-12-241-2/+2
| | | | | | | This became fatal when the type of NULL was changed recently. Notes: svn path=/head/; revision=123796
* Sometimes cardbus attachments don't attach, so while we track downWarner Losh2003-11-281-0/+1
| | | | | | | | | | | this problem put these lines back in. While they should be unnecessary, they appear to be sometimes necessary. Reviewed in concept: dfr Approved by: re (scottl@) Notes: svn path=/head/; revision=123019
* Tweaked the siointr1() so that it works better at 921600 bps, especiallyBruce Evans2003-11-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | with multiple ports on a shared interrupt demultiplexed by the puc_intr() handler. siointr1() first read as much input as possible and then checked all possibly-relevant status registers, partly for robustness and partly for historical reasons. This is very bad if it is called for every port sharing an interrupt like puc_intr() does. It can spend too long reading all the input for some ports when the interrupt is for a more urgent event on another, or just too long checking all the status registers when there are lots of ports. The inter-character time is too long for reading all the input even when the interrupt is for a transmitter interrupt on the same port, and at 921600 bps the inter-char time is 10.85 usec and was often exceeded with just 2 ports, leaving the transmitters idle for about 6% of the time. The tweak is to break out of the read loop after reading 1 char if output can be done. This avoids most of the idle transmitter time for 2 active ports at 921600 bps bidirectional on the test system. It also reduces overhead by about 20%. More complete fixes use the programmable tx low watermark on 16950's and reduce overhead by another 65%. Notes: svn path=/head/; revision=122844
* Don't waste so much space for the latency debugging buffer. Its sizeBruce Evans2003-11-161-10/+8
| | | | | | | | | | | | | | | will now need editing except for spot checks. Changed this buffer from a circular one to a linear one. This is more useful for some cases and the sysctl that prints it doesn't support circular buffers. Fixed (output) formatting bugs in this sysctl. An off by 1 error caused a garbage byte to be returned after annotation of large deltas, and a race with the writer sometimes caused premature string termination. Notes: svn path=/head/; revision=122819