aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cy
Commit message (Collapse)AuthorAgeFilesLines
...
* $Id$ -> $FreeBSD$Peter Wemm1999-08-284-4/+4
| | | | Notes: svn path=/head/; revision=50477
* Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp1999-08-232-58/+14
| | | | | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev(). Notes: svn path=/head/; revision=50254
* Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entirePeter Wemm1999-07-031-6/+1
| | | | | | | files. config will leave the whole file out if configured to do so. Notes: svn path=/head/; revision=48528
* Really fix cy-driver-related panics when SMP is configured. Rev.1.88 onlyBruce Evans1999-06-042-6/+10
| | | | | | | | | fixed half the problem. Tested by: Michael Scott Boers <mboers@datacompusa.com> Notes: svn path=/head/; revision=47737
* Simplify cdevsw registration.Poul-Henning Kamp1999-05-312-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up. Notes: svn path=/head/; revision=47640
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-05-302-14/+42
| | | | | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors. Notes: svn path=/head/; revision=47625
* Don't call disable_intr() when interrupts are already disabled, sinceBruce Evans1999-05-282-6/+12
| | | | | | | | | | disable_intr() does non-recursive locking in the SMP case. This should fix cy-driver-related panics when SMP is configured. Broken in: rev.1.73 (3.1 and -current) Notes: svn path=/head/; revision=47585
* Detect PCI device IDs for latest boards. Simplified the ID comparisons.Bruce Evans1999-05-101-5/+4
| | | | | | | Submitted by: Ivan Passos <ivan@cyclades.com> (rewritten by me) Notes: svn path=/head/; revision=46879
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:Peter Wemm1999-05-091-5/+1
| | | | | | | | | | | #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.) Notes: svn path=/head/; revision=46813
* Make this compile with CY_PCI_FASTINTR again.Peter Wemm1999-05-021-2/+5
| | | | Notes: svn path=/head/; revision=46335
* Suser() simplification:Poul-Henning Kamp1999-04-272-8/+8
| | | | | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code. Notes: svn path=/head/; revision=46112
* Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn'tPeter Wemm1999-04-241-1/+5
| | | | | | | hurt the driver portability to 3.x too much for where drivers are shared. Notes: svn path=/head/; revision=46024
* Added missing newline to "no ports found!" message.Alexander Langer1999-04-151-2/+2
| | | | Notes: svn path=/head/; revision=45692
* YAMFsio.c (1.227-1.228: set up input buffering dynamically).Bruce Evans1999-02-042-232/+378
| | | | Notes: svn path=/head/; revision=43611
* Use suser() to check for super user rather than examining cr_uid directly.Poul-Henning Kamp1999-01-302-4/+6
| | | | | | | | | Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles. Notes: svn path=/head/; revision=43425
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-282-54/+54
| | | | | | | kernel compile Notes: svn path=/head/; revision=43314
* Use a fast interrupt handler for the PCI version of the cy driverBruce Evans1999-01-151-2/+13
| | | | | | | | | | | if option CY_PCI_FASTINTR is configured and mapping the irq to a fastintr is possible. Unfortunately, this has to be optional because pci_map_int_right() doesn't handle the INTR_EXCL flag right -- INTR_EXCL is honoured even if the interrupt needs to be non-exclusive for other devices to work. Notes: svn path=/head/; revision=42691
* Fixed minor style bugs in previous commit.Bruce Evans1999-01-111-12/+10
| | | | Notes: svn path=/head/; revision=42541
* Updated for not-so-new version of Cyclom-Y PCI boards (with a customBruce Evans1999-01-111-3/+19
| | | | | | | | | | | register for the PLX id). Merge the vendor's modification of the 2.2.* release version into -current for reference. Will be cleaned up in next commit. Obtained from: ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/3.0/cyy30.tar.gz Notes: svn path=/head/; revision=42540
* Unspammed includes in <machine/cpufunc.h> in the !SMP case. PartiallyBruce Evans1999-01-082-2/+8
| | | | | | | unspammed them in the SMP case. Notes: svn path=/head/; revision=42410
* Flush the fifos at the correct place in cyopen(). Various thingsBruce Evans1998-12-242-62/+34
| | | | | | | | | | | | | | in cyopen() were done in a different order than in sioopen(), partly to (ab)use a side effect of comparam() and partly because I didn't understand what the reset was doing (it flushes the fifos). This turned out to be more than a cosmetic problem. Flushing the fifos quite late is good for discarding input that arrived while the line state was being initialized, and in the cy driver it also seems to reduce a problem with input that arrived long ago during the previous close (the UART loses sync too easily and for too long). Notes: svn path=/head/; revision=42045
* Wait for channel commands to complete after issuing the commands.Bruce Evans1998-12-192-30/+58
| | | | | | | | | | | | | The optimisation of only waiting before issuing new commands is obviously invalid in general and it caused many errors in NIST-PCTS. I think the errors were mostly for characters sent with the wrong parity, etc., after a half complete tcsetattr(). Use microtime() instead of a magic loop count to limit the wait. The wait is a busy-wait :-( and normally takes about 500 usec. Notes: svn path=/head/; revision=41940
* Flush the tx fifo in cystop(). Now ttyflush() (and thus tcflush(3))Bruce Evans1998-12-172-6/+8
| | | | | | | | | | | | | almost works properly. Unfortunately, there is no way to flush the rx fifo without resetting the channel, which also flushes the tx fifo. We avoid resetting even when both fifos need to be flushed, since resetting seems to cause the rx to lose sync if it is done while data is arriving. Reminded by: NIST-PCTS Notes: svn path=/head/; revision=41908
* Fixed handling of BREAK in input. BREAK was not being converted into anBruce Evans1998-12-172-6/+14
| | | | | | | | | escape sequence in the `-ignbrk -brkint parmrk' case. Found by: NIST-PCTS Notes: svn path=/head/; revision=41905
* Oops, this should have been in the previous commit (ensure atomic updateBruce Evans1998-12-172-2/+6
| | | | | | | of com->cor[1]). Notes: svn path=/head/; revision=41904
* Implemented sending of BREAKs. This is quite complicated because theBruce Evans1998-12-172-28/+330
| | | | | | | | | | | hardware is interrupt-driven to a fault and sending a BREAK requires mode switching. Always running in the BREAK-capable mode as in PR 8318 would double the overhead for sending \0's. Reminded by: PR 8318 Notes: svn path=/head/; revision=41903
* probe function changed from returning char * to const char *.Matthew Dillon1998-12-141-3/+3
| | | | Notes: svn path=/head/; revision=41771
* Fixed sloppy clearing of TS_BUSY. Don't clear it until the transmitterBruce Evans1998-11-282-24/+142
| | | | | | | | | | | | is completely empty. There is an interrupt for output completion. It is painful to use, but polling method used in the corresponding fix in sio.c (rev.1.152) can't be used because there is no status bit for transmitter-empty. Now ttywait() works right. Reminded by: NIST-PCTS Notes: svn path=/head/; revision=41388
* Merge from sio.c rev.1.163:Bruce Evans1998-11-282-4/+4
| | | | | | | | | | Don't call timeout() for DTR wakeup if the relevant timeout is already active. This fixes "timeout table full" panics when sufficiently many cyopen()s are interrupted while they are sleeping waiting for the timeout to expire. Notes: svn path=/head/; revision=41385
* Untangled the Cyclades offsets a little. CY16_RESET and CY_CLEAR_INTRBruce Evans1998-11-233-30/+48
| | | | | | | | | | | | were half of their physical offsets for ISA and 1/4 of their physical offsets for PCI, while all other Cyclades offsets were physical/1 for ISA and physical/2 for PCI. Logically wrong macros were used to scale CY16_RESET and CY_CLEAR_INTR to the correct physical offsets. Fixed some style bugs (mostly long lines). Notes: svn path=/head/; revision=41309
* Reduce i/o overheads by not preserving the channel access register inBruce Evans1998-11-222-226/+260
| | | | | | | | | | interrupt handlers. Instead, load and use it atomically as necessary. This reduces mode switching overhead for "polled" mode interrupt handling from 5 i/o's to 3 (per service type, per port) so that polled mode is only slightly more inefficient than "interrupt" mode. Notes: svn path=/head/; revision=41293
* Initialize isa_devtab entries for interrupt handlers in individualBruce Evans1998-10-222-2/+6
| | | | | | | | | | device drivers, not in ioconf.c. Use a different hack in isa_device.h so that a new config(8) is not required yet. pc98 parts approved by: kato Notes: svn path=/head/; revision=40565
* Added D_TTY to the cdevswitch flags for all tty drivers. This is requiredBruce Evans1998-08-232-8/+10
| | | | | | | | | | | | for the Lite2 fix for always returning EIO in dead_read(). Cleaned up the cdevswitch initializers for all tty drivers. Removed explicit calls to ttsetwater() from all (tty) drivers. ttsetwater() is now called centrally for opens, not just for parameter changes. Notes: svn path=/head/; revision=38485
* Fixed devfs initialization which I broke in the previous commit.Bruce Evans1998-08-202-20/+20
| | | | | | | Fixed an old name and disorder in the sio dictionary. Notes: svn path=/head/; revision=38445
* Enabled dynamically sized tty input buffers (with enough bufferingBruce Evans1998-08-192-18/+20
| | | | | | | | | | | | | | | for 1 second's worth of input) and larger tty output buffers. The interrupt-level buffers are still too small for speeds above 115200 bps (only a little too small for 230400 bps if RTS flow control is enabled). Don't call ttsetwater() explicitly in open(). It is now called for the TTYDISC l_open() and should be static. Don't attempt to register the cdevsw more than once. Notes: svn path=/head/; revision=38435
* Cleaned up previous commit, mainly by moving repetitive calculationsBruce Evans1998-08-133-234/+127
| | | | | | | | | | | | of invariants to cyattach(). Fixed minor bugs: - cyparam() returned without restoring the ipl in the error cases. This was harmless because cyparam() is always called at spltty(). - one check for "rev. J or higher" actually checked for precisely rev. J. Notes: svn path=/head/; revision=38303
* Updated for not-so-new version of Cyclom-Y boards (with 60MHz clock andBruce Evans1998-08-133-80/+246
| | | | | | | | | | swapped RTS/DTR). Merge the vendor's modification of the 2.2.6-release version into -current for reference. Will be cleaned up in next commit. Obtained from: ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/2.2.6/cyy226.tar.gz Notes: svn path=/head/; revision=38302
* Register tty software interrupt handlers at run time using register_swi()Bruce Evans1998-08-112-30/+22
| | | | | | | | | | instead of at compile time using ifdefs. Use _swi_null instead of dummycamisr. CAM and dpt should call register_swi() instead of hacking on ihandlers[] directly. Notes: svn path=/head/; revision=38246
* Fixed sign extension bugs awoken by changing speed_t to an unsignedBruce Evans1998-07-292-4/+8
| | | | | | | | | | type. 19200, 1200 and other relatively uninteresting speeds were broken. Submitted by: Rob Mallory <rmallory@qualcomm.com> Notes: svn path=/head/; revision=37959
* Changed %n to %r in devfs name format strings. %n has almost gone away.Bruce Evans1998-07-152-14/+14
| | | | Notes: svn path=/head/; revision=37683
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-072-4/+4
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Protect against count of chars received being 0, which causes a panicDavid Greenman1998-03-182-2/+6
| | | | | | | | | otherwise. Can apparantly happen with some firmware revs. Submitted by: Kouichi Hirabayashi <kh@mogami-wire.co.jp> Notes: svn path=/head/; revision=34661
* Implement the spirit but not the letter of Terrys hot-char patch.Poul-Henning Kamp1998-02-132-22/+4
| | | | | | | | | | The differences Terrys patch and this patch are: * Remove a lot of un-needed comments. * Don't put l_hotchar at the front of stuct linesw, there is no need to. * Use the #defines for the hotchar in the SLIP and PPP line disciplines Notes: svn path=/head/; revision=33322
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.Eivind Eklund1998-01-242-2/+4
| | | | | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow. Notes: svn path=/head/; revision=32726
* YAMFsio.c (always call ttwwakeup() before returning from comstart()).Bruce Evans1997-12-282-2/+4
| | | | Notes: svn path=/head/; revision=32045
* Make COMPAT_43 and COMPAT_SUNOS new-style options.Eivind Eklund1997-12-162-2/+6
| | | | Notes: svn path=/head/; revision=31778
* Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that areBruce Evans1997-12-062-6/+6
| | | | | | | | not handled at a particular level. This fixes mainly restarting of interrupted TIOCDRAINs and TIOCSETA{W,F}s. Notes: svn path=/head/; revision=31577
* Fixed chip_offsets[] which I broke in rev.1.53. The offsets aren'tBruce Evans1997-11-102-4/+4
| | | | | | | | | | | | actually offsets, they are offsets scaled by dividing by 2^cy_align. I use different values for cy_align since the -current values are unnaturally scaled, so I need different offsets, and the wrong offsets got committed. Reported by: nnd@itfs.nsk.su (N.Dudorov) Notes: svn path=/head/; revision=31104
* aha1542.c aic6360.c cy.c fd.c ft.cJustin T. Gibbs1997-09-212-10/+18
| | | | | | | | | | | | | | | if_ie.c if_wl.c if_zp.c isa.c isa_device.h labpc.c mcd.c ncr5380.c scd.c seagate.c si.c sio.c tw.c ultra14f.c wcd.c wd.c: Update for changes in the callout interface. apic_vector.s icu_vector.s ipl.s ipl_funcs.c: Add CAM software/hardware interrupt support. Notes: svn path=/head/; revision=29677
* Update select -> poll in drivers.Peter Wemm1997-09-142-4/+4
| | | | Notes: svn path=/head/; revision=29368