Commit Graph

498 Commits

Author SHA1 Message Date
Bruce Evans
b9c29fa9ae Don't waste so much space for the latency debugging buffer. Its size
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.
2003-11-16 23:05:52 +00:00
Doug Rabson
0be389f3ca Remove explicit cardbus attachments from drivers where this is identical
to the pci attachment. Cardbus is a derived class of pci so all pci
drivers are automatically available for matching against cardbus devices.

Reviewed by: imp
2003-11-03 09:22:18 +00:00
Warner Losh
d25d7d01be Include pccard/pccard_cis.h here too 2003-10-07 04:26:14 +00:00
Bruce Evans
90796c0860 Removed some nearly dead code in comparam(). We don't need to recover
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).
2003-09-28 13:12:26 +00:00
Bruce Evans
5da172697f Cleaned up and fixed setting of speeds in comparam():
- 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.
2003-09-27 11:13:59 +00:00
Poul-Henning Kamp
edafc5663e Fix compilation on alpha. 2003-09-26 21:36:01 +00:00
Bruce Evans
3a6a55a60b Use the correct speed in the delay for the transmission of a character
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.
2003-09-26 11:36:09 +00:00
Poul-Henning Kamp
c5c8f9652b Adhere to the new console API:
Initialize cn_name
   Use cn_unit for internal housekeeping.
   Forget about cn_dev.
2003-09-26 07:29:34 +00:00
Bruce Evans
ca77329ecc Fixed most of the remaining style bugs in rev.1.194. Mainly better
wording in comments.
2003-09-18 07:46:40 +00:00
Bruce Evans
aca282e269 Miscellaneous minor style fixes (mainly for unsorting of the flags access
macros).
2003-09-17 17:26:00 +00:00
Bruce Evans
42d3393791 Fixed bitrot in the probe in revs.1.127, 1.165 and 1.169. The
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.
2003-09-17 16:44:02 +00:00
Bruce Evans
cd3aaf0e7c Cleaned up initialization of hardware flow control for 16650As. Use
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).
2003-09-17 14:05:16 +00:00
Bruce Evans
86fe87393a Moved the definitions of the bits in the ns*50 registers from sioreg.h
to ns16550.h.  The organization of these files was sort of backwards.
The bits in the registers have no driver or bus dependencies but they
but the offsets of the registers in bus space are very bus-dependent.
However, it does no harm to keep the definitions of the register offsets
in ns16550.h provided they are thought of as internal ns*50 offsets.
2003-09-16 08:08:08 +00:00
Bruce Evans
7c24ca50f8 Quick fix for a pessimization in rev.1.194. An extra i/o instruction
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.
2003-09-15 13:49:18 +00:00
Nate Lawson
b5b965a529 Remove a duplicate comment.
Pointed out by:	bde
2003-08-28 03:54:49 +00:00
Nate Lawson
6e433dcdea Use the db_alt_break() state machine instead of rolling our own. This
brings sio(4) in-line with zs(4) et al.
2003-08-26 05:37:48 +00:00
David E. O'Brien
a7b60ab26e Fix copyright comment & FBSDID style nits.
Requested by:	bde
2003-08-25 09:48:48 +00:00
David E. O'Brien
945ff31afa Use __FBSDID().
Also some minor style cleanups.
2003-08-24 18:03:45 +00:00
Warner Losh
3d11ce04c6 s=include <ofw/=include <dev/ofw/= to reflect removal of -I$S/dev 2003-08-23 00:11:16 +00:00
Warner Losh
b63ff62456 Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.
2003-08-22 06:17:16 +00:00
John Baldwin
8a9bc9c03b - Use the new resource_disabled() helper function to see if devices are
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.
2003-07-02 16:09:02 +00:00
Scott Long
87947cad18 Track the resource id of the memory port instead of just assuming that
it is 0x0.  Cardbus-based sio/modem cards can now be ejected without
panic'ing.
2003-06-09 21:25:14 +00:00
Poul-Henning Kamp
0623afde6f Remove extra unused variable.
Found by:       FlexeLint
2003-05-31 18:39:29 +00:00
Murray Stokely
4001e1ee2e Add E-Tech ISA PnP modem ID.
PR:		kern/36692
Submitted by:	Theo van Klaveren <t.vanklaveren@student.utwente.nl>
Approved by:	re (murray)
MFC After:	3 days
2003-05-16 04:04:04 +00:00
David E. O'Brien
7aaa845578 Revert rev 1.396 -- it broke the Alpha kernel build. 2003-05-05 09:09:16 +00:00
Peter Wemm
8c027ecbba Eliminate a compiler warning with gcc3.3 on AMD64, where speed is
a 32 bit int which can never be > ULONG_MAX / 8.  Its an 'always true'
warning.
2003-04-30 21:39:28 +00:00
Mark Murray
51da11a27a Fix some easy, global, lint warnings. In most cases, this means
making some local variables static. In a couple of cases, this means
removing an unused variable.
2003-04-30 12:57:40 +00:00
Alexander Kabaev
104a9b7e3e Deprecate machine/limits.h in favor of new sys/limits.h.
Change all in-tree consumers to include <sys/limits.h>

