aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cy
Commit message (Collapse)AuthorAgeFilesLines
...
* Use __FBSDID().David E. O'Brien2003-06-022-4/+6
| | | | Notes: svn path=/head/; revision=115703
* - Express hard dependencies on bus (pci, isa, pccard) andMatthew N. Dodd2003-04-151-0/+1
| | | | | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.) Notes: svn path=/head/; revision=113506
* Make nokqfilter() return the correct return value.Poul-Henning Kamp2003-03-032-2/+2
| | | | | | | Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers. Notes: svn path=/head/; revision=111821
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-032-28/+20
| | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=111815
* Remove #include <sys/dkstat.h>Poul-Henning Kamp2003-02-162-2/+0
| | | | Notes: svn path=/head/; revision=111002
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-012-6/+6
| | | | | | | | | | | | | | | 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@ Notes: svn path=/head/; revision=93593
* Fixed some style bugs in the removal of __P(()). The main ones wereBruce Evans2002-03-232-44/+42
| | | | | | | | | 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. Notes: svn path=/head/; revision=93024
* Remove __P.Alfred Perlstein2002-03-202-48/+48
| | | | Notes: svn path=/head/; revision=92765
* Remove __P.Alfred Perlstein2002-03-201-2/+2
| | | | Notes: svn path=/head/; revision=92739
* Work around a PLX9050 bug that causes system lockup in certain systems,Bruce Evans2002-03-171-3/+4
| | | | | | | | | | | | depending on the MMIO addresses allocated to the board. PR: 30965, 20845 (maybe) Submitted by: Daniela Squassoni <daniela@cyclades.com> Tested by: Arjan Knepper <arjan@jak.nl> Scott Klement <klemscot@klements.com> Notes: svn path=/head/; revision=92467
* Initialize a variable bogusly to avoid a gcc bug that causes a spuriousBruce Evans2002-02-262-0/+6
| | | | | | | warning. Notes: svn path=/head/; revision=91314
* Merged cy_pcireg.h into the one file that uses it (cy_pci.c).Bruce Evans2002-02-021-1/+16
| | | | Notes: svn path=/head/; revision=90102
* Fixed breakage of interrupt setup in previous commit. It used anBruce Evans2002-02-021-0/+2
| | | | | | | uninitialized variable in the !CY_PCI_FASTINTR case (*blush*). Notes: svn path=/head/; revision=90101
* Change the preemption code for software interrupt thread schedules andJohn Baldwin2002-01-052-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=88900
* Modify the critical section API as follows:John Baldwin2001-12-182-142/+112
| | | | | | | | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=88088
* Call to cdevsw_add() no longer needed.Poul-Henning Kamp2001-11-042-2/+0
| | | | Notes: svn path=/head/; revision=86008
* KSE Milestone 2Julian Elischer2001-09-122-20/+20
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=83366
* Fixed minor numbers when there is more than one cy card.Bruce Evans2001-08-132-12/+30
| | | | | | | | | PR: 19256 Submitted by: initial version by yokota MFC after: 1 week Notes: svn path=/head/; revision=81580
* Use ttymalloc() instead of a static array of `struct tty'. This willBruce Evans2001-08-132-30/+4
| | | | | | | | | | be a regression until `pstat -t' actually understands the results of ttymalloc(). Submitted by: mostly by yokota Notes: svn path=/head/; revision=81576
* Remove unneeded includes of sys/ipl.h and machine/ipl.h.John Baldwin2001-05-152-2/+0
| | | | Notes: svn path=/head/; revision=76650
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inMark Murray2001-05-012-4/+8
| | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=76166
* Typo fix. s/criticale_t/critical_t/Peter Wemm2001-03-282-2/+2
| | | | Notes: svn path=/head/; revision=74938
* Switch from save/disable/restore_intr() to critical_enter/exit().John Baldwin2001-03-282-198/+156
| | | | Notes: svn path=/head/; revision=74903
* Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp2001-03-262-2/+0
| | | | | | | the bit-bucket. Notes: svn path=/head/; revision=74810
* Extend kqueue down to the device layer.Jonathan Lemon2001-02-152-4/+6
| | | | | | | Backwards compatible approach suggested by: peter Notes: svn path=/head/; revision=72521
* RIP <machine/lock.h>.Mark Murray2001-02-112-2/+42
| | | | | | | | | | Some things needed bits of <i386/include/lock.h> - cy.c now has its own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK() has been moved to <i386/include/apic.h> (AKA <machine/apic.h>). Reviewed by: jhb Notes: svn path=/head/; revision=72358
* Revert the spin mutex for the cy(4) driver.John Baldwin2001-02-092-138/+304
| | | | | | | Requested by: bde Notes: svn path=/head/; revision=72262
* - Use a spin mutex instead of COM_LOCK, since COM_LOCK is going away.John Baldwin2001-02-092-330/+166
| | | | | | | | | The same name from the sio(4) driver was used and an appropriate dictionary item added at the top to reduce diffs. - Catch up to the new swi API. Notes: svn path=/head/; revision=72242
* Converted to new-bus.Bruce Evans2001-02-011-57/+85
| | | | | | | Reviewed by: imp Notes: svn path=/head/; revision=71892
* Added used include of <sys/mutex.h>. The SMP case was broken byBruce Evans2001-01-302-0/+2
| | | | | | | | | incompletely converting simplelocks to mutexes (COM_LOCK() is supposed to hide the SMP locking internals, but it now depends on mutex interfaces being visible). Notes: svn path=/head/; revision=71846
* Disable cy - it is now completely broken and needs non-trivial work.Peter Wemm2001-01-251-5/+0
| | | | Notes: svn path=/head/; revision=71611
* Special case for compiling LINT - just give a warning and continue on.Peter Wemm2001-01-171-0/+5
| | | | | | | | At least we have a chance at getting test compile coverage for the rest of the kernel now. Notes: svn path=/head/; revision=71135
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-082-4/+2
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Move suser() and suser_xxx() prototypes and a related #define fromPoul-Henning Kamp2000-10-292-2/+0
| | | | | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>. Notes: svn path=/head/; revision=67893
* - Catch up to new software interrupt code.John Baldwin2000-10-252-6/+6
| | | | | | | | | - Add a missing curly brace. Noticed by: phk Notes: svn path=/head/; revision=67584
* - Overhaul the software interrupt code to use interrupt threads for eachJohn Baldwin2000-10-252-30/+32
| | | | | | | | | | | | | | | | | | | | | | type of software interrupt. Roughly, what used to be a bit in spending now maps to a swi thread. Each thread can have multiple handlers, just like a hardware interrupt thread. - Instead of using a bitmask of pending interrupts, we schedule the specific software interrupt thread to run, so spending, NSWI, and the shandlers array are no longer needed. We can now have an arbitrary number of software interrupt threads. When you register a software interrupt thread via sinthand_add(), you get back a struct intrhand that you pass to sched_swi() when you wish to schedule your swi thread to run. - Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit more intuitive. Also, prefix all the members of struct intrhand with 'ih_'. - Make swi_net() a MI function since there is now no point in it being MD. Submitted by: cp Notes: svn path=/head/; revision=67551
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-152-2/+0
| | | | Notes: svn path=/head/; revision=67164
* Don't depend on <machine/cpufunc.h> unnecessarily including <machine/lock.h>.Bruce Evans2000-10-122-4/+0
| | | | Notes: svn path=/head/; revision=67023
* Use schedsofttty() again (SMPng casualty with intentionally wrong fixBruce Evans2000-10-082-10/+2
| | | | | | | | | | in rev.1.101). Made this file compile again after move of stuff from <machine.ipl.h> to <sys/ipl.h>. Notes: svn path=/head/; revision=66823
* Make LINT link.Poul-Henning Kamp2000-09-162-0/+8
| | | | | | | cy driver is broken post SMPng. Notes: svn path=/head/; revision=65935
* Make LINT compile.Poul-Henning Kamp2000-09-162-2/+2
| | | | Notes: svn path=/head/; revision=65931
* Make LINT compile again.Poul-Henning Kamp2000-09-161-0/+1
| | | | Notes: svn path=/head/; revision=65930
* Major update to the way synchronization is done in the kernel. HighlightsJason Evans2000-09-072-106/+288
| | | | | | | | | | | | | | | | | | include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh Notes: svn path=/head/; revision=65557
* Mass update of isa drivers using compatability shims to usePeter Wemm2000-05-282-2/+20
| | | | | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table. Notes: svn path=/head/; revision=61011
* Ahhrggg. Put the test for the compat shims AFTER the file that includesWarner Losh2000-03-271-4/+4
| | | | | | | | | them. Pointed out by: bde Notes: svn path=/head/; revision=58701
* Per conversations in -current, add #error to these drivers when you don'tWarner Losh2000-03-271-0/+4
| | | | | | | have the right compatibility shims enabled. ISA drivers to follow later. Notes: svn path=/head/; revision=58695
* Clean up some more loose ends..Peter Wemm2000-01-232-2/+2
| | | | | | | | | | | isa_device->id_ri_flags and RI_FAST were not implemented and did nothing. The two drivers that were mistakenly thinking this was working were cy.c and loran.c - these should be converted to newbus. GC (garbage collect) isa_device->id_alive GC userconfig.c references to isa_device->id_scsiid (!). Notes: svn path=/head/; revision=56439
* Introduce ttyread() and ttywrite() which do the canonical thing.Poul-Henning Kamp1999-09-282-38/+2
| | | | | | | | | Use them in many tty drivers. Reviewed by: julian, bde Notes: svn path=/head/; revision=51756
* Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp1999-09-252-10/+0
| | | | | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags Notes: svn path=/head/; revision=51658
* This patch clears the way for removing a number of tty relatedPoul-Henning Kamp1999-09-252-52/+20
| | | | | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags Notes: svn path=/head/; revision=51654