Commit Graph

415 Commits

Author SHA1 Message Date
phk
b67232b68c 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
0ae911eb0e 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
7daff291ec 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
082e5cb9c3 Typo, I must have hit xZZ in vi(1). 2003-02-27 12:53:21 +00:00
phk
432a372300 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
72688ad7fe 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
5d80f8f84b 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
8cf11dcc75 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
8f7d255929 No need to wrap siodetach() with sio_pccard_detach. 2003-02-16 18:03:15 +00:00
phk
4bfb37f22e Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
phk
0aa1a2dc66 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
9dd70473b6 Add PCI id for Quatech SSCLP-200/300 lowprofile single-port RS422/485 card. 2003-01-31 21:11:20 +00:00
imp
94d1ceabe0 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
4f451155dc Make 'rclk' a uintptr_t to quiet warnings. 2002-11-07 22:22:10 +00:00
imp
1998745943 s/modunload/kldunload 2002-10-11 20:22:20 +00:00
phk
1dfc2c167f 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
d2d1a6d2ea 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
300259934b Move the com_emr register definition to sioreg.h. 2002-09-24 02:35:57 +00:00
phk
6d7819a5d4 Move the com_scr register address definition over with the other seven.
Approved by:	bde
2002-09-22 08:51:31 +00:00
phk
cfd43b66d1 Don't probe the interrupt on puc(4) attached devices. 2002-09-03 11:17:38 +00:00
phk
9226b11a98 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
2d1becbbf1 Add missing quotes around ID string in __FBSDID().
Pointy hat to:	obrien
2002-07-16 16:20:44 +00:00
sobomax
db066a0c1a 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
b6009897cf Remove a couple of __P() stragglers. 2002-06-29 02:32:34 +00:00
n_hibma
383e92b79a 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
29574e68ad Make this compile on Alpha. 2002-06-22 16:33:29 +00:00
n_hibma
90312e83bd 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
64aa27d62f ebus sio(4) attachment.
Submitted by:	tmm
2002-06-18 01:19:31 +00:00
dwmalone
1ee910e00c 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
0054f0f74b Simplify the RFC2783 and PPS_SYNC timestamp collection API. 2002-04-26 20:24:28 +00:00
jhb
db9aa81e23 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
dc2e474f79 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
df30d6374f 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
aa2c17836e 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
63d711b4d6 Include <machine/limits.h> for definition of ULONG_MAX. 2002-03-25 09:21:45 +00:00
bde
d28168db04 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
2572d3960b 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
3264aec746 Remove __P. 2002-03-20 02:08:01 +00:00
imp
ecd8851ade 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
30e07f37ab Add pc98 support. 2002-03-08 12:41:32 +00:00
takawata
e583125ee4 Add two IrDA controller ID: IBM TP240(Probably NSC compatible), and SMC IrCC
controller.
2002-03-03 13:26:59 +00:00
imp
698bf093a6 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
b7821a97ea Add an experimental tunable: machdep.conspeed.
# I'm not sure where to document this.
2002-02-26 03:13:30 +00:00
jhay
a6fbc8577e 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
108d6ed03f Add pc98 support. 2002-01-31 08:24:36 +00:00
nyan
82fdfbe8fa Remove obsolete COMBRD* definitions. 2002-01-31 08:23:30 +00:00
jhay
2aa4b18cd1 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
bmah
e9fbb12a70 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
imp
64a75a722d 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
bmah
cbe08cf352 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