Commit Graph

2232 Commits

Author SHA1 Message Date
Greg Lehey 88c8f9c911 Change the name of drive state "uninit" to "referenced": it only
occurs if we have a dangling pointer to a drive.
1999-03-02 06:51:48 +00:00
Søren Schmidt 8b89ef0a2d Finally!!
The much roumored replacement for our current IDE/ATA/ATAPI is
materialising in the CVS repositories around the globe.

So what does this bring us:

A new reengineered ATA/ATAPI subsystem, that tries to overcome
most of the deficiencies with the current drivers.

It supports PCI as well as ISA devices without all the hackery
in ide_pci.c to make PCI devices look like ISA counterparts.

It doesn't have the excessive wait problem on probe, in fact you
shouldn't notice any delay when your devices are getting probed.

Probing and attaching of devices are postponed until interrupts
are enabled (well almost, not finished yet for disks), making
things alot cleaner.

Improved performance, although DMA support is still WIP and not
in this pre alpha release, worldstone is faster with the new
driver compared to the old even with DMA.

So what does it take away:

There is NO support for old MFM/RLL/ESDI disks.
There is NO support for bad144, if your disk is bad, ditch it, it has
already outgrown its internal spare sectors, and is dying.

For you to try this out, you will have to modify your kernel config
file to use the "ata" controller instead of all wdc? entries.

example:

# for a PCI only system (most modern machines)
controller 	ata0
device		atadisk0	# ATA disks
device		atapicd0	# ATAPI CDROM's
device		atapist0	# ATAPI tapes

#You should add the following on ISA systems:
controller	ata1	at isa? port "IO_WD1" bio irq 14
controller	ata2	at isa? port "IO_WD2" bio irq 15

You can leave it all in there, the system knows how to manage.

For now this driver reuses the device entries from the old system
(that will probably change later), but remember that disks are
now numbered in the sequence they are found (like the SCSI system)
not as absolute positions as the old system.

Although I have tested this on all the systems I can get my hands on,
there might very well be gremlins in there, so use AT YOU OWN RISK!!
This is still WIP, so there are lots of rough edges and unfinished
things in there, and what I have in my lab might look very different
from whats in CVS at any given time. So please have all eventual
changes go through me, or chances are they just dissapears...

I would very much like to hear from you, both good and bad news
are very welcome.

Enjoy!!

-Søren
1999-03-01 21:19:19 +00:00
Luigi Rizzo d560f7208b Fix handling of IFF_ALLMULTI. The code did not call
tulip_addr_filter() on SIOCSIFFLAGS, and was nuking the IFF_ALLMULTI
on entering tulip_addr_filter(). As a result it was impossible to run
a multicast router on a machine with a "de" interface.
1999-03-01 16:54:28 +00:00
Roger Hardiman efe3a31e73 My changes:
Added autodetection of MMAC Osprey 100 card for
Jan Schmidt <mmedia@rz.uni-greifswald.de>. The MMAC card has an EEPROM
which contains an ASCII string beginning with "MMAC".
Corrected Hauppauge Audio Mux Mute value from 0x01 to 0x04.
Fixed a typo.

Sumitted change:
Added ALPS Tuner Type submitted by Hiroki Mori <mori@infocity.co.jp>

Submitted by:	Roger Hardiman and Hiroki Mori <mori@infocity.co.jp>
1999-02-25 07:45:47 +00:00
Bill Paul 141ae16656 Add support for still more cheapo 10/100 cards: Delta Electronics and
Addtron appear to have their own VIA Rhine II and RealTek 8139 boards
with custom PCI vendor and device IDs. This commit updates the PCI
vendor and device lists in the vr and rl drivers so that we can probe
the additional devices.

Found by: nosing around the PCI vendor and device code list at:
	http://www.halcyon.com/scripts/jboemler/pci/pcicode
1999-02-23 15:38:25 +00:00
Mark Newton 86e9118bcc Converted "streams" pseudo-device into a KLD 1999-02-22 11:44:46 +00:00
Nick Hibma 88cac66373 Bug fix: Trap 12 when ugen not present and therefore unattached physical
device removed.
1999-02-21 16:53:35 +00:00
Nick Hibma f96f6ae5d8 Device unload code is broken, disabled. Requires a bit of redesign on the
part of the uhub driver to be able to fix it. Modules should not be
unloaded as they unload partially. Not easy to fix either.
1999-02-21 16:36:30 +00:00
Nick Hibma 6b769ffb36 make ums look like a Mouse Systems or Sysmouse mouse. Remove PS/2 interf.
Supplied by MAEKAWA Masahide <bishop@rr.iij4u.or.jp>. Thanks!
USB Mouse now supports up to 7 buttons and X,Y,Z (wheel) directions.
1999-02-21 16:20:19 +00:00
Julian Elischer b9e0c7858a Add a quick note to say what the 3 uuencoded files are. 1999-02-21 09:36:33 +00:00
Nick Hibma 7d0d9122c9 Bug fix: devcount was running from [count..0], should be [count-1..0] 1999-02-20 19:22:00 +00:00
Julian Elischer 722012cc0c World, I'd like you to meet the first FreeBSD token Ring driver.
This  is for various Olicom cards. An IBM driver is following.
This patch also adds support to tcpdump to decode packets on tokenring.
Congratulations to the proud father.. (below)

