aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cy
Commit message (Collapse)AuthorAgeFilesLines
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-234-8/+9
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Fixed a panic in the probe. The memory resource was accessed afterBruce Evans2007-01-131-2/+3
| | | | | | | | releasing it. This seems to have worked until a few days ago, but now the memory is unmapped. Notes: svn path=/head/; revision=165996
* Catch up with new interrupt handling code.Ruslan Ermilov2005-10-261-2/+2
| | | | Notes: svn path=/head/; revision=151690
* Eliminate two unused arguments to ttycreate().Poul-Henning Kamp2005-10-161-1/+1
| | | | Notes: svn path=/head/; revision=151383
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-051-1/+1
| | | | Notes: svn path=/head/; revision=143161
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Use generic tty code instead of local copy.Poul-Henning Kamp2004-10-051-862/+269
| | | | | | | Also divorce this driver from the sio driver. Notes: svn path=/head/; revision=136139
* Preparation commit for the tty cleanups that will follow in the nearPoul-Henning Kamp2004-07-151-1/+1
| | | | | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming. Notes: svn path=/head/; revision=132226
* Introduce ttygone() which indicates that the hardware is detached.Poul-Henning Kamp2004-07-111-37/+4
| | | | | | | Move dtrwait logic to the generic TTY level. Notes: svn path=/head/; revision=131981
* - Shorten the names for the TTY related swi interrupt handlers as theJohn Baldwin2004-06-281-2/+2
| | | | | | | | | | | 'tty:' prefix is largely redundant. - Fix the priority of the low-priority TTY SWIs that are hung off of the softclock thread. Submitted by: bde (2) Notes: svn path=/head/; revision=131242
* Pick the hotchar out of the tty structure instead of caching privatePoul-Henning Kamp2004-06-261-13/+12
| | | | | | | | | | | copies. No current line disciplines have a dynamically changing hotchar, and expecting to receive anything sensible during a change in ldisc is insane so no locking of the hotchar field is necessary. Notes: svn path=/head/; revision=131134
* Remove the TIOCDCDTIMESTAMP option.Poul-Henning Kamp2004-06-221-11/+0
| | | | | | | | The RFC-2783 PPS-API (<sys/timepps.h>) provides better and more configurable service. Notes: svn path=/head/; revision=130938
* Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.Poul-Henning Kamp2004-06-211-0/+4
| | | | Notes: svn path=/head/; revision=130892
* Second half of the dev_t cleanup.Poul-Henning Kamp2004-06-171-1/+1
| | | | | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc. Notes: svn path=/head/; revision=130640
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-4/+4
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Deorbit COMPAT_SUNOS.Poul-Henning Kamp2004-06-111-2/+2
| | | | | | | | We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither a sparc32 port nor a SunOS4.x compatibility desire these days. Notes: svn path=/head/; revision=130344
* Centralize the line discipline optimization determination in a functionPoul-Henning Kamp2004-06-041-15/+1
| | | | | | | | | | | | called ttyldoptim(). Use this function from all the relevant drivers. I belive no drivers finger linesw[] directly anymore, paving the way for locking and refcounting. Notes: svn path=/head/; revision=130096
* Manual edits to change linesw[]-frobbing to ttyld_*() calls.Poul-Henning Kamp2004-06-041-2/+2
| | | | Notes: svn path=/head/; revision=130095
* Machine generated patch which changes linedisc calls from accessingPoul-Henning Kamp2004-06-041-6/+6
| | | | | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. Notes: svn path=/head/; revision=130077
* Make the remaining serial drivers call ttyioctl() rather than callingPoul-Henning Kamp2004-06-041-8/+3
| | | | | | | the linedisc directly. Notes: svn path=/head/; revision=130057
* There is no need to explicitly call the stop function. In all likelyhoodPoul-Henning Kamp2004-06-011-1/+0
| | | | | | | ->l_close() did it and ttyclose certainly will. Notes: svn path=/head/; revision=129939
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-302-0/+2
| | | | Notes: svn path=/head/; revision=129879
* Remove "register_t eflags; eflags = read_eflags();" because 1) it wasn'tPeter Wemm2004-05-161-4/+0
| | | | | | | subsequently used in the code, and 2) it doesn't compile on !i386. Notes: svn path=/head/; revision=129292
* Reduce differences with cy_isa.c: fixed an unsorted include.Bruce Evans2004-05-011-5/+1
| | | | | | | Remove unused includes. Notes: svn path=/head/; revision=128805
* Reduce differences with cy_pci.c: add a description of this file, andBruce Evans2004-05-011-3/+7
| | | | | | | | | don't use too many tabs in declarations. Attempt to complete KNFization of this file (1 more indentation fix). Notes: svn path=/head/; revision=128804
* Adjust pathnames for the move from i386/isa to dev/cy.Bruce Evans2004-05-013-15/+16
| | | | | | | | | Adjust staticness and a variable name for the split of cy.c into cy.c and cy_isa.c. Use the new header required for the split to avoid repeating declarations in cy_pci.c. Notes: svn path=/head/; revision=128800
* New header for exporting declarations of things not closely related toBruce Evans2004-05-011-0/+36
| | | | | | | | hardware. A couple of the declarations were misplaced in cy_pci.c, and cy_isa.c needs a couple more. The exported interfaces should be cleaner. Notes: svn path=/head/; revision=128799
* Removed bits related to isa configuration. These have been moved toBruce Evans2004-05-011-108/+0
| | | | | | | | cy_isa.c via a repo-copy of this file (except for some static declarations which will become non-static in a new header). Notes: svn path=/head/; revision=128798
* Remove bits not related to isa configuration. This file was repo-copiedBruce Evans2004-05-011-2863/+0
| | | | | | | from cy.c. Notes: svn path=/head/; revision=128797
* Converted the isa probe and attach to new-bus so that this driver worksBruce Evans2004-04-053-92/+164
| | | | | | | | | | | | | | | | | | | | | | | | without the (defunct) isa compatibility shims. The new-bus-specific parts are very similar to the ones for the pci probe and attach. This was held up too long waiting for a repo copy to src/sys/dev/cy, so I decided to fix the files in their old place. This gives easier to read and merge diffs anyway. The "count" line in src/sys/conf/files won't be changed until after the repo copy, so old kernel configs that specify a count need not be (and must not be) changed until then. The count is just ignored in the driver. One unfinished detail is dynamic allocation of arrays with <count> and (<count> * 32) entries, and iteration over the arrays. This is now kludged with a fixed count of 10 (up to 10 cards with up to 32 ports each). Prodded by: imp Submitted by: mostly by imp Approved by: imp Notes: svn path=/head/; revision=127885
* Moved initialization of the lock from the (isa) probe function to theBruce Evans2004-04-052-12/+12
| | | | | | | | | | common attach function so that the lock gets initialized in all cases. This fixes breakage of the initialization of the lock in the pci case in rev.1.135 (between the releases of 5.1 and 5.2). The lock is only used in the SMP case, so this bug was not always fatal. Notes: svn path=/head/; revision=127883
* Device megapatch 4/6:Poul-Henning Kamp2004-02-212-2/+4
| | | | | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
* Device megapatch 3/6:Poul-Henning Kamp2004-02-212-6/+0
| | | | | | | | | | | | | | | Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures. Notes: svn path=/head/; revision=126078
* Device megapatch 1/6:Poul-Henning Kamp2004-02-212-4/+0
| | | | | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
* Fixed some minor indentation bugs.Bruce Evans2003-12-021-12/+12
| | | | | | | Approved by: re (scottl) Notes: svn path=/head/; revision=123105
* Fixed breakage of the pci case of the cy driver by the new interruptBruce Evans2003-12-023-79/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | code. Both the driver and the new code were wrong. Driver interrupt handlers are supposed to take "void *vsc" arg, but some including all COMPAT_ISA drivers and the pci part of the cy driver want an "int unit" arg. They got this using bogus casts of function pointers which should have kept working despite their bogusness. However, the new interrupt code doesn't honor requests to pass an arg of ((void *)0), so things are very broken if the arg is actually a representation of unit 0. The fix is to use a normal "void *vsc" arg for the pci case and a wrapper for the COMPAT_ISA case (of the cy driver). This cleans up new-busification of the pci case but takes the COMPAT_ISA case a little further from new-bus. The corresponding bug for the COMPAT_ISA case has already been fixed similarly using a wrapper in compat_isa.c and we need another wrapper just to undo that. Fixed some directly related style bugs (mainly by removing compatibility cruft). cy.c: Fixed an indirectly related old bug in cyattach_common(). A wrong status was returned in the unlikely event that malloc() failed. Approved by: re (scottl) Notes: svn path=/head/; revision=123104
* Restored the call to schedsofttty() (now spelled swi_sched(...)) again.Bruce Evans2003-11-162-28/+38
| | | | | | | | | | | Its restoration in rev.1.102 was mistranslated to the equivalent of setsofttty() in rev.1.105. This increased overheads by causing a context switch to the SWI handler after almost every interrupt. The increase was approx. 50% on a Celeron 366 (from 23 usec to 34 usec per interrupt). Notes: svn path=/head/; revision=122799
* Localized the cy driver's locking.Bruce Evans2003-11-162-46/+40
| | | | Notes: svn path=/head/; revision=122771
* MFsio (sio.c 1.413: cleaned up and fixed setting of speeds in comparam()).Bruce Evans2003-09-272-46/+24
| | | | | | | | | This is just a cleanup here (modulo rev.1.108 of kern/tty.c), since the input speed can be different from to output speed and extra code to handle both speeds naturally handled all cases. Notes: svn path=/head/; revision=120512
* Quick fix for bitrot in locking in the SMP case. cd_getreg() andBruce Evans2003-09-272-8/+48
| | | | | | | | | | | | | cd_setreg() were still using !(read_eflags() & PSL_I) as the condition for the lock hidden by COM_LOCK() (if any) being held. This worked when spin mutexes and/or critical_enter() used hard interrupt disablement, but it has caused recursion on the non-recursive mutex com_mtx since all relevant interrupt disablement became soft. The recursion is harmless unless there are other bugs, but it breaks an invariant so it is fatal if spinlocks are witnessed. Notes: svn path=/head/; revision=120504
* Use __FBSDID().David E. O'Brien2003-06-111-2/+3
| | | | Notes: svn path=/head/; revision=116192
* 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-46/+44
| | | | | | | | | 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-50/+50
| | | | Notes: svn path=/head/; revision=92765
* Remove __P.Alfred Perlstein2002-03-201-2/+2
| | | | Notes: svn path=/head/; revision=92739