Commit Graph

285 Commits

Author SHA1 Message Date
Peter Wemm
9928855f97 Recognize the GVC0505 (GVC 56k Faxmodem) as a sio device.
Obtained from: Dan J Fraser <dfraser@capybara.org> (for NetBSD)
1999-12-27 05:02:25 +00:00
Peter Wemm
684fb19e34 Extract a list of extra isa pnp modem ID's from NetBSD and OpenBSD. Some
of these are bound to have a PNP05xx compatid, but there's no easy way to
tell.  Since it's just an ID list and uses the pnp header's description
strings rather than encoding strings here, it doesn't seem to be too
expensive to err on the safe side.
1999-12-21 09:16:03 +00:00
Peter Wemm
99c215c08b Add SUP2070 (Diamond SupraExpress 56i)
Submitted by:  Kenneth Wayne Culver <culverk@wam.umd.edu>

Add MOT4560
Obtained from: wollman
1999-12-20 20:31:23 +00:00
Warner Losh
0712c356a3 o Make pccard work at all by including card.h
o fix return type of sio_pccard_detach
o don't free softc in deatch, since that is done by newbus
o disconnect interrupt we used to have.  Add cookie to com so that we can
  tear down the interrupt on unload
o Set gone earlier, but likely doesn't matter

This makes sio pccards work again.  Cards that are active when ejects may
not work (but they might, softc goes away quickly).