Submitted by:	Larry Lile <lile@stdio.com>
1999-02-20 11:18:00 +00:00
Nick Hibma d894d5dedb 1) In polling mode (during boot) the callout_handle wasn't
initialised (PR1).
	Thanks to "Louis A. Mamakos" <louie@TransSys.COM> for his patient
	testing of my mods.
     2) Removed some debugging output (PR1)
1999-02-19 22:48:28 +00:00
Nick Hibma fe5ba84529 Moved [uo]hci_pci.c from /sys/dev/pci to /sys/pci after Soren
threatened to send Bruce. These files are no longer shared
   with NetBSD anyway.

   Requires a config and make depend.
1999-02-18 21:42:19 +00:00
Kenneth D. Merry 043653d4ff Set the devstat priority for ccd devices to DEVSTAT_PRIORITY_CCD
instead of DEVSTAT_PRIORITY_OTHER.
1999-02-18 21:11:53 +00:00
Nick Hibma e99cd85d69 Moved busreset in uhci_init up to avoid clearing of FLBASE in Via 83572
(PR1)
1999-02-18 21:03:10 +00:00
Nick Hibma fe7627280b Applied patch from MAEKAWA Masahide <bishop@rr.iij4u.or.jp>. (PR2)
Seems to solve a problem with a mouse not responding to movements in the
X direction. Problem description is still rather vague and solution is
not exactly clear. Problem might be a compiler optimisation.
1999-02-15 21:41:43 +00:00
Nick Hibma 08c3a58944 Added vendor Compaq/CMDTACH and USB067[03] 1999-02-15 21:39:49 +00:00
Nick Hibma 48f79d0e5c Added more verbose debugging output to uhci_run 1999-02-15 20:43:17 +00:00
Roger Hardiman 02819e7033 Corrected ioctl numbers conflict.
Thanks to Vsevolod Lobko <seva@alex-ua.com> for spotting this.
P:
1999-02-15 11:04:36 +00:00
Nicolas Souchu 5174ad8b76 More appropriate fix to the id_irq read during probe 1999-02-14 22:02:47 +00:00
Nicolas Souchu a1142115dd The way the interrupt id was calculated was wrong and the lpt
driver was thinking irq was enabled although it wasn't.
This case was particular to a no-interrupt static configuration.

Reported by: "Norman C. Rice" <nrice@emu.sourcee.com>
1999-02-14 17:09:59 +00:00
Nicolas Souchu 17b5923dbb Move away from lpt.h data structure definition that only lpt.c relies on.
Remove if_plip.c dependency to lpt.h.
1999-02-14 16:19:16 +00:00
Nicolas Souchu 4012f363f2 Return approriate errors to userland. 1999-02-14 14:36:45 +00:00
Nicolas Souchu 3ab971c14f Fix interrupt handling with DMA. Bit nFault was tested in the control reg.
instead of the status reg. and check ECP mode before considering nFault.
1999-02-14 12:03:35 +00:00
Nicolas Souchu fdf94d1afe Rename nlpt to lpt.
Remove from ppi.c the old depreciated module stuff.
Print info when if_plip can't use interrupts.
1999-02-14 12:00:00 +00:00
Nicolas Souchu 67c13fce36 Handle correctly iicbus request/release mechanism. Add iicbus allocation
to the general purpose i/o iic(4) driver.
1999-02-13 18:01:55 +00:00
Nicolas Souchu ba81c311c1 Fix smbus allocation and add the alsmb (see alpm(4)) driver. 1999-02-13 17:57:19 +00:00
Julian Elischer a728078455 Improved reporting of autodetected speed and duplex.
Now should be able to report speed for cards using NatSemi PHY.
(if you have one please let me know if it works as I
only have the Intel version)

Reviewed by: David Greenman <dg@root.com>
1999-02-12 17:56:23 +00:00
Julian Elischer da15ec8bf7 Define more registers and fix incorrect (but unused) register bit definitions. 1999-02-11 23:41:21 +00:00
Julian Elischer f1bf08c22e Define more registers in the PHY unit and use them to report back
the result of the media auto negotiation.

Reviewed by: David Greenman <dg@freebsd.org>
1999-02-11 21:47:10 +00:00
Roger Hardiman f02529f9b2 Added ioctl REMOTE_GETKEY for Hauppauge Infra-Red Remote Control.
Submitted by Roger Hardiman.

Added ioctl TVTUNER_GETCHANSET to discover which regions the bktr driver
supports. Submitted by Vsevolod Lobko <seva@alex-ua.com>

Added BT848_GPIO_SET_EN,BT848_GPIO_SET_DATA (and GETs) to allow user land
control of the GPIO pins. This allows a Radio module on the GPIO port
to be controlled. Submitted by Vsevolod Lobko <seva@alex-ua.com>
The kernel option BKTR_GPIO_ACCESS must be used to enable the GPIO ioctls.

Submitted by:	Roger Hardiman and Vsevolod Lobko <seva@alex-ua.com>
1999-02-11 10:22:30 +00:00
Roger Hardiman 29122ece3e Added new ioctls for Hauppage Infra-Red Remote Control support,
Obtaining the supported channel sets and Controlling the GPIO port.

