summaryrefslogtreecommitdiff
path: root/sys/dev/sio/sio.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Make COM_ESP and COM_MULTIPORT compile for LINT. It might even work..Peter Wemm1999-05-091-6/+6
| | | | Notes: svn path=/head/; revision=46834
* Optimize out a couple of places where com_addr() is used twice in a row,Peter Wemm1999-05-091-27/+9
| | | | | | | | | | although this is pretty trivial. devclass_get_softc() is a tad more expensive than the old com_addr() implementation. If Bruce is really worried about the cost of this, it could always be changed so that the softc pointer is stored in a local array again. Notes: svn path=/head/; revision=46809
* Move opt_sio.h options to conf/options and activate in isa/sio.cPeter Wemm1999-05-091-2/+2
| | | | Notes: svn path=/head/; revision=46794
* Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference betweenPoul-Henning Kamp1999-05-091-2/+2
| | | | | | | a major number for a dev_t. Notes: svn path=/head/; revision=46792
* add some amount of sanity to the way the gdb stuff finds its device.Poul-Henning Kamp1999-05-091-9/+10
| | | | | | | | | | | I'm not too happy about the result either, but at least it has less chance of backfiring. This particular feature could be called "a mess" without offending anybody. Notes: svn path=/head/; revision=46783
* siocngetc & putc can be staticized.Poul-Henning Kamp1999-05-091-7/+3
| | | | Notes: svn path=/head/; revision=46779
* Move the declaration of the interrupt type from the driver structureDoug Rabson1999-05-081-4/+4
| | | | | | | to the BUS_SETUP_INTR call. Notes: svn path=/head/; revision=46743
* Get rid of extern declarations on gdb stuff so systems compiled withoutKirk McKusick1999-05-071-6/+9
| | | | | | | | DDB will compile. Warn users that try to use GDB without specifying a GDB port in their configuration file. Notes: svn path=/head/; revision=46658
* fix it so it compiles on alpha againMatt Jacob1999-05-071-1/+5
| | | | Notes: svn path=/head/; revision=46650
* Continue where Julian left off in July 1998:Poul-Henning Kamp1999-05-071-3/+3
| | | | | | | | | | | | | | | | | Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.) Notes: svn path=/head/; revision=46635
* Generalize to allow any serial port to be used as the GDB port.Kirk McKusick1999-05-071-21/+65
| | | | | | | | | | | | Mark the GDB port in the config file with flags 0x80. Currently only the sio driver checks these flags and sets up a GDB port, but adding similar code to other serial drivers would be easy. For backward compatibility, if an sio port is marked as the console and no port is marked as the gdb port, the GDB port will be mapped to the console port. This hack should go away at some point. Notes: svn path=/head/; revision=46624
* Fix up a few easy 'assignment used as truth value' and 'suggest parensPeter Wemm1999-05-061-5/+5
| | | | | | | | around && within ||' type warnings. I'm pretty sure I have not masked any problems here, I've committed real problem fixes seperately. Notes: svn path=/head/; revision=46571
* Suser() simplification:Poul-Henning Kamp1999-04-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* Modify the non-i386 version of disable_intr() and enable_intr() so that theyDmitrij Tejblum1999-04-241-3/+3
| | | | | | | don't produce a warning on every use. Notes: svn path=/head/; revision=45994
* Tidy up a few things left over from the conversion from i386/isa/sio.c.Peter Wemm1999-04-181-4/+21
| | | | | | | Leave two #if 0'd notes about the way things used to be done for reference. Notes: svn path=/head/; revision=45780
* Register sio interrupts as fast (fixing some silo overflow messages).Doug Rabson1999-04-181-2/+2
| | | | Notes: svn path=/head/; revision=45777
* Merge up to rev 1.234 (nice revision number!) of i386/isa/sio.c.Peter Wemm1999-04-171-115/+206
| | | | Notes: svn path=/head/; revision=45730
* Merge up to rev 1.226 of i386/isa/sio.cPeter Wemm1999-04-171-210/+14
| | | | Notes: svn path=/head/; revision=45729
* Bring the 'new-bus' to the i386. This extensively changes the way thePeter Wemm1999-04-161-16/+39
| | | | | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core Notes: svn path=/head/; revision=45720
* Use suser() to check for super user rather than examining cr_uid directly.Poul-Henning Kamp1999-01-301-2/+3
| | | | | | | | | Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles. Notes: svn path=/head/; revision=43425
* Update the pccard hooks to use a module style declaration instead.Peter Wemm1999-01-191-12/+3
| | | | Notes: svn path=/head/; revision=42820
* Add support for another 3COM/USR PNP modem, USR3031.Steve Price1998-12-131-1/+2
| | | | Notes: svn path=/head/; revision=41741
* * Add hooks to allow the X server to access I/O ports and memory.Doug Rabson1998-11-151-8/+9
| | | | | | | | | | | | * Update drivers to the latest version of the bus interface. The ISA drivers' use of the new resource api is minimal. Garrett has some much cleaner drivers which should be more easily shared between i386 and alpha. This has only been tested on cia based machines. It should work on lca and apecs but I might have broken something. Notes: svn path=/head/; revision=41181
* Merge changes from i386/isa/sio.c up to revision 1.215.Doug Rabson1998-09-261-46/+42
| | | | Notes: svn path=/head/; revision=39685
* Underlying ,v files were copied and detagged. Re-commit old versionsPeter Wemm1998-09-261-166/+333
| | | | | | | onto the head revision. (mainly using sys/bus.h etc for alpha) Notes: svn path=/head/; revision=39679
* Support PnP compatibility IDs. This allow e.g. the ed driver to pickEivind Eklund1998-09-131-19/+17
| | | | | | | | | | up any PnP NE2000 compatible card, instead of forcing us to always update ID lists. Submitted by: Ugo Paternostro <paterno@dsi.unifi.it> Notes: svn path=/head/; revision=39144
* Fixed printf format errors.Bruce Evans1998-08-231-2/+2
| | | | Notes: svn path=/head/; revision=38488
* Added D_TTY to the cdevswitch flags for all tty drivers. This is requiredBruce Evans1998-08-231-4/+5
| | | | | | | | | | | | 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-201-7/+7
| | | | Notes: svn path=/head/; revision=38444
* Enabled dynamically sized tty input buffers (with enough bufferingBruce Evans1998-08-191-9/+10
| | | | | | | | | | | | | | | 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
* Register tty software interrupt handlers at run time using register_swi()Bruce Evans1998-08-111-15/+10
| | | | | | | | | | 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
* Changed %n to %r in devfs name format strings. %n has almost gone away.Bruce Evans1998-07-151-7/+7
| | | | Notes: svn path=/head/; revision=37683
* Avoid some panics in sio_unload which gets called with various dirtPoul-Henning Kamp1998-06-241-1/+9
| | | | | | | if the attach of a modem card failed. Notes: svn path=/head/; revision=37135
* Don't log "unexpected" events on never-opened devices. Events leftBruce Evans1998-06-161-11/+4
| | | | | | | | | | | over from the probe are now expected for incompatible UARTs that deliver IRQs as a strobe (low) instead of a level (high). Discard events on going-away devices too. Endless loops may have been possible when an active pccard was removed. Notes: svn path=/head/; revision=37013
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-2/+2
| | | | | | | | | | | | | 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
* Force success of the probe (after doing it as before except in oneBruce Evans1998-06-031-4/+5
| | | | | | | | | | | | | | | | | miscconfigured case) if the port is the console. This fixes several bugs: - if all sioprobe()s failed, then the console driver followed null pointers in cdevsw[]. - if the sioprobe() for the console failed but another sioprobe() succeeded, then init hung early when the console couldn't be opened. - it was silly for the console to not be there after printing boot messages on it. Bugs introduced by this are hopefully no worse than old ones caused by forcing the success of the `cn' level probe. Notes: svn path=/head/; revision=36613
* Fixed a printf() arg botch in the previous commit.Bruce Evans1998-06-031-7/+6
| | | | | | | | | | | | Only complain about an irq mismatch in the probe if the configured irq doesn't become active, and then print the bitmap of irqs that became active (including clock irqs) instead of just the first (not including clock irqs). Bugs reported by: msmith Notes: svn path=/head/; revision=36611
* Converted the ICU-level interrupt tests (3, 5 and 8) in sioprobe() intoBruce Evans1998-05-311-22/+27
| | | | | | | | | | | | a test of the irq number, and made failure of this test non-fatal. Removed related unused complications for the APIC_IO case. Removed the no-test3 flag. Deverbosified the failure messages for the other tests. Removed the per-port verbose flag - just use the general verbose flag. Notes: svn path=/head/; revision=36492
* LoadSoftModem() routine at sio.c does not trap general serial I/Os.Poul-Henning Kamp1998-05-201-2/+2
| | | | | | | | | | | It fauls to probe eather DSI Modem or others. PR: 4657 Reviewed by: phk Submitted by: Kenji Saito <marukun@mx2.nisiq.net> Notes: svn path=/head/; revision=36246
* The PnP code in 2.2.6 detects the Motorola ModemSurfer 56K,Poul-Henning Kamp1998-05-131-1/+2
| | | | | | | | | | | | but doesn't do much of anything with it. I added it to siopnp_ids[] and it was found and recognized as a serial port. PR: 6605 Reviewed by: phk Submitted by: Dave Marquardt <marquard@zilker.net> Notes: svn path=/head/; revision=36004
* Detect USR PnP x2 modem.Poul-Henning Kamp1998-05-041-1/+2
| | | | | | | | | PR: 6496 Reviewed by: phk Submitted by: Kurt D. Zeilenga <Kurt@Boolean.NET> Notes: svn path=/head/; revision=35686
* PCCARD-code related style nits, as requested.Mike Smith1998-02-271-4/+4
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=33864
* Fix some style nits and remove an unused header.Mike Smith1998-02-271-2/+1
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=33860
* - If a PCCARD serial device is removed from the system, let the serialNate Williams1998-02-141-2/+2
| | | | | | | | driver 'break out' of the infinite loop waiting for a response from it. This is a bad thing, but no worse than having the kernel hang. Notes: svn path=/head/; revision=33350
* Implement the spirit but not the letter of Terrys hot-char patch.Poul-Henning Kamp1998-02-131-11/+2
| | | | | | | | | | 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-241-1/+2
| | | | | | | | | | | 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
* 1. Supporting a bogus 16550A compatible PCMCIA CARD stuffsAtsushi Murai1998-01-081-4/+71
| | | | | | | | | | | | | | | | | | | | | | - IIR_TXRDY is never off even if reading a IIR register. - Know as PIAFS "Palido 321S", "DC-*S" oemed by Sharp corp. 2. Omiting a restrict probing if it's already probed by pccardd. Note: Define a new id_flags as follows 0x40000 - NO PROBE (Already probed as serial) 0x80000 - Has a bogus IIR_TXRDY register Sato Junichi <junichi@astec.co.jp> Nrihiro Kumagai <kuma@slab.tnr.sharp.co.jp> Hirao Tetsuya <ai.cs.fujitsu.co.jp> Toshiharu Asai <asai@mbc.infoshere.or.jp> Shin'ya Kumabuchi <kumabu@t3.rim.or.jp> Freebsd-users-jp@jp.freebsd.org bsd-nomads@ai.cs.fujitsu.co.jp Notes: svn path=/head/; revision=32331
* Fixed initialization of the divisor latch. We depended on siocnopen()Bruce Evans1997-12-281-2/+21
| | | | | | | | | initializing it for the (usual) (siocniobase != 0) case, but siocnopen() doesn't initialize it if the latch registers already have the correct values. Notes: svn path=/head/; revision=32047
* Always call ttwwakeup() before returning from comstart(). It isn'tBruce Evans1997-12-281-1/+2
| | | | | | | | | necessary to call it when the tty layer's output state has not been changed, but siostop() sometimes changes the TS_BUSY state and then calls comstart() mainly for its side effect of calling ttwwakeup(). Notes: svn path=/head/; revision=32044
* Make COMPAT_43 and COMPAT_SUNOS new-style options.Eivind Eklund1997-12-161-1/+2
| | | | Notes: svn path=/head/; revision=31778