Commit Graph

201 Commits

Author SHA1 Message Date
Orion Hodson
14908c43ac Remove unintended growth of bt848_card_signature. 2003-02-03 18:59:12 +00:00
Orion Hodson
f77f2ccb90 Add BCTV3/PCI entry.
Rename functions bctv_* to bctv2_* and macros BCTV_* to BCTV2_* for
coexistance of BCTV2 and BCTV3.

Rename CARD_IO_GV to CARD_TO_BCTV2.

Add auto recognition of BCTV3/PCI.

PR:             i386/43879
Submitted by:   MOROHOSHI Akihiko <moro@remus.dti.ne.jp>
Approved by:    roger
MFC after:      6 days
2003-02-02 17:46:00 +00:00
Orion Hodson
9aa75ee251 Add tuner code for WinTV Go FM (Hauppauge Model 44811 C133). Patch
supplied by Ross Finlayson <finlayson@live.com>.
2003-01-31 15:23:40 +00:00
Roger Hardiman
2cfff6e8ef Fix a panic unloading the bktr driver when devfs is in use.
PR:	kern/36413
2002-12-09 09:04:09 +00:00
Roger Hardiman
1f3e23743d Fix a bug which caused signals on YUV images to fail.
PR: i386/45678  (this also allowed kern/21305 and kern/33715 to be closed)
Submitted by: Tommy Johnson <tjohnson@bobdbob.com>
2002-12-07 09:00:19 +00:00
John Baldwin
cb27d4c7cd More int != pointer stuff. 2002-11-06 20:16:39 +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
Peter Wemm
05e5542d97 Remove abuse of NBKTR - this was always a NOP on freebsd. We never
compiled this stuff if NBKTR was zero.
2002-07-21 05:19:03 +00:00
Warner Losh
df9c943ac9 Remove __FreeBSD__ version abuse, also de-orbit support for FreeBSD 2
and FreeBSD 3.
2002-07-21 04:18:20 +00:00
Peter Wemm
9c580bea80 Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanly
again.
2002-05-24 05:21:36 +00:00
Eric Melville
096a727e41 Separate "seperate" from kernel source. 2002-05-16 22:43:20 +00:00
Dima Dorfman
b90faaf350 sysctl -w -> sysctl 2002-05-11 06:06:11 +00:00
Nicolas Souchu
ea4122d2bf Fix bktr and pcf compilation with LINT 2002-03-25 21:22:35 +00:00
Nicolas Souchu
c17d43407f Major rework of the iicbus/smbus framework:
- VIA chipset SMBus controllers added
	- alpm driver updated
	- Support for dynamic modules added
	- bktr FreeBSD smbus updated but not tested
	- cleanup
2002-03-23 15:49:15 +00:00
Alfred Perlstein
e51a25f850 Remove __P. 2002-03-20 02:08:01 +00:00
Alfred Perlstein
85f190e4d1 Fixes to make select/poll mpsafe.
Problem:
  selwakeup required calling pfind which would cause lock order
  reversals with the allproc_lock and the per-process filedesc lock.
Solution:
  Instead of recording the pid of the select()'ing process into the
  selinfo structure, actually record a pointer to the thread.  To
  avoid dereferencing a bad address all the selinfo structures that
  are in use by a thread are kept in a list hung off the thread
  (protected by sellock).  When a selwakeup occurs the selinfo is
  removed from that threads list, it is also removed on the way out
  of select or poll where the thread will traverse its list removing
  all the selinfos from its own list.

Problem:
  Previously the PROC_LOCK was used to provide the mutual exclusion
  needed to ensure proper locking, this couldn't work because there
  was a single condvar used for select and poll and condvars can
  only be used with a single mutex.
Solution:
  Introduce a global mutex 'sellock' which is used to provide mutual
  exclusion when recording events to wait on as well as performing
  notification when an event occurs.

Interesting note:
  schedlock is required to manipulate the per-thread TDF_SELECT
  flag, however if given its own field it would not need schedlock,
  also because TDF_SELECT is only manipulated under sellock one
  doesn't actually use schedlock for syncronization, only to protect
  against corruption.