Submitted by:	Roger Hardiman and Vsevolod Lobko <seva@alex-ua.com>
1999-02-11 10:18:04 +00:00
Justin T. Gibbs 957fea92f0 Set the ultra enable bits in the adaptor's scratch ram area only after
we finish modifying our in kernel version during seeprom configuration.
1999-02-11 07:12:16 +00:00
Justin T. Gibbs 03c4f58aa3 Ensure that the ACK from the last information transfer phase has been
de-asserted by the initiator before changing phase or releasing the bus.
Corrects a SCSI specification violation in target mode.
1999-02-11 07:10:20 +00:00
Justin T. Gibbs 922b8593e6 Correct a race condition where a target mode SCB dma could occur
before we finished setting the pending phase information.

Use the ALL_TARGETS_MASK #define instead of 0xffff for the default
ultraenb mask.
1999-02-11 07:07:27 +00:00
Greg Lehey 9e0aa8e9b8 Correct some indentation
Implicitly-desired-by: bde

update_plex_state:  Handle empty RAID-5 plexes correctly
1999-02-11 06:44:46 +00:00
Greg Lehey e8b3affb8e build_write_request: correct logic for handling writes to volumes with
failed plexes.

allocrqg: Remove dead code
1999-02-11 06:44:12 +00:00
Greg Lehey 8093cf90f1 check_drive: Make sure that we don't open two different drives with
the same name.  Silently return EEXIST if this happens.

vinum_scandisk: Collect drive numbers, not pointers, to avoid problems
of relocated drives.

Tripped-over-by:  Bernd Walter <ticso@cicely.de>
1999-02-11 06:43:15 +00:00
Greg Lehey cc902735df In some cases, it's possible that I/O errors will cause the daemon to
time out on an operation.  Under these circumstances, vinum(8) will
automatically start another daemon.  Add a pid for the daemon, so that
an overtaken daemon will discover that it's no longer in favour, and
will crawl into a corner and die.
1999-02-11 06:42:39 +00:00
Kenneth D. Merry 2a888f938e Add a prioritization field to the devstat_add_entry() call so that
peripheral drivers can determine where in the devstat(9) list they are
inserted.

This requires recompilation of libdevstat, systat, vmstat, rpc.rstatd, and
any ports that depend on the devstat code, since the size of the devstat
structure has changed.  The devstat version number has been incremented as
well to reflect the change.

This sorts devices in the devstat list in "more interesting" to "less
interesting" order.  So, for instance, da devices are now more important
than floppy drives, and so will appear before floppy drives in the default
output from systat, iostat, vmstat, etc.

The order of devices is, for now, kept in a central table in devicestat.h.
If individual drivers were able to make a meaningful decision on what
priority they should be at attach time, we could consider splitting the
priority information out into the various drivers.  For now, though, they
have no way of knowing that, so it's easier to put them in an easy to find
table.

Also, move the checkversion() call in vmstat(8) to a more logical place.

Thanks to Bruce and David O'Brien for suggestions, for reviewing this, and
for putting up with the long time it has taken me to commit it.  Bruce did
object somewhat to the central priority table (he would rather the
priorities be distributed in each driver), so his objection is duly noted
here.

Reviewed by:	bde, obrien
1999-02-10 00:04:13 +00:00
Matt Jacob d951bbca48 Cleanup. Set all PCI parameters of importance. Set a define that will
allow us via config options prefer mem space to I/O space.
1999-02-09 01:12:52 +00:00
Matt Jacob 10f20e4038 Roll internal release tag. Roll core version minor. Fix broken DPARM_DEFAULT
define. Add a new config flag param (ISP_CFG_NONVRAM) whose intent it is
to cause NVRAM to be ignored. Add ISPASYNC_LOOP_DOWN and ISPASYNC_LOOP_UP
isp_async enums.

Amazingly enough, I did all my scsi_sa work recently without realizing
that I had a broken isp card whose (unchangeable- it's an old old old
isp1020) NVRAM has sync mode enabled, but disconnect/reconnect disabled-
the ISP_CFG_NONVRAM is definitely warranted when you want to bloody well
ignore the NVRAM and set something sensible.
1999-02-09 01:11:35 +00:00
Matt Jacob 68ce4ba588 clean up some NVRAM defines 1999-02-09 01:09:35 +00:00
Matt Jacob cd5622a63b Add in defines that disable (temp) fast posting. 1999-02-09 01:09:03 +00:00
Matt Jacob 2b05293160 Allow fibre channel 'bus resets' to go through. Handle Loop Down/Loop Up
events by freezing/unfreezing the simq- nice to have such control at this
level! Do bus resets in attach layer (non-CAM defined code).
1999-02-09 01:08:38 +00:00
Matt Jacob 3c688670f5 Roll internal release tag. Print out if we're in a 64 bit PCI slot.
Use fast memory timing NVRAM parameter. Clean up and fix establishment
of default target parameters. Don't use NVRAM if are flagged as not to
do so (I had a busted NVRAM setup which I couldn't edit that enabled SYNC
mode but disabled disconnect/reconnect and wide!!). Fix delays after
resets. BUS resets not done in isp_init anymore- relegated to OS
specific outer layers. Fix a buglet where you can get in a loop for
a NULL xs in the completion list in isp_intr. Add in some defines that
can disable fast posting. Add in code for Loop Up/Loop Down events that
call into the outer layers as to what to do.
1999-02-09 01:07:06 +00:00
Matt Jacob 289b93c044 roll internal release tag 1999-02-09 01:05:42 +00:00
Dag-Erling Smørgrav 8f84257ed7 Generate correct DLT_NULL headers before passing packets to bpf.
Do not modify m_len before passing mbuf chains to bpf.
Don't forget to pass packets to bpf when running in Crynwr mode (LINK0).

