Commit Graph

76 Commits

Author SHA1 Message Date
Brian Somers
b50da81d3a Use the PCI port for pci cards, not just for PCIXR cards.
Add the card name to the error message for the first initialisation
failure, giving us more info about what was actually discovered.

This code has been tested by Robert Suetterlin <robert@mpe.mpg.de>
to work on a PCI Xem card.
2002-04-10 01:15:23 +00:00
Brian Somers
96987c74d6 Change linker_reference_module() so that it's passed a struct
mod_depend * (which may be NULL).  The only consumer of this
function at the moment is digi_loadmoduledata(), and that passes
a NULL mod_depend *.

In linker_reference_module(), check to see if we've already got
the required module loaded.  If we have, bump the reference count
and return that, otherwise continue the module search as normal.
2002-04-10 01:13:57 +00:00
Brian Somers
a1b85c51bb Add some missing MODULE_VERSIONs
Without these, the kern_linker interface doesn't record these pseudo-drivers,
making them unavailable via modlist_lookup2*().
2002-04-10 01:12:55 +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
John Baldwin
c145dd8340 Use suser() instead of checking cr_uid against 0 directly. 2002-03-26 18:01:38 +00:00
Peter Wemm
f7afd87572 Fix warnings. The driver would be more useful with a DRIVER_MODULE()
entry so that it actually can do something.
2002-02-27 23:47:45 +00:00
Bruce Evans
89f37afac5 #include "opt_compat.h" so that the support for old ioctls can actually
be compiled.  Old tty ioctls are still used (possibly ifdef'ed) in at
least the following programs in the src tree:
  atc des ee fontedit gdb gdbserver lock ntp perl5 tcsh telnet top vttest

rp.c:
Unremoved used variables so that the support for old ioctls actually
compiles.

Not tested at runtime by:	bde
2002-02-15 08:28:34 +00:00
Mike Smith
172f13eb36 Staticise the con_bios and digi_devclass variables, since they aren't needed
by anything else.
2002-01-08 10:24:34 +00:00
Andrew R. Reiter
1f4bb1673d - Fix a bunch of malloc calls where the M_FLAG is incorrectly used; it
should be M_WAITOK.

Spotted by: des
2001-12-07 17:59:15 +00:00
Poul-Henning Kamp
86af0d1529 devsw_add() and cdevsw_remove() are no longer needed. 2001-11-04 15:52:44 +00:00
Brian Somers
9fd4693f8a Send a .4 second BREAK rather than a .25 second break so that
we're at least consistent with what tcsendbreak(3) is documented
to do.

MFC after: 2 weeks

Note, the MFC will be to sys/dev/dgb/dgm.c on the RELENG_4 branch
2001-09-23 20:03:40 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Brian Somers
4b65cac846 Allow individual ports to use alternate pin settings (swap dsr & cd)
via the new DIGIIO_SETALTPIN ioctl, and allow the port's ALTPIN setting
to be queried via DIGIIO_GETALTPIN.

The initial state and lock devices are normally used to set and/or
lock ALTPIN settings although the device itself may also be used.

ALTPIN settings are applied per-device and apply to both the callin
and callout device at the same time.
2001-06-20 14:52:08 +00:00
Brian Somers
9c4013d76c Use linker_reference_module() instead of hard-coding the digi_*
module path.
2001-06-18 15:10:20 +00:00
Brian Somers
3f99abb8b6 Credit John Prince and Eric Hernes for their work. 2001-06-18 15:02:33 +00:00
Brian Somers
6ce76643aa MALLOC -> malloc, FREE -> free 2001-05-22 18:10:57 +00:00
Brian Somers
c7fee90e33 #include <digi/*.h> -> #include <dev/digi/*.h>
Suggested by: bde
2001-05-19 17:06:48 +00:00
Brian Somers
c103d24a09 Fairwell digiio.h (moved to src/sys/sys) 2001-05-19 09:40:10 +00:00
Brian Somers
343ae1c099 digiio.h has moved to /usr/include/sys 2001-05-19 09:28:59 +00:00
Brian Somers
ad24a43b1e digiModel_t -> enum digi_model
Remove a forgotton and unused structure.
2001-05-17 01:42:18 +00:00
Brian Somers
f80704eff1 Remove all the mutex stuff - suggested by jhb
Tidy up includes, credit Slawa Olhovchenkov, John Prince and Eric Hernes
for their efforts and add a couple of missing parenthesis around return
expressions.
2001-05-08 07:55:33 +00:00
Brian Somers
3db1f8d59a sys/mutex.h requires sys/lock.h for LINT
Re-spotted by: phk
2001-05-07 23:52:08 +00:00
Brian Somers
cf8f8229d0 Change COM_LOCK/COM_UNLOCK to a regular mutex - still conditional on
SMP being defined.
2001-05-07 11:13:11 +00:00
Brian Somers
87406f5cb4 Make LINT compile again.
Spotted by:	phk
2001-05-06 21:03:37 +00:00
Brian Somers
de85e722d1 Only define DEBUG if it's undefined. This should eventually go, but
can stay for now in case of problems.
2001-05-02 01:47:34 +00:00
Brian Somers
ad01e0c856 Add a ``digi'' driver.
This driver supports PCI Xr-based and ISA Xem Digiboard cards.
dgm will go away soon if there are no problems reported.  For now,
configuring dgm into your kernel warns that you should be using
digi.  This driver is probably close to supporting Xi, Xe and Xeve
cards, but I wouldn't expect them to work properly (hardware
donations welcome).

The digi_* pseudo-drivers are not drivers themselves but contain
the BIOS and FEP/OS binaries for various digiboard cards and are
auto-loaded and auto-unloaded by the digi driver at initialisation
time.  They *may* be configured into the kernel, but waste a lot
of space if they are.  They're intended to be left as modules.

The digictl program is (mainly) used to re-initialise cards that
have external port modules attached such as the PC/Xem.
2001-05-02 01:08:09 +00:00