Discussed on:	standards@
Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-04-29 13:36:06 +00:00
Maxim Sobolev
2d95f7d4a9 Brucify.
Requested and reviewed by:	bde
MFC after:	2 weeks
2003-03-18 21:26:28 +00:00
Maxim Sobolev
71fbba351a Remove duplicate line introduced in the previous commit.
Submitted by:	bde
MFC after:	2 weeks
2003-03-15 18:49:41 +00:00
Maxim Sobolev
084254f807 - Add minimal support for TI16754 4xUART chip into sio(4) driver and remove
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
2003-03-15 16:25:40 +00:00
Maxim Sobolev
a2a101e766 Add initial support for IC Book Labs Dreadnought x16 Pro 16-ports card. Since
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
2003-03-12 17:20:24 +00:00
Takanori Watanabe
a009cc2a40 Add _HID of IrDA module and Pen tablet on
Tablet PC Acer Travel Mate C100.

Sponsored by: ACER ,Alpha Omega, MYCOM , Synnex
2003-03-11 16:49:06 +00:00
Poul-Henning Kamp
182a9f7455 Make nokqfilter() return the correct return value.
Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers.
2003-03-03 16:24:47 +00:00
Poul-Henning Kamp
7ac40f5f59 Gigacommit to improve device-driver source compatibility between
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)
2003-03-03 12:15:54 +00:00
Poul-Henning Kamp
c2b46fcca4 Add yet a patch for the patchwork quilt called sio(4):
Allow people set set flags on pci based SIO ports.
2003-02-27 14:09:36 +00:00
Poul-Henning Kamp
59c5c475f1 Typo, I must have hit xZZ in vi(1). 2003-02-27 12:53:21 +00:00
Poul-Henning Kamp
6cec1852d4 Make flags bit 0x10000 mean that PPS timestamping should use the
CTS instead of the DCD pin.
2003-02-27 12:27:09 +00:00
Poul-Henning Kamp
263444cfbf Change the console interface to pass a "struct consdev *" instead of a
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.
2003-02-20 20:54:45 +00:00
Poul-Henning Kamp
029f0b69a4 Change "dev_t gdbdev" to "void *gdb_arg", some possible paths for GDB
will not have a dev_t.
2003-02-16 19:22:21 +00:00
Warner Losh
58f4eca2a6 Whatever dumbass wrote sio_pci.c didn't include a detach method.
Wearing said pointy hat, correct the oversight and hope nobody
notices.

# this should make xircom modems happier to detach once other bugs with
# the cardbus layer are fixed.

Noticed by: scottl
Conical Hat to: imp
2003-02-16 18:05:54 +00:00
Warner Losh
3c2eeec09a No need to wrap siodetach() with sio_pccard_detach. 2003-02-16 18:03:15 +00:00
Poul-Henning Kamp
f341ca9891 Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
Poul-Henning Kamp
6607b68526 Set si_drv1 to our softc for all the six dev_t's we create for a serial port. 2003-02-02 21:25:22 +00:00
Poul-Henning Kamp
1b1cf40164 Add PCI id for Quatech SSCLP-200/300 lowprofile single-port RS422/485 card. 2003-01-31 21:11:20 +00:00
Warner Losh
d36644f2d9 Be nice. There are evidentally a number of different cards that
identify themselves as serial cards that it would be desirable to
attach a different driver than sio to.  Since we are claiming all
serial cards, this is not possible.  Instead, return -100 to indicate
that we're willing to take the card, but still allow other drivers to
attach.