Partially based on a patch by Bill Fenner <fenner@freebsd.org>.

PR:             bin/7241
1999-02-08 14:12:38 +00:00
Dag-Erling Smørgrav 9539cd4d92 Bring in the simplified port probe from src/sys/i386/isa/lpt.c 1999-02-08 13:55:43 +00:00
Roger Hardiman 08d8a5b841 Added detection for bt848a chips 1999-02-08 11:55:30 +00:00
Roger Hardiman a3869d3479 Added check to bktr_mmap() from OpenBSD driver.
Improved MSP34xx reset for bt848 Hauppauge boards.
Added detection for Bt848a.
Vsevolod Lobko<seva@sevasoft.alex-ua.com> added more XUSSR channels.
Submitted by:	parts from Vsevolod Lobko<seva@sevasoft.alex-ua.com>
Obtained from:  parts from OpenBSD
1999-02-08 11:53:05 +00:00
Roger Hardiman 9864d54a58 Changed to use IICBUS_REPEATED_START
Submitted by:	Changed to use IICBUS_REPEATED_START
1999-02-06 10:56:09 +00:00
Dag-Erling Smørgrav 2da199da53 Followup to yokota's last commit:
- va_mode_flags -> va_info.vi_flags
 - scanline width may be different from screen width
1999-02-05 12:40:16 +00:00
Kazutaka YOKOTA 1c27745f73 - Don't assume the line length in the video memory is always the same as
the screen width.
- Store the current video mode information in the `video_adapter' struct.
- The size of the `v_offscreensize' field in the VESA mode information
  block is u_int16, not u_int8.
1999-02-05 11:52:13 +00:00
Greg Lehey 3f8d2678bc Remove some dead debug code
build_write_request: get the check for failure right
1999-02-05 05:09:22 +00:00
Bruce Evans 89955e6330 YAMFsio.c (1.227-1.228: set up input buffering dynamically). 1999-02-04 15:54:02 +00:00
Bill Paul e8354668bd Remember to initialize ifp->if_snd.ifq_maxlen. 1999-02-01 21:25:52 +00:00
Mark Newton 240c6baa11 Nuke some prototypes that really shouldn't be here. 1999-02-01 21:22:30 +00:00
Matthew Dillon 06fd697d15 The alternate B_PAGING path for vnstrategy() is used for VM faults
as well as swap I/O now.  This path failed to properly set bp->b_resid
    on I/O completion.
1999-02-01 08:36:02 +00:00
Peter Dufault e419eecba9 Move the "fetch serial data" delay so that it is an inter-bit delay.
Increase the overall length of the delay by 10.

Without this a 3C509 card on my MediaGX crash box can't be reliably
read.  With this it is solid.

I've left a delay multiplier in instead of just changing the base
delay because I'm surprised I had to increase it so much and expect
there may be another problem.
1999-01-31 22:41:51 +00:00
Nick Hibma aa11c7f9d1 Added UHCI_LEGSUP to uhcireg.h 1999-01-31 16:22:35 +00:00
Nicolas Souchu c9ab07382c Fix compile warnings about missing braces around static initialization of unions. 1999-01-31 11:52:04 +00:00
Paul Richards a461710f83 New driver flags to support IFF_ALLMULTI handling. 1999-01-31 00:56:32 +00:00
Paul Richards 5619e92064 Add IFF_MULTICAST when setting flags in lnc_init(). 1999-01-31 00:44:37 +00:00
Paul Richards 5448a2e522 Fix and enable multicast support. 1999-01-31 00:39:20 +00:00
Nicolas Souchu 20240fa3ad Distinguish EPP address/data register. Add EPP address register access to ppi.
Change microseq offsets. Previously, offsets of the program counter where
added to the index of the current microinstruction. Make them rely on the
index of the next executed microinstruction.

Suggested by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1999-01-30 15:35:39 +00:00
Poul-Henning Kamp 4e2d2aa1cd Use suser() to check for super user rather than examining cr_uid directly.
Use TTYDEF_SPEED rather than 9600 a couple of places.

Reviewed by:	bde, with a few grumbles.
1999-01-30 12:17:38 +00:00
Matt Jacob cbf57b472d Implement and use Fast Posting for both parallel && fibre. Redo a bit of
the startup code. Implement a call to outer framework function so that
asynchronous events can be handled (e.g., speed negotiation, target mode).

Roll internal release tags.
1999-01-30 07:29:00 +00:00
Matt Jacob 495bfaf206 Grrr.. Do the *correct* and *usable* 1.31 firmware. You have to power
cycle to get rid of the old 1.31 firmware. *@!$&^@&$!&^&^!!!!!

But anyway comment it out and use new SBus 7.55 firmware. We get fast posting
with this as well as 32 luns and target mode support.