These changes are unreviewed by bde.  I'll make any style changes he wants.
1999-12-10 08:19:19 +00:00
Peter Wemm
4246912f31 Fix a pair of silly warnings that I introduced (that would have been
nasty on an Alpha or some other sizeof(int) != sizeof(long) machine).
1999-12-06 17:52:20 +00:00
Peter Wemm
d0029cf5f3 Use bus_get_resource() instead of bus_get_resource_start() as the latter
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.
1999-12-06 06:47:02 +00:00
Warner Losh
e09f49b6fa Fix the hang on card eject problem and maybe the hang on suspend
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)
1999-12-01 07:38:54 +00:00
Peter Wemm
592b1c00b5 Argh, don't turn the IIR test on unless it's a pccard. These tests mess
up the subsequent probes.
1999-11-18 10:29:06 +00:00
Peter Wemm
1447114333 Merge some typo fixes from dev/sio/sio.c (siostop -> comstop)
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).
1999-11-18 07:22:41 +00:00
Warner Losh
806338b15d Last change to pccard_nbk now obviates the need to check the name of
the device in question.
Also fix warnings on if_ep_pccard.c
1999-10-28 05:06:14 +00:00
Warner Losh
a57cd933dc Add newbus pccard attachment for sio. Some of this code was written
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.
1999-10-25 02:46:52 +00:00
Steve Price
004348c300 Add support for the USRobotics Courier V.Everything (USR0101) modem.
Submitted by:	Robert Blayzor <robert@superior.net>
1999-10-11 15:06:14 +00:00
Daniel Eischen
3c6967023c Change pnp ID for the SupraExpress 56i Sp V.90 modem (logical ID
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
1999-10-03 22:25:19 +00:00
Daniel Eischen
c0d3a0d572 Add logical device ID for the Diamond SupraExpress 56K PnP modem:
Vendor ID SUP2480 (0x8024b04e), Serial Number 0x00001334
  PnP Version 1.0, Vendor Version 0
  Device Description: SupraExpress 56i Sp V.90

Reviewed by:	dfr
1999-10-03 17:50:09 +00:00
Poul-Henning Kamp
d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
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
1999-09-25 18:24:47 +00:00
Poul-Henning Kamp
ae8e1d08d7 This patch clears the way for removing a number of tty related
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
1999-09-25 16:21:39 +00:00
Peter Wemm
213fcefef2 Make it build, copy from dev/sio/sio.c:
isa_set_flags -> device_set_flags
isa_get_flags -> device_get_flags
1999-09-08 13:46:54 +00:00
Peter Wemm
f97d942bd0 Restore the old sio* - bruce can fix it himself. 1999-09-08 10:59:03 +00:00
Peter Wemm
e5174d14c5 Repo copy isa/sio* to dev/sio/sio* in preperation for extra bus methods
including pci.
Also, eliminate NSIOTOT and do it dynamically where it matters.
1999-09-06 14:06:23 +00:00
Peter Wemm
945f740363 Move the #if 0 to catch the card.h include and make sure it's zero. 1999-09-06 13:30:36 +00:00
Warner Losh
13264f28fb Start to disentangle the isa attachments from other buses. Partially
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
1999-09-06 06:45:20 +00:00
Doug Rabson
bd64ce72a8 Add USR3031 pnp id.
Submitted by: Steve Price <sprice@hiwaay.net>
1999-09-04 14:31:56 +00:00
Doug Rabson
1c3111dc06 Remove the last vestiges of the old pnp code in favour of the new one. 1999-09-03 20:01:08 +00:00
Doug Rabson
4249382df0 This represents essentially a complete rewrite of the ISA PnP code. The
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.
1999-09-01 20:53:43 +00:00
Poul-Henning Kamp
c5b72c3d85 s/si_tty_tty/si_tty/g 1999-08-30 10:35:37 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Poul-Henning Kamp
9dcbe2404a Convert DEVFS hooks in (most) drivers to make_dev().
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().
1999-08-23 20:59:21 +00:00
Poul-Henning Kamp
f1fe3bf115 make alpha compile again. 1999-08-09 11:02:45 +00:00
Poul-Henning Kamp
ce9edcf5b5 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
Poul-Henning Kamp
4cb4c215e5 Allocate and register struct tty on the fly. 1999-08-08 20:25:14 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
Kazutaka YOKOTA
f94ae09657 Skip the device if it is disabled, when searching for a serial port
to be used for the kernel console in sccnprobe().
1999-06-29 17:34:16 +00:00
Kazutaka YOKOTA
6e8394b8ba The second phase of syscons reorganization.
- 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.
1999-06-22 14:14:06 +00:00
Peter Wemm
20510b2017 Use the proper interfaces to find if a device is enabled, don't dig into
the bus mechanism's private internals!
1999-06-20 13:10:09 +00:00
Greg Lehey
89bf63adaa sioprobe: Don't try to initialize disabled ports. In particular,
attempting to initialize sio3 caused problems with ATI video boards,
which cleverly share the I/O space.

PR: kern/12295
1999-06-19 08:14:56 +00:00
Kirk McKusick
5e1a20fd26 COM_LLCONSOLE should over-ride COM_DEBUGGER request. 1999-06-15 22:15:10 +00:00
Poul-Henning Kamp
3faff79c9e The PPSAPI group defines the polarity in draft 3, we guessed it wrong. 1999-05-31 06:57:31 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
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.
1999-05-30 16:53:49 +00:00
Doug Rabson
46e1f231cd Simplistic pnp support. Needs more ids to be added. 1999-05-30 11:14:39 +00:00
Doug Rabson
0476a4d4ff Allow a sio port with its flags set to DEBUGGER+LLCONSOLE to be used for
gdb. This allows the sio probe for that port to be disabled which stops
it from confusing the debugger.
1999-05-28 09:37:11 +00:00
Doug Rabson
6f50cfb43a Use the resource apis to manipulate resources. 1999-05-22 15:47:34 +00:00
Doug Rabson
1d3710bdf3 Adjust console stuff now that makedev is no longer a macro. 1999-05-10 14:01:35 +00:00
Peter Wemm
d1935ba94c Make COM_ESP and COM_MULTIPORT compile for LINT. It might even work.. 1999-05-09 20:35:02 +00:00
Peter Wemm
1d361692a7 Optimize out a couple of places where com_addr() is used twice in a row,
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.
1999-05-09 16:56:38 +00:00
Peter Wemm
6f42b336a5 Move opt_sio.h options to conf/options and activate in isa/sio.c 1999-05-09 13:10:49 +00:00
Poul-Henning Kamp
52400704e9 Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between
a major number for a dev_t.
1999-05-09 13:00:50 +00:00
Poul-Henning Kamp
3000820ae0 add some amount of sanity to the way the gdb stuff finds its device.
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.
1999-05-09 10:51:13 +00:00
Poul-Henning Kamp
1a4dd80a43 siocngetc & putc can be staticized. 1999-05-09 10:28:50 +00:00
Doug Rabson
566643e39e Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +00:00
Kirk McKusick
5c92a5b353 Get rid of extern declarations on gdb stuff so systems compiled without
DDB will compile. Warn users that try to use GDB without specifying a GDB
port in their configuration file.
1999-05-07 23:08:23 +00:00