Proc locks are no longer used in select/poll.

Portions contributed by: davidc
2002-03-14 01:32:30 +00:00
John Baldwin
7e1f6dfe9d Modify the critical section API as follows:
- The MD functions critical_enter/exit are renamed to start with a cpu_
  prefix.
- MI wrapper functions critical_enter/exit maintain a per-thread nesting
  count and a per-thread critical section saved state set when entering
  a critical section while at nesting level 0 and restored when exiting
  to nesting level 0.  This moves the saved state out of spin mutexes so
  that interlocking spin mutexes works properly.
- Most low-level MD code that used critical_enter/exit now use
  cpu_critical_enter/exit.  MI code such as device drivers and spin
  mutexes use the MI wrappers.  Note that since the MI wrappers store
  the state in the current thread, they do not have any return values or
  arguments.
- mtx_intr_enable() is replaced with a constant CRITICAL_FORK which is
  assigned to curthread->td_savecrit during fork_exit().

Tested on:	i386, alpha
2001-12-18 00:27:18 +00:00
Robert Watson
058a555781 o Add #include <sys/systm.h> to fix a warning about printf() being
used without a prototype.
2001-11-26 04:06:47 +00:00
Poul-Henning Kamp
efd1585a7a Don't call cdevsw_add(). 2001-11-04 11:50:08 +00:00
Jonathan Lemon
f3a48bd0ae The kernel doesn't have <stdio.h> or <string.h>. Remove these. 2001-10-09 04:05:58 +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
Mark Murray
fb919e4d5a Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)
2001-05-01 08:13:21 +00:00
John Baldwin
0006681fe6 Switch from save/disable/restore_intr() to critical_enter/exit(). 2001-03-28 03:06:10 +00:00
Poul-Henning Kamp
f83880518b Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
John Baldwin
5493ca946e - Lock the process while sending it a signal.
- Attempt to define empty PROC_LOCK/UNLOCK when needed to help keep
  this driver portable.
2001-03-07 03:42:42 +00:00
Garrett Wollman
074a4a2c84 Finish deprecating <sys/select.h> in favor of <sys/selinfo.h> in kernel code. 2001-01-20 02:24:07 +00:00
Garrett Wollman
0a2c3d48c6 select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
Roger Hardiman
def1ddf3a8 Fix typo in comments 2000-10-31 14:30:29 +00:00
Roger Hardiman
51c5172097 Upgrade to driver 2.18
Support for new Hauppauge Model 44xxx WinTV Cards
(the ones with no audio mux)

Submitted by:	Christian Gusenbauer <Christian.Gusenbauer@netway.at>
2000-10-31 13:09:56 +00:00
Roger Hardiman
870b024f5d Add new ioctls for userland access to the MSP device 2000-10-26 16:41:48 +00:00
Roger Hardiman
9dc7a78df5 Fix typo 2000-10-26 16:27:51 +00:00
Roger Hardiman
b02fea74af Add missing 'unit' code
Submitted by:	Brad L. Chisholm <blc@bsdwins.com>
2000-10-20 08:16:53 +00:00
Roger Hardiman
de2c745ce3 Add Daniel's name and fix release data 2000-10-19 07:34:18 +00:00
Roger Hardiman
97e1cf9c1b Update to driver 2.17
Fixes bugs in devfs when unloading and reloading
Syncs with NetBSD changes

Submitted by:	Alexander Langer <alex@big.endian.de>
Submitted by:	Thomas Klausner <wiz@netbsd.org>
Submitted by:	Daniel O'Connor" <doconnor@gsoft.com.au>
2000-10-19 07:33:28 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Roger Hardiman
26d8b8af6f Make MOD_UNLOAD return EBUSY to prevent it being unloaded automatically when we
unload the bktr driver.
Change the sub-section from SI_SUB_PSEDUO to SI_SUB_DRIVERS to make
sure the module initialises before the bktr module
2000-09-11 12:23:50 +00:00
Roger Hardiman
403cbdd892 Change to SI_ORDER_FIRST to make sure this module runs before
the bktr module if both are loaded at the same time (eg in the boot
loader)
2000-09-11 10:37:27 +00:00
Roger Hardiman
5c8dc2dd0d Add MODULE_VERSION and MODULE_DEPENDS to make the bktr module load the
bktr_mem module
2000-09-11 07:14:43 +00:00
Roger Hardiman
dd11af6637 Update to driver 2.15.
Main change is the addition of the bktr_mem module.