(not that this is used yet in FreeBSD, but it's ready for FreeBSD-sparc
whenever it happens....)
1999-01-30 07:22:30 +00:00
Matt Jacob 73d5e7854f roll internal release tag 1999-01-30 07:20:50 +00:00
Matt Jacob 1d74fa4ca5 roll internal release tag 1999-01-30 07:08:55 +00:00
Mark Newton 888ac52b62 New pseudo-device to provide for a way of obtaining a socket by open()ing
something in /dev.
Obtained from: Christos Zoulas, with FreeBSD modifications
1999-01-30 06:27:59 +00:00
Bruce Evans d12895f90b Removed a bogus cast to v_caddr_t. This is part of terminating
v_caddr_t with extreme prejudice.  Here the bogons were originally
the same as for c_caddr_t (half-baked K&R support), but rev.1.95
changed one wrong cast and one harmless cast to 2 wrong casts,
and rev.1.96 only fixed the originally wrong cast.
1999-01-29 11:31:45 +00:00
Bruce Evans 9e26dd2a54 Removed bogus casts to c_caddr_t. This is part of terminating
c_caddr_t with extreme prejudice.  Here the original casts to
caddr_t were to support K&R compilers (or missing prototypes),
but the relevant source files require an ANSI compiler.
1999-01-29 08:29:05 +00:00
Greg Lehey 7f1050341c Change multiline comments to start with a lone /* and end with a */,
apparently in accordance with style(9).

Complained-about-by: bde
1999-01-29 01:17:54 +00:00
Greg Lehey 6fe15bff6e Change multiline comments to start with a lone /* and end with a */,
apparently in accordance with style(9).

Complained-about-by: bde

vinumopen: Change check for root user to a call to suser(9)
vinumclose: Remove check for root user.

Nitpicked-by: phk
1999-01-29 01:16:18 +00:00
Roger Hardiman f60cbfffac Support for MSP3410D / MSP3415D Stereo/Mono audio using the audio format
Auto Detection Mode. This leaves MSP3400C owners still unsupported.
Thanks to Gerd Knorr <kraxel@cs.tu-berlin.de> for providing some early
assistance and sample code in the linux bttv driver.
Nicolas Souchu <nsouch@freebsd.org> ported the msp_read/write/reset
functions to smbus/iicbus.

METEOR_INPUT_DEV2 now selects a composite camera on the SVIDEO port.
For true SVIDEO, use METEOR_INPUT_DEV_SVIDEO.
If you get a monochrome image from the SVIDEO port, you have
seleted the wrong input type.

Tested by:      Johan Larsson<gozer@ludd.luth.se>
1999-01-28 17:47:47 +00:00
Matthew Dillon 697457a133 Fix warnings related to -Wall -Wcast-qual 1999-01-28 17:32:05 +00:00
Roger Hardiman ba66f0a223 Added METEOR_DEV2 and METEOR_DEV3 1999-01-28 16:32:52 +00:00
Roger Hardiman 84a3aec329 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Updated to support bt848 driver and MSP3400 audio chip.
This adds changes made in 1.4.2.1 and 1.4.2.2 from RELENG_3
1999-01-28 15:59:15 +00:00
Roger Hardiman f8f3b24aa2 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Updated to support bt848 driver MSP34xx audio chip.
This adds changes made in 1.3.2.1 and 1.3.2.2 from RELENG_3
1999-01-28 15:56:18 +00:00
Roger Hardiman 6d076bb425 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Added support required by bt848 driver for MSP34xx audio chip
1999-01-28 15:50:24 +00:00
Kazutaka YOKOTA ffba82a9ae - Fixed the bug which always ignored Ctrl-Pause/Break on the AT 101
keyboard.
- Translate some keycode for the 84 keyboard so that the 84 keyboard
  and the 101 keyboard become more compatible in terms of keycodes.
- Updated the built-in keymaps so that it is in line with the recent
  changes in share/syscons/keymaps.
- Added some comment on the Pause/Break key on the 101 keyboard.
1999-01-28 10:55:55 +00:00
Greg Lehey bb1d6cfa3c build_write_request: only fail if all plexes are down, instead of if
any of them are down.

Reported-by: dg
1999-01-28 07:00:55 +00:00
Greg Lehey a1c1b26d88 Fix some format breakage before bde finds out
vinum_scandisk: check not only drive error, but also drive state,
  before accessing the drive.

drivecmp: Remove warning messages by Backing out overly constant
  declarations in revision 1.9.
1999-01-28 06:59:27 +00:00
Justin T. Gibbs dd3afbd452 Correct test in poll loop for determining that the mailbox is free to
accept a new command.
1999-01-28 03:30:02 +00:00
Matthew Dillon 0a5e03dda5 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 01:59:53 +00:00
Matthew Dillon 485111b55b Fix parenthesization, but the code still looks wrong. 1999-01-28 01:33:02 +00:00
Matthew Dillon 8aef171243 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 00:57:57 +00:00
Matthew Dillon fe08c21a53 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile.

    This commit includes significant work to proper handle const arguments
    for the DDB symbol routines.
1999-01-27 23:45:44 +00:00
Matthew Dillon d254af07a1 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 21:50:00 +00:00
Matthew Dillon b4e36adf1c Fix warnings preparing for -Wall -Wcast-qual
Also disable one usb module in LINT due to fatal compilation errors,
    temporary.