Pointed out by: Maksim Yevmenkin
2002-12-21 22:37:54 +00:00
John Baldwin
7399a5ddd0 Make 'rclk' a uintptr_t to quiet warnings. 2002-11-07 22:22:10 +00:00
Warner Losh
41a0c1eedd s/modunload/kldunload 2002-10-11 20:22:20 +00:00
Poul-Henning Kamp
37c841831f Be consistent about "static" functions: if the function is marked
static in its prototype, mark it static at the definition too.

Inspired by:    FlexeLint warning #512
2002-09-28 17:15:38 +00:00
Poul-Henning Kamp
97c6f4f976 Add yet a quick flag to sio: 0x100000 "Scratch pad register missing".
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.
2002-09-27 22:00:23 +00:00
Yoshihiro Takahashi
9601a29654 Move the com_emr register definition to sioreg.h. 2002-09-24 02:35:57 +00:00
Poul-Henning Kamp
c8423e9702 Move the com_scr register address definition over with the other seven.
Approved by:	bde
2002-09-22 08:51:31 +00:00
Poul-Henning Kamp
ca603e16f2 Don't probe the interrupt on puc(4) attached devices. 2002-09-03 11:17:38 +00:00
Poul-Henning Kamp
de7ac779e9 Only try to flush the FIFO of 500 characters, return EIO if that fails.
This at least prevents the total hang of the machine when I open a
PCCARD sio device on -current, but it does not solve the problem.
2002-08-28 22:25:41 +00:00
Thomas Moestl
60a6cf4eff Add missing quotes around ID string in __FBSDID().
Pointy hat to:	obrien
2002-07-16 16:20:44 +00:00
Maxim Sobolev
8c6d67ef99 Add PCI ID and configuration hint for Netmos Nm9845 PCI 6-ports serial
card.

Submitted by:	Oleg Antoshin <oleh@at2000.kiev.ua>
MFC after:	3 days
2002-07-10 17:26:11 +00:00
Peter Wemm
160554fbf4 Remove a couple of __P() stragglers. 2002-06-29 02:32:34 +00:00
Nick Hibma
befd9c61ce set siocnunit to the correct value. This fixes the freeze on boot for
alphas.

Submitted by:		 Bernd Walter <ticso@cicely5.cicely.de>
2002-06-23 18:57:53 +00:00
Nick Hibma
8fbfe5e927 Make this compile on Alpha. 2002-06-22 16:33:29 +00:00
Nick Hibma
d8dbc77c56 Make the speed used by gdb over serial settable in the kernel configuration.
This facilitates the use in circumstances where you are using a serial
console as well. GDB doesn't support anything higher than 9600 baud (19k2
if you are lucky), but the console does.
2002-06-18 21:30:37 +00:00
David E. O'Brien
b22bb3c911 ebus sio(4) attachment.
Submitted by:	tmm
2002-06-18 01:19:31 +00:00
David Malone
a37231dc3f Add another Askey ISA modem ID.
PR:		35813
Submitted by:	Chris Knight <chris@aims.com.au>
2002-05-06 09:02:55 +00:00
Poul-Henning Kamp
7bf758bff0 Simplify the RFC2783 and PPS_SYNC timestamp collection API. 2002-04-26 20:24:28 +00:00
John Baldwin
6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
John Baldwin
44731cab3b Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
Bruce Evans
8fdb202d85 Support more than 32 sio unit numbers. The maximum unit number is now
(65536 * 32 - 1), but MAKEDEV only supports up to (32 * 32 -1).  Device
names use the unit number in base 32 for all "digits".

This required fixing an old bug in MAKEDEV:ttyminor().  Its arg was the
global $unit instead of $1.

Reminded by:	Valentin K. Ponomarenko <valka@krog.ukrtel.net>
MFC-after:	1 week
2002-03-31 09:15:43 +00:00
Bruce Evans
e968c4ef3c Hacks for measuring interrupt latency. Interrupt latency can be
measured accurately for periodic interrupts provided the interrupts
don't need to be serviced very quickly to keep their period almost
constant.  sio output interrupts have this property (interrupt service
can be delayed for up to 1 character time without the period changing).