This holds onto the bktr driver's contiguously allocated memory
when the bktr driver is unloaded and reloaded.

This has to be done because it is virtually impossible to get
contiguous memory once a system is running.

Also tidied up the use of SMBUS, added a new Hauppauge tuner type (0x2c)
and a new Flyvideo vendor ID.
2000-09-10 14:34:08 +00:00
Peter Wemm
ab1f00b960 Replace previous change by a move of a #include since something else
#includes "smbus.h".    There is still some bogus (but harmless) stuff
here surrounding the #include <sys/bus.h> includes here and elsewhere in
the bktr code.
2000-09-03 05:54:40 +00:00
Peter Wemm
e96d838a6a If we are going to test NSMBUS, we had better #include the file that
defines it.  This creates more warnings rather than less though. These
had gone undetected until now. :-(
2000-09-03 05:44:33 +00:00
Poul-Henning Kamp
db90128160 Avoid the modules madness I inadvertently introduced by making the
cloning infrastructure standard in kern_conf.  Modules are now
the same with or without devfs support.

If you need to detect if devfs is present, in modules or elsewhere,
check the integer variable "devfs_present".

This happily removes an ugly hack from kern/vfs_conf.c.

This forces a rename of the eventhandler and the standard clone
helper function.

Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include
like <sys/queue.h>

Remove all #includes of opt_devfs.h they no longer matter.
2000-09-02 19:17:34 +00:00
Roger Hardiman
dae49011e7 Fix newbus resource allocations
PR:		kern/18744
Submitted by:	Alexander Langer <alex@cichlids.com>
2000-08-24 14:17:06 +00:00
Poul-Henning Kamp
3f54a085a6 Remove all traces of Julians DEVFS (incl from kern/subr_diskslice.c)
Remove old DEVFS support fields from dev_t.

  Make uid, gid & mode members of dev_t and set them in make_dev().

  Use correct uid, gid & mode in make_dev in disk minilayer.

  Add support for registering alias names for a dev_t using the
  new function make_dev_alias().  These will show up as symlinks
  in DEVFS.

  Use makedev() rather than make_dev() for MFSs magic devices to prevent
  DEVFS from noticing this abuse.

  Add a field for DEVFS inode number in dev_t.

  Add new DEVFS in fs/devfs.

  Add devfs cloning to:
        disk minilayer (ie: ad(4), sd(4), cd(4) etc etc)
        md(4), tun(4), bpf(4), fd(4)

  If DEVFS add -d flag to /sbin/inits args to make it mount devfs.

  Add commented out DEVFS to GENERIC
2000-08-20 21:34:39 +00:00
Roger Hardiman
231b1f331e Update to driver 2.14. Adds new Tuner types for Hauppauge WinTV cards 2000-06-28 15:09:12 +00:00
Roger Hardiman
4dcedbebe2 Update to driver 2.13.
This merges in changes from NetBSD which ensure bktr0
(actually bktr%d) is printed at the start of any output lines.

Submitted by:	Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
2000-06-26 09:41:32 +00:00
Peter Wemm
717f014e45 Use the correct register names. s/PCI_MAP_REG_START/PCIR_MAPS/ 2000-05-28 15:48:48 +00:00
Poul-Henning Kamp
3389ae9350 Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>
2000-04-19 14:58:28 +00:00
Poul-Henning Kamp
ed6aff7387 Remove unneeded <sys/buf.h> includes.
Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks
by 924 bytes.
2000-04-18 15:15:39 +00:00
Roger Hardiman
c4a7d3bc98 Remove debugging code 2000-04-16 07:56:58 +00:00