1999-01-27 20:09:21 +00:00
Matthew Dillon d7bcbf6358 Add parens to SMBPRI, fixing bug in tsleep() call that OR's SMBPRI with
something else.
1999-01-27 19:58:53 +00:00
Matthew Dillon a56d629240 Fix PPBPRI #define - it was missing parenthesis which messed up a
call to tsleep() in dev/ppbus/ppbconf.c.  Also fixup initializers.
1999-01-27 19:44:05 +00:00
Matthew Dillon 6a59f7d85f Fix '|' that was supposed to be '||' 1999-01-27 19:35:33 +00:00
Kazutaka YOKOTA 6dab3d1e54 Oops, one line was accidentally commented out in the previous commit. 1999-01-26 10:00:02 +00:00
Kazutaka YOKOTA 44ad10ea41 Pull down the splash screen when someone is about to read from the
keyboard.  Do this in scread(), rather than in scopen().
1999-01-26 09:58:37 +00:00
Greg Lehey ac4cd383ca Correct #include in vinumioctl.c to compile correctly
without VINUMDEBUG

Submitted-by: peter
1999-01-24 05:14:39 +00:00
Nicolas Souchu 7b7bf77e65 Replace DEBUG by PLIP_DEBUG option 1999-01-23 17:07:49 +00:00
Doug Rabson 8a99777019 Update the alpha port to use the new syscons.
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> (partly)
1999-01-23 16:53:30 +00:00
Roger Hardiman 2c401a831e Added detection of Hauppauge IR remote control.
and MSP34xx Audio chip. Fixed i2c read error.
Hauppauge supplied details of new Tuner Types.
Added tuner type 0x1a.
Danny Braniss <danny@cs.huji.ac.il> submitted Bt878
AverMedia detection with PCI subsystem vendor id.
1999-01-23 11:32:06 +00:00
Roger Hardiman d3697a3ac3 Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
Updated to support Hauppauge IR Remote Control
1999-01-23 11:28:16 +00:00
Peter Wemm e5ca2df920 Minor tweak to fix 'pseudo-device vinum'. One of these got lost before,
the other is a new file.
1999-01-23 01:29:05 +00:00
Peter Wemm d2b5b9779e Oops, got my #ifdef's mixed up. Fix an unused variable warning. 1999-01-23 00:28:56 +00:00
Peter Wemm 013b59f2cb Remove stray Makefile that Greg initially imported. 1999-01-23 00:09:07 +00:00
Peter Wemm b7b98418bd Convert ccd to a proper module vs. something started by PSEUDO_SET(). 1999-01-22 22:38:28 +00:00
Nick Hibma 7613dbd346 add LEGSUP to uhci_dumpregs 1999-01-22 21:52:46 +00:00
Nick Hibma 1f7b3fe5be forgotten in previous commit: Lowered default debug level 1999-01-22 01:02:24 +00:00
Nick Hibma ab521a755e Fixed disconnect for umouse 1999-01-22 00:59:52 +00:00
Nick Hibma 235dddd4ea Textual changes 1999-01-22 00:51:12 +00:00
Nick Hibma 5602b5091c Fixed bug in disconnect handling in uhub.c 1999-01-22 00:44:31 +00:00
Nick Hibma a2a2fd2ce4 Added OPTi FireLink and NEC (Toshiba and others) to OHCI ID's 1999-01-22 00:36:46 +00:00
Nick Hibma cf4e36da61 Fixed bug that made UHCI controllers fail to start. 1999-01-21 23:31:58 +00:00
Nick Hibma 88a610db55 Cleaning up, improving _detach, removing ominous warning (msmith) 1999-01-21 23:06:02 +00:00
Nick Hibma f8c31e6fac Added ioctl interface 1999-01-21 22:56:10 +00:00
Kazutaka YOKOTA 325fca905e Add VESA mode support. If the VESA support is compiled into the kernel
or the VESA KLD is preloaded by the boot loader, you can load a 256 color
BMP file larger than 320x200.
1999-01-21 18:29:33 +00:00
Peter Wemm b453f58fcc Convert vn.c into a module (loadable and static). 1999-01-21 17:17:02 +00:00
Greg Lehey 33953e5e97 Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Add field plexsdno to sd struct

Add flag VF_NEWBORN to drive, sd, plex and volume structs, indicating
that the object has just been created.

Add object types for raw (unattached) plexes and subdisks

Remove definitions of VOLNO, PLEXNO and SDNO (now functions Volno,
Plexno and Sdno)

Move revive parameters from struct plex to struct sd.

struct plex:
  maintain a count of the number of inaccessible subdisks.
  remove defective and unmapped regions.

