summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio/sio.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Use bus_get_resource() instead of bus_get_resource_start() as the latterpeter1999-12-061-17/+24
| | | | | | | | | returns "0" on failure, which is indistinguishable from (say) irq 0. This should stop a couple of stray messages that turn up. Also, if a BUS_SETUP_INTR() fails with INTR_TYPE_FAST, try falling back to a normal interrupt. This might help pccard folks with a shared slot interrupt. This whole thing needs to be revisited.
* Fix the hang on card eject problem and maybe the hang on suspendimp1999-12-011-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem. o Create new timeout routine so we don't detach the card inside a ISR but instead drop back to spl0 via a timeout of 0. o Actually delete the child of the pccard device rather than just faking it badly. o Fix sio, ed and ep to have pccard detach routines that are int rather than void. o Fix ep and ed pccard detach routines to use if_detach rather than just if_down. if_detach destroys the device, while if_down just marks it down. In this incarnation of the pccard things, we map the disable the slot action to detach the driver, which removes the driver from the device tree. When that is done, a panic would soon follow as the ifconfig tried to down the device. Didn't fix: o Should cache the pccard dev child's pointer in struct slot o remove now unused parts of struct slot o Any driver using softc after detach has been called. sio's softc used to be statically allocated, so you could check sc->gone, but that is now gone. o Didn't remove gone from softc of drivers that use the old pccard method. Didn't test: o ed driver changes o sio driver changes on pccards o suspend (no laptop or apm support on my desktop)
* Argh, don't turn the IIR test on unless it's a pccard. These tests messpeter1999-11-181-24/+20
| | | | up the subsequent probes.
* Merge some typo fixes from dev/sio/sio.c (siostop -> comstop)peter1999-11-181-47/+93
| | | | | | | | | | | | | | | Remove EXTRA_SIO/NSIOTOT and make it fully dynamic (from dev/sio/sio.c) Make sio work for pccard here - pccardd doesn't activate interrupts until after prove has succeeded. Mark the initial reset of likely sio ports as broken as it depended on config supplying a list of locations to probe, devices are now proved standalone. Optimize a bit of COM_NOAST4() logic. Use bus_get_resource_start() etc rather than using isa-centric calls. Reactivate the IIR_TXRDYBUG test, I've got a card here with it. Try to be a bit smarter about activating interrupts (ie: don't panic if polled) Fix some style bugs that have crept in over time (there are still more).
* Last change to pccard_nbk now obviates the need to check the name ofimp1999-10-281-7/+0
| | | | | the device in question. Also fix warnings on if_ep_pccard.c
* Add newbus pccard attachment for sio. Some of this code was writtenimp1999-10-251-97/+97
| | | | | | | | | | by Peter Wemm, but I've not merged all the changes he sent to me yet. This has not been reviewed by bde, so I'm committing to resolve any issues he has with this when he returns from FreeBSD CON 99. I've had four reports of this working for them. I've been able to communicate to both my built in modem and a pccard modem with these patches.
* Add support for the USRobotics Courier V.Everything (USR0101) modem.steve1999-10-111-0/+1
| | | | Submitted by: Robert Blayzor <robert@superior.net>
* Change pnp ID for the SupraExpress 56i Sp V.90 modem (logical IDdeischen1999-10-031-2/+4
| | | | | | | | | | 0x8024b04e) so that the cards description is used instead of overriding it. While I'm here, add an ID for the SUP2080 and the SUP2030. PR: kern/13983 Submitted by: Kurt D. Zeilenga <Kurt@OpenLDAP.Org> (SUP2030) dfr (rest of change) Reviewed by: dfr
* Add logical device ID for the Diamond SupraExpress 56K PnP modem:deischen1999-10-031-0/+1
| | | | | | | | Vendor ID SUP2480 (0x8024b04e), Serial Number 0x00001334 PnP Version 1.0, Vendor Version 0 Device Description: SupraExpress 56i Sp V.90 Reviewed by: dfr
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+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
* This patch clears the way for removing a number of tty relatedphk1999-09-251-23/+7
| | | | | | | | | | | | | | | | | | | | | 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
* Make it build, copy from dev/sio/sio.c:peter1999-09-081-4/+4
| | | | | isa_set_flags -> device_set_flags isa_get_flags -> device_get_flags
* Restore the old sio* - bruce can fix it himself.peter1999-09-081-0/+3060
|
* Repo copy isa/sio* to dev/sio/sio* in preperation for extra bus methodspeter1999-09-061-3060/+0
| | | | | including pci. Also, eliminate NSIOTOT and do it dynamically where it matters.
* Move the #if 0 to catch the card.h include and make sure it's zero.peter1999-09-061-1/+3
|
* Start to disentangle the isa attachments from other buses. Partiallyimp1999-09-061-16/+14
| | | | | | | | | | | | | | rewrite the pccard attachment case. This is a work in progress, but doesn't break the isa case. I left the #if 0...#endif around the pccard stuff, at Peter's request, so that normal users don't shoot themselves in the foot. While I was here: o Indent a comment to the right location o Spell Unknown with a final 'n'. Reviewed by: peter
* Add USR3031 pnp id.dfr1999-09-041-0/+1
| | | | Submitted by: Steve Price <sprice@hiwaay.net>
* Remove the last vestiges of the old pnp code in favour of the new one.dfr1999-09-031-106/+1
|
* This represents essentially a complete rewrite of the ISA PnP code. Thedfr1999-09-011-8/+13
| | | | | | | | new system is integrated with the ISA bus code more cleanly and allows the future addition of more enumerators such as PnPBIOS and ACPI. This commit also enables the new pcm driver since it is somewhat tied to the new PnP code.
* s/si_tty_tty/si_tty/gphk1999-08-301-2/+2
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-33/+13
| | | | | | | | | | | | | | | | 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().
* make alpha compile again.phk1999-08-091-16/+5
|
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-2/+2
| | | | may not compile, I can't test it.
* Allocate and register struct tty on the fly.phk1999-08-081-13/+3
|
* Remove cmaj and bmaj args from DEV_DRIVER_MODULE.phk1999-07-041-3/+2
|
* Skip the device if it is disabled, when searching for a serial portyokota1999-06-291-0/+5
| | | | to be used for the kernel console in sccnprobe().
* The second phase of syscons reorganization.yokota1999-06-221-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split syscons source code into manageable chunks and reorganize some of complicated functions. - Many static variables are moved to the softc structure. - Added a new key function, PREV. When this key is pressed, the vty immediately before the current vty will become foreground. Analogue to PREV, which is usually assigned to the PrntScrn key. PR: kern/10113 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de> - Modified the kernel console input function sccngetc() so that it handles function keys properly. - Reorganized the screen update routine. - VT switching code is reorganized. It now should be slightly more robust than before. - Added the DEVICE_RESUME function so that syscons no longer hooks the APM resume event directly. - New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING, SC_NO_HISTORY and SC_NO_SYSMOUSE. Various parts of syscons can be omitted so that the kernel size is reduced. SC_PIXEL_MODE Made the VESA 800x600 mode an option, rather than a standard part of syscons. SC_DISABLE_DDBKEY Disables the `debug' key combination. SC_ALT_MOUSE_IMAGE Inverse the character cell at the mouse cursor position in the text console, rather than drawing an arrow on the screen. Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG) SC_DFLT_FONT makeoptions "SC_DFLT_FONT=_font_name_" Include the named font as the default font of syscons. 16-line, 14-line and 8-line font data will be compiled in. This option replaces the existing STD8X16FONT option, which loads 16-line font data only. - The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c. - The video driver provides a set of ioctl commands to manipulate the frame buffer. - New kernel configuration option: VGA_WIDTH90 Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These modes are mot always supported by the video card. PR: i386/7510 Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx. - The header file machine/console.h is reorganized; its contents is now split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h (another new file). machine/console.h is still maintained for compatibility reasons. - Kernel console selection/installation routines are fixed and slightly rebumped so that it should now be possible to switch between the interanl kernel console (sc or vt) and a remote kernel console (sio) again, as it was in 2.x, 3.0 and 3.1. - Screen savers and splash screen decoders Because of the header file reorganization described above, screen savers and splash screen decoders are slightly modified. After this update, /sys/modules/syscons/saver.h is no longer necessary and is removed.
* Use the proper interfaces to find if a device is enabled, don't dig intopeter1999-06-201-3/+2
| | | | the bus mechanism's private internals!
* sioprobe: Don't try to initialize disabled ports. In particular,grog1999-06-191-2/+4
| | | | | | | attempting to initialize sio3 caused problems with ATI video boards, which cleverly share the I/O space. PR: kern/12295
* COM_LLCONSOLE should over-ride COM_DEBUGGER request.mckusick1999-06-151-2/+2
|
* The PPSAPI group defines the polarity in draft 3, we guessed it wrong.phk1999-05-311-2/+2
|
* This commit should be a extensive NO-OP:phk1999-05-301-7/+21
| | | | | | | | | | | | | 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.
* Simplistic pnp support. Needs more ids to be added.dfr1999-05-301-1/+8
|
* Allow a sio port with its flags set to DEBUGGER+LLCONSOLE to be used fordfr1999-05-281-2/+2
| | | | | gdb. This allows the sio probe for that port to be disabled which stops it from confusing the debugger.
* Use the resource apis to manipulate resources.dfr1999-05-221-6/+21
|
* Adjust console stuff now that makedev is no longer a macro.dfr1999-05-101-2/+3
|
* Make COM_ESP and COM_MULTIPORT compile for LINT. It might even work..peter1999-05-091-6/+6
|
* Optimize out a couple of places where com_addr() is used twice in a row,peter1999-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.
* Move opt_sio.h options to conf/options and activate in isa/sio.cpeter1999-05-091-2/+2
|
* Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference betweenphk1999-05-091-2/+2
| | | | a major number for a dev_t.
* add some amount of sanity to the way the gdb stuff finds its device.phk1999-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.
* siocngetc & putc can be staticized.phk1999-05-091-7/+3
|
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-4/+4
| | | | to the BUS_SETUP_INTR call.
* Get rid of extern declarations on gdb stuff so systems compiled withoutmckusick1999-05-071-6/+9
| | | | | DDB will compile. Warn users that try to use GDB without specifying a GDB port in their configuration file.
* fix it so it compiles on alpha againmjacob1999-05-071-1/+5
|
* Continue where Julian left off in July 1998:phk1999-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.)
* Generalize to allow any serial port to be used as the GDB port.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.
* Fix up a few easy 'assignment used as truth value' and 'suggest parenspeter1999-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.
* Suser() simplification:phk1999-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.
OpenPOWER on IntegriCloud