summaryrefslogtreecommitdiff
path: root/sys/dev/cy
AgeCommit message (Collapse)Author
2020-07-30remove some long abandonded serial drivers (cy, rc, rp) since 2008John-Mark Gurney
Reviewed by: phk (earlier version) Reviewed by: emaste (earlier version) Reviewed by: bcr (earlier version) Reviewed by: zeising (earlier version) Differential Revision: https://reviews.freebsd.org/D25874 Notes: svn path=/head/; revision=363683
2018-04-06Move most of the contents of opt_compat.h to opt_global.h.Brooks Davis
opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941 Notes: svn path=/head/; revision=332122
2017-11-27sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
2017-11-20sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
2017-04-27Revert r317446 and bring back cy(4).John Baldwin
Requested by: bde Notes: svn path=/head/; revision=317509
2017-04-26Remove the cy(4) driver for Cyclades serial adapters.John Baldwin
This driver has been disconnected from the build since the new tty layer was introduced in 8.0 and was never updated for new tty. Notes: svn path=/head/; revision=317446
2016-04-26sys/dev: extend use of the howmany() macro when available.Pedro F. Giffuni
We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Notes: svn path=/head/; revision=298646
2016-02-25Fix the build.Justin Hibbits
Pointy-hat to: jhibbits Spotted by: bde Notes: svn path=/head/; revision=296023
2016-02-19Replace several bus_alloc_resource() calls using default arguments with ↵Justin Hibbits
bus_alloc_resource_any() Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306 Notes: svn path=/head/; revision=295790
2007-02-23o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati
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
2007-01-13Fixed a panic in the probe. The memory resource was accessed afterBruce Evans
releasing it. This seems to have worked until a few days ago, but now the memory is unmapped. Notes: svn path=/head/; revision=165996
2005-10-26Catch up with new interrupt handling code.Ruslan Ermilov
Notes: svn path=/head/; revision=151690
2005-10-16Eliminate two unused arguments to ttycreate().Poul-Henning Kamp
Notes: svn path=/head/; revision=151383
2005-03-05Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh
Notes: svn path=/head/; revision=143161
2005-01-06Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh
Notes: svn path=/head/; revision=139749
2004-10-05Use generic tty code instead of local copy.Poul-Henning Kamp
Also divorce this driver from the sio driver. Notes: svn path=/head/; revision=136139
2004-07-15Preparation commit for the tty cleanups that will follow in the nearPoul-Henning Kamp
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
2004-07-11Introduce ttygone() which indicates that the hardware is detached.Poul-Henning Kamp
Move dtrwait logic to the generic TTY level. Notes: svn path=/head/; revision=131981
2004-06-28- Shorten the names for the TTY related swi interrupt handlers as theJohn Baldwin
'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
2004-06-26Pick the hotchar out of the tty structure instead of caching privatePoul-Henning Kamp
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
2004-06-22Remove the TIOCDCDTIMESTAMP option.Poul-Henning Kamp
The RFC-2783 PPS-API (<sys/timepps.h>) provides better and more configurable service. Notes: svn path=/head/; revision=130938
2004-06-21Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.Poul-Henning Kamp
Notes: svn path=/head/; revision=130892
2004-06-17Second half of the dev_t cleanup.Poul-Henning Kamp
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
2004-06-16Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp
Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
2004-06-11Deorbit COMPAT_SUNOS.Poul-Henning Kamp
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
2004-06-04Centralize the line discipline optimization determination in a functionPoul-Henning Kamp
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
2004-06-04Manual edits to change linesw[]-frobbing to ttyld_*() calls.Poul-Henning Kamp
Notes: svn path=/head/; revision=130095
2004-06-04Machine generated patch which changes linedisc calls from accessingPoul-Henning Kamp
linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. Notes: svn path=/head/; revision=130077
2004-06-04Make the remaining serial drivers call ttyioctl() rather than callingPoul-Henning Kamp
the linedisc directly. Notes: svn path=/head/; revision=130057
2004-06-01There is no need to explicitly call the stop function. In all likelyhoodPoul-Henning Kamp
->l_close() did it and ttyclose certainly will. Notes: svn path=/head/; revision=129939
2004-05-30Add missing <sys/module.h> includesPoul-Henning Kamp
Notes: svn path=/head/; revision=129879
2004-05-16Remove "register_t eflags; eflags = read_eflags();" because 1) it wasn'tPeter Wemm
subsequently used in the code, and 2) it doesn't compile on !i386. Notes: svn path=/head/; revision=129292
2004-05-01Reduce differences with cy_isa.c: fixed an unsorted include.Bruce Evans
Remove unused includes. Notes: svn path=/head/; revision=128805
2004-05-01Reduce differences with cy_pci.c: add a description of this file, andBruce Evans
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
2004-05-01Adjust pathnames for the move from i386/isa to dev/cy.Bruce Evans
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
2004-05-01New header for exporting declarations of things not closely related toBruce Evans
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
2004-05-01Removed bits related to isa configuration. These have been moved toBruce Evans
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
2004-05-01Remove bits not related to isa configuration. This file was repo-copiedBruce Evans
from cy.c. Notes: svn path=/head/; revision=128797
2004-04-05Converted the isa probe and attach to new-bus so that this driver worksBruce Evans
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
2004-04-05Moved initialization of the lock from the (isa) probe function to theBruce Evans
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
2004-02-21Device megapatch 4/6:Poul-Henning Kamp
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
2004-02-21Device megapatch 3/6:Poul-Henning Kamp
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
2004-02-21Device megapatch 1/6:Poul-Henning Kamp
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
2003-12-02Fixed some minor indentation bugs.Bruce Evans
Approved by: re (scottl) Notes: svn path=/head/; revision=123105
2003-12-02Fixed breakage of the pci case of the cy driver by the new interruptBruce Evans
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
2003-11-16Restored the call to schedsofttty() (now spelled swi_sched(...)) again.Bruce Evans
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
2003-11-16Localized the cy driver's locking.Bruce Evans
Notes: svn path=/head/; revision=122771
2003-09-27MFsio (sio.c 1.413: cleaned up and fixed setting of speeds in comparam()).Bruce Evans
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
2003-09-27Quick fix for bitrot in locking in the SMP case. cd_getreg() andBruce Evans
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
2003-06-11Use __FBSDID().David E. O'Brien
Notes: svn path=/head/; revision=116192