Debug flags: make an enum (previously #define)

Set default revive block size to 64kB (was 32 kB)
1999-01-21 00:41:58 +00:00
Greg Lehey 5d6f3129b1 Retain some of the RAID5 texts even in the non-RAID5 versions.
Previously, accidentally starting the wrong version could corrupt
  the RAID5 configuration.

  Add functions Volno, Plexno and Sdno to replace the old defines
  VOLNO, PLEXNO and SDNO.
1999-01-21 00:41:31 +00:00
Greg Lehey 8a2cba6003 Remove states:
plex_reviving (now we revive subdisks)
  drive_coming_up (never happened)

Add state sd_reviving.
1999-01-21 00:40:50 +00:00
Greg Lehey 6d930639c3 Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Serious rewrite.  No longer call set_<foo>_state to set the state
based only on other objects; instead, add functions
update_<foo>_state, which determine what the state should be by
themselves.  This allows the set_<foo>_state functions to shrink
enough to be almost intelligible.

Remove flags setstate_recurse and setstate_recursing.

Remove plex defective regions and unmapped regions, which were
maintained but not used.

Change code to allow daemon to perform operations formerly kludged
into an interrupt context.  Remove the DIRTYCONFIG kludge.
1999-01-21 00:40:32 +00:00
Greg Lehey 2178c45997 Change the style of revive: revive subdisks instead of plexes. This
makes it easier to keep track of which parts of a plex need reviving.

Use sdio, not vinumstrategy, to write to the subdisk.
1999-01-21 00:40:03 +00:00
Greg Lehey 7d077233f8 Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Remove #ifdefs for FreeBSD 2.c

vinumstrategy:
  Support anonymous (`raw') subdisks and plexes.
  Change code to allow daemon to perform operations formerly kludged
  into an interrupt context.  Remove the DIRTYCONFIG kludge.

No longer set B_ORDERED for reviving subdisks.  I suspect this
wouldn't work correctly, and it should be done in a different manner
in vinumrevive.c

sdio: set subdisk state correctly on error
      start to remove code that doesn't make any sense any more.
1999-01-21 00:39:36 +00:00
Greg Lehey 09c265ba75 Add keywords help, makedev, quit and setdaemon 1999-01-21 00:39:01 +00:00
Greg Lehey cb4547a333 MMalloc: remove directory part of name correctly 1999-01-21 00:37:56 +00:00
Greg Lehey ba40e00009 Create functions lockdrive and unlockdrive to handle drive locking 1999-01-21 00:37:38 +00:00
Greg Lehey 216e9f2046 Add keywords makedev, setdaemon and help. 1999-01-21 00:37:18 +00:00
Greg Lehey 2f4e1ffa11 Remove ioctls VINUM_GETUNMAPPED and VINUM_GETDEFECTIVE (we no longer
have regions).

Add definitions for VINUM_DAEMON, VINUM_FINDDAEMON and VINUM_DAEMON
1999-01-21 00:36:21 +00:00
Greg Lehey c3dff4f036 Include Peter Wemm's renaming and restructuring
Remove #ifdefs for FreeBSD 2.c

Change from lkm to kld

correct type of `flags' in calls to set_drive_state.

set_drive_parms: handle anonymous drives correctly (remove them)

drive VOP functions: use the PID of the original opener to fool the
lock manager.

open_drive: be quiet about failures (they're normal when scanning the
partitions).

close_drive: lock drive before closing.

remove_drive: lock drive before deallocating.

read_drive_label: set drive up when all is OK

check_drive:
  Complete rewrite.  Offload most of the code to the new
  vinum_scandisk

format_config:
  use snprintf and %qd options to make much less emetic.
  Remove old supporting functions.

vinum_scandisk:
  Moved here from vinum.c
  Almost complete rewrite, incorporating much of what was check_drive.
  We still don't have a general way to find the drives on a system, so
  get the user to supply the names via the `read' command.  For each
  device, try each possible compatibility slice name (there's a danger
  of finding both /dev/da1h and /dev/da0s1h otherwise).  Sort the
  partitions found in reverse order of last update time and read them
  in, setting the `update' parameter to parse_config and descendents.

save_config: rename to daemon_save_config, since the function is now
called by the daemon.  Create a new function save_config which queues
the request with the daemon.

daemon_save_config:  some mods to allow for the unfamiliar
environment.
1999-01-21 00:35:35 +00:00
Greg Lehey a01fbbe4ac Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Recover from I/O errors by passing the request to the daemon, except
for plex I/O, which is not fault tolerant.
1999-01-21 00:34:14 +00:00
Greg Lehey 3a85d3f98a Remove old cruft 1999-01-21 00:33:47 +00:00
Greg Lehey 76714993c6 Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Remove BROKEN_GDB kludge (it's not needed with klds)

Add code for interfacing with daemon

Modify device minor number encoding, use selector functions which also
permit anonymous plexes and subdisks.

Remove code for 2.x support.

Change messages to omit obvious words like 'plex' and 'subdisk.

give_plex_to_volume: invalidate subdisks being given to a plex which
is part of a volume with other plexes.

give_sd_to_plex: keep track of plex size in all cases

lock drives before closing them, to keep the daemon from getting
confused.

config_drive: handle partition type errors more gracefully

config_subdisk: set subdisk state correctly

find_drive, find_drive_by_dev, find_subdisk, find_plex, find_volume:
  set VF_NEWBORN flag when a new object is created

config_drive:
  Handle partition_status returns more cleverly.
  Replace the device name in some cases where it got overwritten.

config_subdisk:
  add parameter `update'.  If the object already exists, exit without
  any changes.
  Set state correctly.

config_plex, config_volume:
  add parameter `update'.  If the object already exists, exit without
  any changes.

parse_config:
  move read function to vinum_scandisk.
  add parameter `update' to pass to config_<object>.

remove_<object>_entry:
  print a message when the object is removed.

update_plex_config:
  Start defusing this function, which will go away some time.
  Remove calls to update_volume_config.
  Make size 64 bits
1999-01-21 00:32:54 +00:00
Greg Lehey 2ef3e3ddbc Include Peter Wemm's renaming and restructuring
Change from lkm to kld
1999-01-21 00:31:59 +00:00
Greg Lehey eb1cd79843 Code for vinum daemon. 1999-01-21 00:31:31 +00:00
Greg Lehey fc4e325173 Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Remove BROKEN_GDB kludge (it's not needed with klds)

Add code for interfacing with daemon

Modify manner of determining when module is idle

Modify device minor number encoding, use selector functions which also
permit anonymous plexes and subdisks.

Remove code for 2.x support.

Move vinum_scandisk to vinumio.c

Remove myproc kludge

Keep track of open volumes by flag, not by pid (the pids caused some
problems with the lock manager).

free_vinum:
  Remove unmapped and defective regions from plexes.
  Wait for daemon to stop before returning

vinumopen:
  Don't refuse an open if the volume is already open.
1999-01-21 00:30:52 +00:00
Greg Lehey efd86c9a8c Reflect changes in vinumstate.h 1999-01-21 00:30:24 +00:00
Greg Lehey 7230cf7d2a Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Add structures for daemon

Remove old cruft

Increase RQINFO_SIZE to 128
1999-01-21 00:29:44 +00:00
Greg Lehey e743f211c1 Include the copyright notice in the script, making the file COPYRIGHT
unnecessary.
1999-01-21 00:29:20 +00:00
Warner Losh 07353d4247 o enable plug and play support for the aha driver. Given the cumbersome
pnp system in freebsd, I'm not sure how useful this will be, but my
  1542CP seems to work well in plug and play mode and does seem to
  probe correctly at all the oddball addresses/irq/drqs that I tried.
  [[
     I was unable to get /kernel.conf or /kernel.config to read in, so
     I wasn't able to verify that this method of userconfig works.  that's
     one thing that makes pnp so hard to use in the current scheme.
     Pointers to the right new way of doing this accepted.
  ]]
o Add some kludges to maybe bring support for 1540A/1542A into the
  driver.  Since I have no 154xA cards, and the only person I know
  that has them hasn't given me feedback, I'm making this commit
  blind.
o Honor unit numbers that are in the config file now.  This allows one
  to hard wire the unit numbers (and have high unit numbers for plug
  and pray devices, which can't seem to be hardwired) and have the
  cards not migrate from aha1 -> aha0 should aha0 go on the fritz.  I
  didn't verify that hard wired scsi busses would work, but did verify
  that hard wired aha addresses did work to a limited extent.  Both
  aha0 and aha1 must be hardwired, or when the card that was in aha0
  goes away, the probe for aha0 might pick up the card that otherwise
  would have been aha1.
1999-01-20 06:21:27 +00:00
Stefan Eßer 441e39d74a Fix problem with zero valued map registers followed by valid map entries.
The previous code just ignored the invalid map register, but this gave
surprising results because of the way pci_map_port() associated the map
register offset supplied with a map entry in the map array.
1999-01-19 23:29:20 +00:00
Kazutaka YOKOTA f359876ff1 syscons
- Bring down the splash screen when a vty is opened for the first
  time.
- Make sure the splash screen/screen saver is stopped before
  switching vtys.
- Read and save initial values in the BIOS data area early.
  VESA BIOS may change BIOS data values when switching modes.
- Fix missing '&' operator.
- Move ISA specific part of driver initialization to syscons_isa.c.

atkbd
- kbdtables.h is now in /sys/dev/kbd.

all
- Adjust for forthcoming alpha port.  Submitted by: dfr
1999-01-19 11:31:22 +00:00
Peter Wemm d17e4ee67d Update the pccard hooks to use a module style declaration instead. 1999-01-19 00:21:53 +00:00
Julian Elischer d800ff4aed Fix typo. Unit is spelled with a 'u'. 'init' just types too easily. 1999-01-18 21:27:03 +00:00
Julian Elischer b645ff7fc3 Fix screwed up previous commit.
Obviously no-one is using this card on ISA as the interrupts
were NOT being handled.
1999-01-18 21:23:47 +00:00
Julian Elischer 0fe90303e0 From inspection, ISA interrupts were completely broken..
revert some of the old ISA code.
(I can't test this but I'm working on the file.)
1999-01-18 07:55:02 +00:00
Peter Wemm 6b3daecd80 "fix" long standing aicasm build glitch. The problem was the
reorganization in rev 1.16 of i386/include/types.h which changed
stdlib.h's use of <machine/types.h>.  The problem was the -I. was causing
machine/types.h to come from the current kernel source, while stdlib.h was
coming from /usr/include.  /usr/include/stdlib.h is as old as the last
'make world', the machine/types.h was as new as the current source.
1999-01-17 19:56:02 +00:00
Kazutaka YOKOTA f9e730bbb3 Retrun EAGAIN if the current video mode is a graphics mode. 1999-01-17 14:25:19 +00:00
Kazutaka YOKOTA 6d479db3c3 - Examine the error code from the screen saver and act accordingly.
0	success
	EAGAIN	try again later
	other	don't call this screen saver again
- Test flags consistently to examine the status of the screen saver.
	scrn_blanked: the screen saver is running
	scp->status & SAVER_RUNNING: the saver is running in this vty
- Correctlyu preserve status flag bits in set/restore_scrn_saver_mdoe().
1999-01-17 14:23:15 +00:00
Dag-Erling Smørgrav 9402dfb01a Move the definition of set_origin from logo_saver.c to saver.h. 1999-01-16 10:20:16 +00:00