This is non-optional and undocumented so that it can be added and
removed easily.  It has no significant effect unless it is enabled by
hacking on a variable using a debugger.  Hardclock and statclock interrupts
would work even better for this, at least on i386's, provided their
interrupt handlers are fast (as they are in -current but not in -stable
or in my version of -current).
2002-03-31 06:49:38 +00:00
Mike Barcroft
e48fdcb37b Include <machine/limits.h> for definition of ULONG_MAX. 2002-03-25 09:21:45 +00:00
Bruce Evans
359052dbcc Fixed some style bugs in the removal of __P(()). The main ones were
not removing tabs before "__P((", and not outdenting continuation lines
to preserve non-KNF lining up of code with parentheses.  Switch to KNF
formatting and/or rewrap the whole prototype in some cases.
2002-03-23 12:13:34 +00:00
John Baldwin
565f27f116 Add PCI ID for the SeaLevel Ultra 530.PCI single port card.
Sponsored by:	The Weather Channel
2002-03-20 19:38:26 +00:00
Alfred Perlstein
e51a25f850 Remove __P. 2002-03-20 02:08:01 +00:00
Warner Losh
e181db22a4 Add device ID for Xircom modem. Also add work around from gwk@sgi.com
to put the device into 8 bit mode a second time.  This appears to have
no ill effects on other devices, and appears to be necessary for the
xircom modem.

Submitted by: gwk@sgi.com, many others that found his patch in the archives.
2002-03-16 04:26:46 +00:00
Yoshihiro Takahashi
959168ab57 Add pc98 support. 2002-03-08 12:41:32 +00:00
Takanori Watanabe
54f737c3a6 Add two IrDA controller ID: IBM TP240(Probably NSC compatible), and SMC IrCC
controller.
2002-03-03 13:26:59 +00:00
Warner Losh
476f923056 Until I can figure out how to live without the volatile qualifier on
comdefaultrate, comment out the support for machdep.conspeed for now.
2002-02-26 03:46:14 +00:00
Warner Losh
96fc5a062e Add an experimental tunable: machdep.conspeed.
# I'm not sure where to document this.
2002-02-26 03:13:30 +00:00
John Hay
9c564b6c92 Add the puc (PCI "Universal" Communications) driver. The idea and some of
the structure definitions come from NetBSD to make it easier to share card
definitions. The driver only acts as a shim between the pci bus and the
sio driver. Later pci parallel ports could also be supported through this
driver. Support for most single and multiport pci serial cards should be
as simple as adding its definition to pucdata.c

Tested with the following pci cards:
Moxa Industio CP-114, 4 port RS-232,RS-422/485
Syba Tech Ltd. PCI-4S2P-550-ECP, 4 port RS-232 + 2 parallel ports
Netmos NM9835 PCI-2S-550, 2 port RS-232
2002-02-16 15:12:14 +00:00
Yoshihiro Takahashi
9fdd7481ef Add pc98 support. 2002-01-31 08:24:36 +00:00
Yoshihiro Takahashi
c34cc16d46 Remove obsolete COMBRD* definitions. 2002-01-31 08:23:30 +00:00
John Hay
57019e6041 Add support for different serial clock frequencies and not just the
standard one of 1.8432MHz. This will be used by the puc (PCI
"universal" communication card) device driver.

Reviewed by:	bde
2002-01-30 17:22:04 +00:00
Bruce A. Mah
7f04152a10 Cosmetic fix: Not every machine that uses the sio driver has a BIOS.
Pointed out by:	imp
2002-01-17 20:05:47 +00:00
Warner Losh
ba24c8d971 While I'm not sure that I like the wording of the BIOS message in the
previous commit, it should always print due to lack of {} around the
second line in the if statement.  The message should likely say
something more like "There's no hardware responding at this IRQ.
Device not present (or disbaled)," but that is too long.  We generally
don't give elementary advise in device driver messages anyway.  Be
that as it may, the problem with it printing all the time should be
corrected.
2002-01-17 16:16:51 +00:00
Bruce A. Mah
ea9e3e8f9b Make sio device probe messages less misleading, for the case that
a port is either disabled or not responding.

PR:		33963
Submitted by:	Kevin Oberman <oberman@es.net>
MFC after:	2 weeks
2002-01-17 06:21:45 +00:00
John Baldwin
c86b6ff551 Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
Sheldon Hearn
a0de19b9a0 Add PNP Id for Create Labs Phoneblaster.
PR:		kern/32891
Submitted by:	Louis Mamakos <louie@TransSys.COM>
2001-12-30 13:12:50 +00:00
Bruce Evans
fb717773e7 Fixed locking bugs in rev.1.346:
(1) Don't attempt aquire the non-recursive lock sio_lock recursively.
    Doing so caused unbounded recursion in some setups.  E.g., if DDB,
    BREAK_TO_DEBUGGER and WITNESS are configured; if the debugger is
    entered using a break, then WITNESS will actually detect the invalid
    recursion and will add to it attempting to print a message about it.

