summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio/sio.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Some enhancements and bug fix.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
* Back out last bad commit (again!)imp2004-04-071-12/+1
|
* Remove advertising clause from University of California Regent'simp2004-04-071-5/+12
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Last change was a bogusimp2004-04-071-12/+1
|
* Remove advertising clause from University of California Regent'simp2004-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
* Back out code for auto-gdb detection that accidentally leaked into thenjl2004-03-181-17/+5
| | | | | | | bus_alloc_resource_any commit. Submitted by: bde Pointy-hat: njl
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-7/+18
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Device megapatch 4/6:phk2004-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.
* Device megapatch 3/6:phk2004-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.
* Device megapatch 1/6:phk2004-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.
* Fixed a memory leak.ru2004-01-181-1/+3
| | | | Submitted by: Stanford Metacompilation research group
* Fixed breakage of a check for boolean true by misusing NULL in rev.1.407.bde2003-12-241-2/+2
| | | | This became fatal when the type of NULL was changed recently.
* Tweaked the siointr1() so that it works better at 921600 bps, especiallybde2003-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%.
* Don't waste so much space for the latency debugging buffer. Its sizebde2003-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.
* Removed some nearly dead code in comparam(). We don't need to recoverbde2003-09-281-9/+0
| | | | | | from fiddling with CS_TTGO since fiddling with CS_TTGO was removed in rev.1.218 of the i386/isa version (which was merged with loss of history in rev.1.223 of this version).
* Cleaned up and fixed setting of speeds in comparam():bde2003-09-271-31/+20
| | | | | | | | | | | | | | | | | - Removed conversion of a zero input speed to the output speed. This has been done better in ttioctl() since rev.1.108 of kern/tty.c almost 5 years ago. comparam() did the conversion incompletely for the case where the output speed is also zero. It had complications to avoid using zero speeds, but would still have used a zero input speed for setting watermarks if kern/tty.c had passed one. - Never permit the input speed to be different from the output speed. There was no validity check on the input speed for the case of a zero output speed. Then we didn't change the physical speeds, but we used the unvalidated input speed for setting watermarks and didn't return an error, so ttioctl() stored the unvalidated input speed in the tty struct where it could cause problems later. - Removed complications that were to avoid using a divisor of 0. The divisor is now always valid if the speed is accepted.
* Fix compilation on alpha.phk2003-09-261-1/+1
|
* Use the correct speed in the delay for the transmission of a characterbde2003-09-261-1/+4
| | | | | | | in the loopback test in the probe. The delay was too short for consoles at speeds lower than about 3200 bps. This shouldn't have caused many problems, since such low speeds are rare and the probe is forced to succeed for consoles.
* Adhere to the new console API:phk2003-09-261-15/+21
| | | | | | Initialize cn_name Use cn_unit for internal housekeeping. Forget about cn_dev.
* Fixed most of the remaining style bugs in rev.1.194. Mainly betterbde2003-09-181-30/+32
| | | | wording in comments.
* Miscellaneous minor style fixes (mainly for unsorting of the flags accessbde2003-09-171-13/+10
| | | | macros).
* Fixed bitrot in the probe in revs.1.127, 1.165 and 1.169. Thebde2003-09-171-23/+23
| | | | | | | | | | | | COM_NOFIFO() and COM_ESP cases are supposed to be a subsets of the plain 16550A case, but 16650-related changes made the former fall into the latter and then both fall into general code for printing the tx fifo size. This mainly caused hard to parse boot messages like: "sio0: type 16550A fifo disabled lookalike with 1 bytes FIFO". COM_NOFIFO() on an ESP port gave a larger mess whose extent is not clear. Fixed some nearby style bugs.
* Cleaned up initialization of hardware flow control for 16650As. Usebde2003-09-171-25/+11
| | | | | | | | | | | | | | defined values instead of hard-coded values. Don't repeat the register access part of the code 4 times times or triple-space statements. This fixes half of the style bugs in rev.1.172. Hardware flow control of 16650As is still officially unsupported. I was mistaken about it being broken. It is broken in 16650s but is fixed in 16650As except for the maximum trigger level (which is no longer used). Testing of the 16650's broken hardware flow control watermarks by programming them on 16950s showed that their effects are not too bad if the fifo size and trigger level are reasonably large (16 is much better than 8).
* Quick fix for a pessimization in rev.1.194. An extra i/o instructionbde2003-09-151-2/+7
| | | | | | | | | was added to the fast path to support the COM_IIR_RXRDYBUG() case even when that case is not configured. This increased the relative overhead of sio input by almost 25% in the worst case and by 2-3% in the usual case (usually only about 0.2% absolute per port at 115200 bps). The quick fix is to significantly pessimize only the COM_IIR_RXRDYBUG() case.
* Remove a duplicate comment.njl2003-08-281-6/+0
| | | | Pointed out by: bde
* Use the db_alt_break() state machine instead of rolling our own. Thisnjl2003-08-261-32/+14
| | | | brings sio(4) in-line with zs(4) et al.
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* - Use the new resource_disabled() helper function to see if devices arejhb2003-07-021-5/+3
| | | | | | | | | | | | disabled. - Change the apm driver to match the acpi driver's behavior by checking to see if the device is disabled in the identify routine instead of in the probe routine. This way if the device is disabled it is never created. Note that a few places (ips(4), Alpha SMP) used "disable" instead of "disabled" for their hint names, and these hints must be changed to "disabled". If this is a big problem, resource_disabled() can always be changed to honor both names.
* Track the resource id of the memory port instead of just assuming thatscottl2003-06-091-3/+6
| | | | | it is 0x0. Cardbus-based sio/modem cards can now be ejected without panic'ing.
* Remove extra unused variable.phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* Revert rev 1.396 -- it broke the Alpha kernel build.obrien2003-05-051-1/+1
|
* Eliminate a compiler warning with gcc3.3 on AMD64, where speed ispeter2003-04-301-1/+5
| | | | | a 32 bit int which can never be > ULONG_MAX / 8. Its an 'always true' warning.
* Fix some easy, global, lint warnings. In most cases, this meansmarkm2003-04-301-1/+1
| | | | | making some local variables static. In a couple of cases, this means removing an unused variable.
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-04-291-1/+1
| | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
* Brucify.sobomax2003-03-181-23/+19
| | | | | Requested and reviewed by: bde MFC after: 2 weeks
* Remove duplicate line introduced in the previous commit.sobomax2003-03-151-1/+0
| | | | | Submitted by: bde MFC after: 2 weeks
* - Add minimal support for TI16754 4xUART chip into sio(4) driver and removesobomax2003-03-151-1/+33
| | | | | | | | | | | | now unnecessary hack from the previous commit; - Add support for Interrupt Latch Register (ILR) into puc(4). So far only ILRs compatible with specifications from Digi International are supported. Support for other types of ILRs could be easily added later; - Correct clock frequency for IC Book Labs Dreadnought x16 Lite board; - Enable ILR detection/usage for IC Book Labs Dreadnought x16 boards. Sponsored by: IC Book Labs MFC after: 2 weeks
* Add initial support for IC Book Labs Dreadnought x16 Pro 16-ports card. Sincesobomax2003-03-121-1/+1
| | | | | | | | | | this card is based on 16750 UART, modify sio(4) a bit to ignore 16750-specific 7th bit of MCR when probing card. This allows card to be detected and attached as 16550A-compatible device. More work needs to be done in order to enable nice 16750-specific features such as larger fifo buffer and higher speeds. Sponsored by: IC Book Labs MFC after: 2 weeks
* Make nokqfilter() return the correct return value.phk2003-03-031-1/+1
| | | | Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-14/+10
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Typo, I must have hit xZZ in vi(1).phk2003-02-271-1/+1
|
* Make flags bit 0x10000 mean that PPS timestamping should use thephk2003-02-271-2/+11
| | | | CTS instead of the DCD pin.
* Change the console interface to pass a "struct consdev *" instead of aphk2003-02-201-11/+18
| | | | | | | | | dev_t to the method functions. The dev_t can still be found at struct consdev *->cn_dev. Add a void *cn_arg element to struct consdev which the drivers can use for retrieving their softc.
* Change "dev_t gdbdev" to "void *gdb_arg", some possible paths for GDBphk2003-02-161-4/+4
| | | | will not have a dev_t.
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* Set si_drv1 to our softc for all the six dev_t's we create for a serial port.phk2003-02-021-0/+2
|
* s/modunload/kldunloadimp2002-10-111-1/+1
|
* Be consistent about "static" functions: if the function is markedphk2002-09-281-3/+3
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Add yet a quick flag to sio: 0x100000 "Scratch pad register missing".phk2002-09-271-6/+5
| | | | | | | The advanced stage of computer assisted hardware design and verification is aptly illustrated by the fact that this is necessary because only the first ports in a single-chip, dual-port async PC-Card product lacks this register.
* Move the com_scr register address definition over with the other seven.phk2002-09-221-2/+0
| | | | Approved by: bde
OpenPOWER on IntegriCloud