Commit Graph

420 Commits

Author SHA1 Message Date
sobomax
b552d09bc1 Brucify.
Requested and reviewed by:	bde
MFC after:	2 weeks
2003-03-18 21:26:28 +00:00
sobomax
b8e959461b Remove duplicate line introduced in the previous commit.
Submitted by:	bde
MFC after:	2 weeks
2003-03-15 18:49:41 +00:00
sobomax
3fa073234e - 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
sobomax
673e556649 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
takawata
a305558a98 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
phk
ec9e501099 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
phk
c0f52402d6 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
phk
71df24c5d4 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
phk
743ff2a775 Typo, I must have hit xZZ in vi(1). 2003-02-27 12:53:21 +00:00
phk
91fc6de500 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
phk
ece947dbac 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
phk
d72c724f39 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
imp
d3a769dd16 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
imp
8706ed4d65 No need to wrap siodetach() with sio_pccard_detach. 2003-02-16 18:03:15 +00:00
phk
674c779422 Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
phk
b98f228f1a 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
phk
3426542ee3 Add PCI id for Quatech SSCLP-200/300 lowprofile single-port RS422/485 card. 2003-01-31 21:11:20 +00:00
imp
d11be4669f 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
jhb
983055ffc1 Make 'rclk' a uintptr_t to quiet warnings. 2002-11-07 22:22:10 +00:00
imp
6b7cbbfb86 s/modunload/kldunload 2002-10-11 20:22:20 +00:00
phk
2175ba2a2d 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
phk
de5291fe4b 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
nyan
1a777f137b Move the com_emr register definition to sioreg.h. 2002-09-24 02:35:57 +00:00
phk
ca78c8fcf1 Move the com_scr register address definition over with the other seven.
Approved by:	bde
2002-09-22 08:51:31 +00:00
phk
98107727d7 Don't probe the interrupt on puc(4) attached devices. 2002-09-03 11:17:38 +00:00
phk
b5cb40ab3e 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
tmm
8a6cce60a3 Add missing quotes around ID string in __FBSDID().
Pointy hat to:	obrien
2002-07-16 16:20:44 +00:00
sobomax
00f6f6e363 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
347e489483 Remove a couple of __P() stragglers. 2002-06-29 02:32:34 +00:00
n_hibma
a3845a7552 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
n_hibma
9fa20f32b8 Make this compile on Alpha. 2002-06-22 16:33:29 +00:00
n_hibma
f1757a1102 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
obrien
9787fdd349 ebus sio(4) attachment.
Submitted by:	tmm
2002-06-18 01:19:31 +00:00
dwmalone
794edb7946 Add another Askey ISA modem ID.
PR:		35813
Submitted by:	Chris Knight <chris@aims.com.au>
2002-05-06 09:02:55 +00:00
phk
ab26f54be4 Simplify the RFC2783 and PPS_SYNC timestamp collection API. 2002-04-26 20:24:28 +00:00
jhb
5a4577c2f0 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
jhb
e3cbbf9804 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
bde
eed6cf7c63 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
bde
ab5c6c352c 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
22bfba2cd0 Include <machine/limits.h> for definition of ULONG_MAX. 2002-03-25 09:21:45 +00:00
bde
fa7ee71593 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
jhb
85cb685071 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
ec62a8c79a Remove __P. 2002-03-20 02:08:01 +00:00
imp
445c9294ae 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
nyan
49cd024ad3 Add pc98 support. 2002-03-08 12:41:32 +00:00
takawata
3ce8a7b144 Add two IrDA controller ID: IBM TP240(Probably NSC compatible), and SMC IrCC
controller.
2002-03-03 13:26:59 +00:00
imp
d794cb28e5 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
imp
4351d388e8 Add an experimental tunable: machdep.conspeed.
# I'm not sure where to document this.
2002-02-26 03:13:30 +00:00
jhay
3097ed295f 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
nyan
6bac0fd1c4 Add pc98 support. 2002-01-31 08:24:36 +00:00