(2) Don't use sio_lock before it has been initialized.  The old check
    (sio_inited != 0) didn't work when sio_inited was boolean because
    sio_inited was set too early, and became just wrong when sio_inited
    was changed to a tri-state variable in rev.1.348.

Reported and fixed in another way by:	fenner (1)
2001-12-28 18:08:10 +00:00
Seigo Tanimura
5c18b9160d Fix typo first, then controvert. 2001-12-24 01:24:38 +00:00
Matthew Dillon
6aebdaaf0a Back out an inappropriate backout. If Anyone wants to set the FIFO
level that high they should first fix the problems with the system that
cause silo overflows.  It is far more important for the serial device
to work.
2001-12-23 02:48:25 +00:00
Bruce Evans
f36422c140 Backed out previous unapproved commit. 2001-12-23 02:38:04 +00:00
Matthew Dillon
61056a0454 This problem has been in the serial driver for years, and I occassionally
see people trip over it.  Do not set the FIFO trigger to just before it
would otherwise overflow.  Give it a little more slop so characters aren't
lost if the interrupt is delayed by other system activities.

MFC maybe: 7 days
2001-12-23 00:48:37 +00:00
Yoshihiro Takahashi
de48920662 Split the sio driver for pc98 into bus front end and back end.
(merged from the files in sys/dev/sio)
2001-11-26 12:29:53 +00:00
Warner Losh
1c988e75f4 bde suggests that sio really wants to manage its own softc. This
allows us to move the sio softc data structure back into sio.c and
reduce the complexity of the non sio.c sio files.

Submitted by: bde

# I didn't fix the locking issues that bruce also submitted.
2001-11-26 07:39:51 +00:00
Warner Losh
f703f3eaee First part of patches to make sio grok 16-bit serial cards under
NEWCARD.  Other patches may be reqiured to sio to prevent a hang on
eject.  Also add commented out entries for sio_pccard.c in files.pc98
to match other architectures.

Submitted by: yamamoto shigeru-san
2001-11-26 00:39:33 +00:00
Ian Dowse
56f7305f58 Add the PnP ID for a Rockwell 33.6k modem.
PR:		kern/23414
Submitted by:	Ryuichiro Imura <imura@af.airnet.ne.jp>
MFC after:	1 week
2001-11-18 16:39:09 +00:00
Jonathan Lemon
553b79aa63 cn_tab no longer exists, use cnadd() to add a console device. Note that
this may result in duplicate console output in some cases.
2001-10-24 18:30:05 +00:00
Jonathan Lemon
034cc6fe5a Add a siocnterm function for the CONS_DRIVER function vector. 2001-10-23 20:16:56 +00:00
Warner Losh
2ce87d3448 Break out the bus front ends into their own files. Rewrite
sio_pccard_detach to use new siodetach.  Add an extra arg to sioprobe
to tell driver to probe/not probe the device for IRQs.

This incorporates most of Bruce's review material.  I'm at a good
checkpoint, but there will be more to come based on bde's further
reviews.

Reviewed by: bde
2001-10-23 15:17:33 +00:00
Warner Losh
d75c1b4a90 First commit after a repo copy of isa/sio* -> dev/sio:
Move sio from isa/sio.c to dev/sio/sio.c.  The next step is to break
out the front end attachments, improve support for these parts on
different busses, and maybe, if we're lucky, merging in pc98 support.
It will also be MI and live in conf/files rather than files.*.

Approved by: bde
Tested with: i386, pc98
2001-10-22 02:48:38 +00:00
John Baldwin
76e296aa31 - Make the sio_inited handling more properly MP safe.
- If we are booting with a serial console, then pass the MTX_QUIET flag to
  mtx_init of the sio lock as otherwise KTR_VERBOSE simply doesn't work.
2001-10-20 03:32:33 +00:00
Jonathan Lemon
750c427849 Add support for 28800 baud to sio.
PR: 30906
Submitted by: "Daniel O'Connor" <darius@chowder.dons.net.au>
2001-09-29 04:49:11 +00:00