Commit graph

15777 commits

Author SHA1 Message Date
Peter Wemm 81b1c87805 Fix a dev_t/udev_t issue 1999-06-26 11:00:17 +00:00
Peter Wemm 0fc85147a7 #if 0 an unused function since it generates warnings.. (I have not deleted
it in case it's part of a bigger plan.)
1999-06-26 10:52:54 +00:00
Doug Rabson 9fd5198d2d Make sure that we record the flags in all cases.
Submitted by: Bernd Walter <ticso@cicely.de>
PR:	      kern/12399
1999-06-26 10:27:30 +00:00
Kirk McKusick 67812eacd7 Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old
semantics. That is, all buffer locking is done with LK_EXCLUSIVE
requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will
be done in future commits.
1999-06-26 02:47:16 +00:00
Pierre Beyssac 5a903f8d73 In in_pcbconnect(), check the return value from in_pcbbind() and
exit on errors.

If we don't, in_pcbrehash() is called without a preceeding
in_pcbinshash(), causing a crash.

There are apparently several conditions that could cause the crash;
PR misc/12256 is only one of these.

PR:		misc/12256
1999-06-25 23:46:47 +00:00
KATO Takenori 37c813d93c From submitter:
The attached diff attempts to eliminate as much of the difference
between the i386 and the pc98 version of the file as possible.  It
should not make any semantic difference (it consists of whitespace
changes, order changes, comment changes, changes of case for hex
constants, and merging in a couple of constants that hadn't made it
from the i386 version.)

Submitted by:	eivind
1999-06-25 15:17:20 +00:00
Pierre Beyssac cce2eb6a97 Never return the root node itself from rn_match(); return NULL instead.
This caused a panic in rtfreee() called with a root node from the
routing socket code (when processing a RTM_GET message looking for
the default route while there is none).

Since no existing code seems to have any use getting the root node
from rn_match(), it seems cleaner never to return it rather than
check for this condition at the caller's.

PR:		kern/12265
1999-06-25 13:43:30 +00:00
Søren Schmidt c4217f94eb Nine'th update to the new ATA/ATAPI driver:
The atapi subsystem has gotten better error handeling and timeouts,
it also tries a REQUEST SENSE command when devices returns errors,
to give a little more info as to what went wrong. It might be a
little verbose for now, but I'm interested in as much feedback on
errors as possible, especially timeouts, as I'm a bit in doubt if
I've chosen resonable default values everywhere.

The disk driver has been changed a bit to prepare for tagged queing,
which is next on my list.

The disk driver has grown a dump routine, I got one implementation
from Darrell Anderson <anderson@cs.duke.edu> which also did
partial dumps (usefull on big memory machines) I left out the
partial stuff for now, and changed the rest alot to fit into the new
ad_request framework.

Some minor cleanups and rearrangements as well.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...

But please tell me how it works for you!

Enjoy!

-Søren
1999-06-25 09:03:07 +00:00
Greg Lehey 9a9eb2b92b Add function cdevsw_remove, the opposite of cdevsw_add: remove an
entry in cdevsw (and bdevsw if appropriate).

Reviewed-by: phk
1999-06-25 07:49:01 +00:00
Jonathan Lemon 7eb56d9409 Fix warning message; that was 4GB, not 2GB. I apparently can't do
arithmetic today.
1999-06-24 20:53:24 +00:00
Jonathan Lemon 4547fffaa1 Explicitly ignore any memory > 2GB, we don't support it yet. 1999-06-24 20:47:11 +00:00
Jonathan Lemon 8fa445082f Only include AMD wt_alloc routines if I586_CPU is defined. Fixes
CPU_WT_ALLOC for cyrix chips.

Submitted by:	"Brian Smith" <dbsoft@technologist.com>
1999-06-24 20:08:56 +00:00
Matt Jacob ec69779604 (corrections for type change in softc) 1999-06-24 16:42:33 +00:00
Matt Jacob 67eb623192 Bruce pointed out I was being silly with volatile.
Submitted by:	bde@freebsd.org
1999-06-24 16:34:00 +00:00
Matt Jacob f0bbbb88da Quirk Tandberg 4100 like Tandberg 4200.
PR:		11675
Reviewed by:	msmith@FreeBSD.ORG
Submitted by:	blank@uni-trier.de
1999-06-24 15:21:10 +00:00
KATO Takenori a5788613e1 Sync with sys/dev/syscons/scvtb.c revision 1.2.
Submitted by:	yokota
1999-06-24 14:03:07 +00:00
Kazutaka YOKOTA 7107ea4aa1 Fix ESC[P (delete N chars) and ESC[@ (insert N chars). These deletion
and insertion should affect the line the cursor is on only.

This change should have been committed together with syscons.c rev 1.308.
(I forgot to do so, when I committed syscons.c :-(

Pointed out by: sos
1999-06-24 13:04:33 +00:00
KATO Takenori 820c6a4541 Merge with sys/isa/syscons_isa.c and sys/dev/syscons/syscons.c
revisions 1.6 and 1.308, respectively.

Pointed-out by:		yokota
1999-06-24 12:13:08 +00:00
KATO Takenori 4b148932c7 PC98 part of the second phase of syscons reorganization.
Submitted by:	yokota
1999-06-24 10:51:40 +00:00
Kazutaka YOKOTA d1bb8e0e13 Fix ESC[P (delete N chars) and ESC[@ (insert N chars). These deletion
and insertion should affect the line the cursor is on only.
1999-06-24 09:21:27 +00:00
Kazutaka YOKOTA ffc1d9bd45 Declare the correct size of softc and fix sc_get_softc(). 1999-06-24 09:06:48 +00:00
Greg Lehey 9faf05037c set_drive_state:
If the drive goes down, queue a close to the daemon.  In many cases
  this function gets called in process context, so it could do it
  directly, but it's more trouble finding out where we came from than
  getting the daemon to do it.
1999-06-24 08:57:16 +00:00
Greg Lehey e7066f7303 build_request_buffer:
Don't bzero the buffer structure, it's been done already by
  allocrqg.

sdio:
  Build up a correct buffer header, don't steal linkages from system
  buffer headers.

Noticed-by: mckusick
1999-06-24 08:56:03 +00:00
Greg Lehey 49fc4f3ffa Split close_drive into two parts to ensure correct locking against the
daemon before closing a drive.
1999-06-24 08:55:02 +00:00
Greg Lehey f9b05a3154 Implement daemonrq_closedrive function to close a drive. 1999-06-24 08:54:09 +00:00
Greg Lehey de4a0cb61d free_drive:
Use new function close_locked_drive to close the drive.
1999-06-24 08:53:14 +00:00
Greg Lehey 8cbc0348f6 Clarify some comments.
struct request:
  Add a daemon function to close drives when they go down.
1999-06-24 08:52:27 +00:00
KATO Takenori 22001fd033 Sync with sys/i386/isa/clock.c revision 1.137. 1999-06-24 08:32:52 +00:00
KATO Takenori ae67c36030 Sync with sys/i386/conf/options.i386 revision 1.118. 1999-06-24 08:31:08 +00:00
Greg Lehey 9e0450400d Reenable Vinum build 1999-06-24 05:21:19 +00:00
Jonathan Lemon 2d2ae58ae5 Allow the Ross host to PCI bridge to appear as a PCI bus. This permits
my Compaq 3000 to recognize the secondary bus.
1999-06-24 04:06:26 +00:00
Jonathan Lemon 13066c5f3b Add ida/id lines 1999-06-24 03:54:54 +00:00
Brian Feldman 9840e7cb5a This commit gives support for the Rise mP6 CPU. It has two changes:
1. Rise is recognized in identdcpu.c.
	2. The TSC is not written to. A workaround for the CPU bug is being
	   applied to clock.c (the bug being that the mP6 has TSC enabled
	   in its CPUID-capabilities, but it only supports reading it. If we
	   try to write to it (MSR 16), a GPF occurs.) The new behavior is that
	   FreeBSD will _not_ zero the TSC. Instead, we do a bit of 64-bit
	   arithmetic.

Reviewed by:	msmith
Obtained from:	unfurl & msmith
1999-06-24 03:48:25 +00:00
Jonathan Lemon 7ab6ba975d Fix more disordering I missed last time. 1999-06-24 03:44:10 +00:00
Jonathan Lemon 8c3f811289 fix disordering 1999-06-24 03:42:14 +00:00
Jonathan Lemon 79eab21dc3 Add IDA files 1999-06-24 03:40:17 +00:00
Jonathan Lemon db57feb70b Compaq Smart RAID driver for -current. Based on the original ida.c
driver by Mark Dawson.  This probably needs some work, but is stable
enough to boot a RAID-only configuration, and survive `make world'.
1999-06-24 03:33:30 +00:00
Mike Smith 0f17f360a5 From the submitter:
wfd driver code tries to give wd driver first crack at ioctl's,
    but incorrectly interprets internal error and never gets to send
    eject to ATAPI device.

(this is fixed in the atapi-fd driver)

PR:		kern/12218
Submitted by:	Simon Walton <simonw@cinesite.com>
1999-06-24 03:09:11 +00:00
Mike Smith d42c1ee5c3 Changes in the way that the APs are started appears to have removed the
problem with having more CPUs than NCPU.

PR:		kern/4255
Submitted by:	peter
1999-06-23 23:02:38 +00:00
Luoqi Chen 541e018708 Do not setup 4M pdir until all APs are up. 1999-06-23 21:47:24 +00:00
Ruslan Ermilov d41ebb5068 -mdoc fix. 1999-06-23 09:06:18 +00:00
Julian Elischer 3d84d191cc Matt's NFS fixes.
Submitted by: Matt Dillon
Reviewed by: David Cross, Julian Elischer, Mike Smith, Drew Gallatin
  3.2 version to follow when tested
1999-06-23 04:44:14 +00:00
Greg Lehey 99f43962ac Backout last change. strerror doesn't exist in the kernel.
Spotted-by: 	"David E. Cross" <crossd@cs.rpi.edu>
1999-06-23 00:31:27 +00:00
Mike Smith b9ab2461b6 Remove an unnecessary panic when sparse PCI bus numbering is encountered.
This is found eg. on some Compaq  Proliant systems.

Submitted by:	peter
1999-06-22 20:54:25 +00:00
David E. O'Brien 55cbed40d3 Wrap the definition of "XE_DEBUG" so it is overridable from the ``cc''
commandline or kernel conf file.
1999-06-22 19:21:00 +00:00
David E. O'Brien 09f86e4760 Fix conflicts. 1999-06-22 19:19:46 +00:00
David E. O'Brien 7d280c7079 This commit was generated by cvs2svn to compensate for changes in r48114,
which included commits to RCS files with non-trunk default branches.
1999-06-22 19:12:08 +00:00
David E. O'Brien a74faac3af Virgin import of Xircom PCCARD driver v1.20 (1999/06/13):
* Conformance with Dingo specification. This includes:
	Collision/error statistics gathering.
	Multicast address filtering, eg. the hash filter.
	Initialisation and interrupt handling sequences.
Note that I've started on some of this already in v1.20.

* The probe routine needs some more work, to identify oddities such as the
  REM10.

* There are still problems with the autonegotiation code; specifically, it
  won't autonegotiate with some 10/100 hubs.  This might simply be the hardware
  not getting along, in which case there's nothing we can do, but it's still
  worth investigating

* CEM28/CEM33 support.  Should be able to integrate this directly from the
  Linux code.

* Performance enhancements:
	Full-duplex on 10Mbit networks.
	Virtual shared-memory mode.
	Early send and receive modes.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-06-22 19:12:08 +00:00
David E. O'Brien cb8e217fc6 Virgin import of Xircom PCCARD driver v1.20 (1999/06/13):
* Conformance with Dingo specification. This includes:
	Collision/error statistics gathering.
	Multicast address filtering, eg. the hash filter.
	Initialisation and interrupt handling sequences.
Note that I've started on some of this already in v1.20.

* The probe routine needs some more work, to identify oddities such as the
  REM10.

* There are still problems with the autonegotiation code; specifically, it
  won't autonegotiate with some 10/100 hubs.  This might simply be the hardware
  not getting along, in which case there's nothing we can do, but it's still
  worth investigating

* CEM28/CEM33 support.  Should be able to integrate this directly from the
  Linux code.

* Performance enhancements:
	Full-duplex on 10Mbit networks.
	Virtual shared-memory mode.
	Early send and receive modes.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-06-22 19:12:08 +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
Brian Somers 0622eafc89 Don't get caught in an infinite recursion when PKT_ALIAS_REVERSE
is set.
Document PKT_ALIAS_REVERSE.

Pointed out by:	Jonathan Hanna <jh@cr1003333-a.crdva1.bc.home.com>
PR:		12304
1999-06-22 11:20:03 +00:00
Poul-Henning Kamp 378d10a91d Pass the current timecounter to pps_event(). 1999-06-22 10:31:30 +00:00
Peter Wemm 8d5481c633 Handle suspend/resume methods
Obtained from: Warner Losh <imp@freebsd.org>
1999-06-22 09:44:00 +00:00
Alan Cox 9c89c228fe Remove (1) "extern" declarations for variables that were previously
made "static" and (2) initialized but unused variables.
1999-06-22 07:18:20 +00:00
Greg Lehey 2096c6b68a Add some comments about the VINUMMINOR macro, which is not for human
consumption.
1999-06-22 05:41:36 +00:00
Greg Lehey b53adf6b1c bre: Don't loop if we try to access an invalid plex type. This is
typically the case when the expurgated version of Vinum tries to
     access a RAID-5 plex.
1999-06-22 05:40:51 +00:00
Greg Lehey c9b0944731 Be more intelligent about attaching subdisks to plexes. 1999-06-22 05:37:57 +00:00
Greg Lehey 05f0cb5d5f Print more legible error message if a drive open fails. 1999-06-22 05:37:05 +00:00
Greg Lehey d884f7143f Modify to work with phk's latest mods to cdevsw. This is a temporary
fix; it doesn't address the problem of removing the module.  If you do
the following:

  vinum stop
  fsck /dev/vinum/VOLUME

you *will* get a system crash.  What we need is a cdevsw_remove
corresponding to cdevsw_add, but that hasn't been written yet.

Submitted-by: phk
1999-06-22 05:36:13 +00:00
Kirk McKusick 45623f31bc When allocating new buffers in getnewbuf, there are several points
at which we may sleep. So, after completing our buffer allocation
we must ensure that another process has not come along and allocated
a different buffer with the same identity. We do this by keeping a
global counter of the number of buffers that getnewbuf has allocated.
We save this count when we enter getnewbuf and check it when we are
about to return. If it has changed, then other buffers were allocated
while we were in getnewbuf, so we must return NULL to let our parent
know that it must recheck to see if it still needs the new buffer.
Hopefully this fix will eliminate the creation of duplicate buffers
with the same identity and the obscure corruptions that they cause.
1999-06-22 01:39:53 +00:00
Nick Hibma 923938f93a Only print the device name once, during attach (device_quiet) 1999-06-21 21:32:15 +00:00
Robert Nordier f841485278 Fill in bi_bios_geom[] in the bootinfo structure passed to the kernel.
This should resolve the problem raised in PR 12315, and incidentally
makes it easier to determine what geometry the BIOS is actually using
(by way of boot -v and dmesg).
1999-06-21 18:27:02 +00:00
Tim Vanderhoek 8630d8cfc6 Correctly return ENOEXEC for really short zipped files. The way this is
done is less-than cute, but this whole file is suffering from some amount
of bitrot.  Execution of zipped files should probably be implemented in a
manner similar to that of #!/interpreted files.

PR:		kern/10780
1999-06-21 16:23:13 +00:00
KATO Takenori 1b2bed6fa3 Sync with sys/i386/i386/machdep.c revision 1.342. 1999-06-21 11:14:27 +00:00
KATO Takenori 52ffe31521 Sync with sys/i386/conf/majors.i386 revision 1.77. 1999-06-21 11:12:25 +00:00
KATO Takenori 875a15da41 Sync with sys/i386/conf/files.i386 revision 1.247. 1999-06-21 11:11:39 +00:00
Greg Lehey 53a03d1c97 dsopen: Print a message if the unit has an invalid sector size.
Reviewed-by:	ken, bde
1999-06-21 03:48:16 +00:00
Alan Cox 60ff97b002 Remove vm_object::cache_count and vm_object::wired_count. They are
not used.  (Nor is there any planned use by John who introduced them.)

Reviewed by:	"John S. Dyson" <toor@dyson.iquest.net>
1999-06-20 21:47:02 +00:00
Bill Paul c9c4bee48c Tweak FIFO and DMA thresholds to improve performance and reduce likelyhood
of RX FIFO overruns.

Submitted by: bde
1999-06-20 18:56:09 +00:00
Matt Jacob 4b4c702b0b Quirk NOLUNS cabletron device.
PR:		11677
Submitted by:	"Matthew N. Dodd" <winter@jurai.net>
1999-06-20 18:19:44 +00:00
Nick Hibma c1fc766d3f 1) Do not include usbdivar.h and access the interface descriptor through
usbd_get_interface_descriptor
2) remove soft reset. It's been dropped from the USB Mass Storage Bulk-Only
   Specification
3) move the clear feature halt to the reset routine.
1999-06-20 15:46:13 +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
John Birrell e18a82c504 Bump the __FreeBSD_version number now that libc_r contains a wrapper
for the poll syscall.
1999-06-20 08:34:24 +00:00
Alan Cox c207703465 Set cnt.v_page_size to PAGE_SIZE rather than DEFAULT_PAGE_SIZE so that
"vmstat -s" reports the correct value on the Alpha.

Submitted by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1999-06-20 04:55:29 +00:00
Greg Lehey 12a7982c45 Correct description of Vinum. 1999-06-20 04:35:22 +00:00
Jordan K. Hubbard d571daa00c Clean up some of the documentation at the top. 1999-06-20 03:36:46 +00:00
Alan Cox dc92aa57fd For consistency with other implementations, check for the existence
of the segment before checking its permissions.

PR:		kern/11999
Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
1999-06-19 23:53:13 +00:00
Robert Nordier fc2ff140c2 Provide for enabling/disabling each slice individually. 1999-06-19 21:40:55 +00:00
Robert Nordier bc53095dd4 Fix use of e_phoff in place of e_phnum. 1999-06-19 20:50:38 +00:00
Robert Nordier 68aadbb9c9 Correct and clarify some comments. 1999-06-19 20:40:32 +00:00
Bill Paul 14de28bd64 Add device rl0 to GENERIC. Also add al0 (ADMtek PCI ethernet) which I
forgot to do previously.
1999-06-19 20:25:25 +00:00
Robert Nordier ec4e5afb48 Goodbye to vaules, becasue, similiar, backgroud, aquired, freelisat, etc. 1999-06-19 20:20:52 +00:00
Bill Paul 19e7516669 Fix up the RealTek 8139 driver to work on FreeBSD/alpha. This involves a
few changes:

- there was a bug in rl_list_tx_init(): it was calculating the registers
  to initialize incorrectly. Not a problem on the x86 where unaligned
  access are allowed, but a problem on the alpha.

- set rl_btag accordingly depending on the machine type

- rl_rxeof() needs to be sure to longword-align the packet data. This
  is a little tricky since we copy the data out of the receive buffer
  using m_devget(), however there's no way to tell m_devget() to fill
  in the mbufs starting at a particular offset. To get around this,
  we tell m_devget to copy bytes+2 bytes starting at offset offset-2. This
  results in the proper alignment, and we can trim off the two leading
  bytes afterwards with m_adj(). We also allocate some extra space before
  the start of the receive buffer so that we don't get into trouble in
  the case where offset == 0.

- redefine vtophys() in if_rlreg.h for the alpha.

Making this chipset work on the alpha is sort of the inverse of putting
a jet engine on a rowboat (putting a propeller on a 747?) but when
you can get these things for $5 a pop, it's hard to stop people from
buying them.
1999-06-19 20:17:38 +00:00
Matt Jacob 3d32dfbfdf Thanks to Bruce for noticing this.... compare against the *new* nfsnode's
mount point for seeing whether or not the new nfsnode is already in the
hash queue. We're pretty much guaranteed that the old nfsnode is already
in the hash queue. Wank! Infinite Loop! Looks like just a minor typo....
(ah the influence of fortran ... np && np2... why not nfsnode_the_first &&
nfsnode_the_second???)...
1999-06-19 19:33:44 +00:00
Brian Feldman 7a2aab80b0 This is the much-awaited cleaned up version of IPFW [ug]id support.
All relevant changes have been made (including ipfw.8).
1999-06-19 18:43:33 +00:00
Alan Cox 6ea5bd80fe Remove some unused function and variable declarations. 1999-06-19 18:42:53 +00:00
Poul-Henning Kamp 413dd0ba39 Add a new interface ioctl, to return "aux status".
This is inteded for to allow ifconfig to print various unstructured
information from an interface.

The data is returned from the kernel in ASCII form, see the comment in
if.h for some technicalities.

Canonical cut&paste example to be found in if_tun.c

Initial use:
        Now tun* interfaces tell the PID of the process which opened them.

Future uses could be (volounteers welcome!):
        Have ppp/slip interfaces tell which tty they use.
        Make sync interfaces return their media state: red/yellow/blue
        alarm, timeslot assignment and so on.
        Make ethernets warn about missing heartbeats and/or cables
1999-06-19 18:42:31 +00:00
Doug Rabson 13549ec01c Add a fast version of bcmp which compares longwords at a time.
Submitted by: Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
1999-06-19 16:30:28 +00:00
Doug Rabson 8af8f3ae04 Adjust mcclock lines to avoid config(8) warning. 1999-06-19 13:12:51 +00:00
Doug Rabson 93b4562045 Convert signalling NaNs to quiet NaNs as specified by the Alpha Architecture
Reference Manual.

Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1999-06-19 11:54:35 +00:00
Brian Feldman ebe119ae6c Add RCS strings to kernel ipfilter files. 1999-06-19 11:35:41 +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
Brian Feldman e214816bfc This should fix ipfilter for everyone it was broken for. CDEV_MAJOR is _not_
-1.

Noticed by: users on freebsd-current
1999-06-19 02:54:04 +00:00
Bill Paul 274342303b Add a transmit descriptor usage counter and use it to absolutely,
positively not let ti_encap() fill up the TX ring all the way and wrap
around. This fixes a potential transmit lockup where a really fast
machine (or particular TX traffic pattern) can overrun the end of the
ring.

Reported by: John Plevyak <jplevyak@inktomi.com>
1999-06-19 00:36:56 +00:00
Robert Nordier 97a62e386d Change active flag handling; sanity check passed drive number; pass
partition pointer to bootstrap; optimise away 10 bytes; cosmetics.
1999-06-18 21:49:18 +00:00
Brian Feldman 66e98eef2b K6-family MTRR support
This is tested, but I really can't say whether it works entirely. I
don't know exactly what to look for when testing it. So let's say this
is open for testing. Send any results to green@FreeBSD.org

Reviewed by:	msmith (long ago)
1999-06-18 19:56:02 +00:00
Brian Feldman 6b32f7692f Harmless change to prevent possible problems in the future. I made
sure that i686_mem was only used when
	1. CPUID had MTRR set (this was there before)
	2. the CPU was GenuineIntel (not there)
	3. the CPU is a 686 (also not there)

This should prevent any problems with CPUs that set MTRR but aren't
compatibile with Intel's interface (none that I know of yet.)
1999-06-18 19:24:40 +00:00
KATO Takenori fe85f176c7 New parallel port support for PC98. Old PC98s which have
uni-directional parallel port should use olpt driver instead of lpt
driver.

Files ppc.c and ppcreg.h are copied form i386/isa directory with PC98
change.

Submitted by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
1999-06-18 14:48:28 +00:00
Bruce Evans 50045fbc7c Changed the global `idt' from an array to a pointer so that npx.c
automatically hacks on the active copy of the IDT if f00f_hack()
has changed it.  This also allows simplifications in setidt().
This fixes breakage of FP exception handling by rev.1.55 of
sys/kernel.h.  FP exceptions were sent to npx.c's probe handlers
because npx.c "restored" the old handlers to the wrong copy of the
IDT.  The SYSINIT for f00f_hack() was purposely run quite late to
avoid problems like this, but it is bogusly associated with the
SYSINIT for proc0 so it was moved with the latter.

Problem reported and fix tested by:  Martin Cracauer <cracauer@cons.org>
1999-06-18 14:32:21 +00:00
Kirk McKusick 7481264c1e On our final pass through ffs_fsync, do all I/O synchronously so that
we can find out if our flush is failing because of write errors. This
change avoids a "flush failed" panic during unrecoverable disk errors.
1999-06-18 05:49:46 +00:00
Brian Feldman f29be02190 Reviewed by: the cast of thousands
This is the change to struct sockets that gets rid of so_uid and replaces
it with a much more useful struct pcred *so_cred. This is here to be able
to do socket-level credential checks (i.e. IPFW uid/gid support, to be added
to HEAD soon). Along with this comes an update to pidentd which greatly
simplifies the code necessary to get a uid from a socket. Soon to come:
a sysctl() interface to finding individual sockets' credentials.
1999-06-17 23:54:50 +00:00
Mark Murray eb9ae2c0ce Add a kernel config for PC-Card machines. This is part of the
(safe) PAO integration.

Submitted by:	Tatsumi HOSOKAWA
1999-06-17 23:53:20 +00:00
Gary Palmer 0625ba2fc3 Add Id strings 1999-06-17 23:42:45 +00:00
Alan Cox 6389da78d5 vm_map_growstack uses vmspace::vm_ssize as though it contained
the stack size in bytes when in fact it is the stack size in pages.
1999-06-17 21:29:38 +00:00
Nick Hibma 6979450036 Update the comments on values than can be returned by DEVICE_PROBE.
DEVICE_PROBE can return priorities.

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
1999-06-17 19:22:12 +00:00
KATO Takenori f360e91d4d Sync with sys/i386/i386/machdep.c revision up to 1.341. 1999-06-17 11:09:39 +00:00
KATO Takenori 773e7f413e Sync with sys/i386/conf/options.i386 revision 1.117. 1999-06-17 11:07:52 +00:00
Bruce Evans 212dfe6fc7 Fixed a missing userland dev_t to kernel dev_t conversion. 1999-06-17 07:07:55 +00:00
Alan Cox 29b45e9e99 vm_map_insert sometimes extends an existing vm_map entry, rather than
creating a new entry.  vm_map_stack and vm_map_growstack can panic when
a new entry isn't created.  Fixed vm_map_stack and vm_map_growstack.

Also, when extending the stack, always set the protection to VM_PROT_ALL.
1999-06-17 05:49:00 +00:00
Julian Elischer 4e1b754078 Reformat comment to match indentation of code around it. 1999-06-17 01:25:25 +00:00
Alan Cox 94f7e29a2a Move vm_map_stack and vm_map_growstack after the definition
of the vm_map_clip_end macro.  (The next commit will modify
vm_map_stack and vm_map_growstack to use vm_map_clip_end.)
1999-06-17 00:39:26 +00:00
Alan Cox 1fc43fd11d Remove some unused declarations and duplicate initialization. 1999-06-17 00:27:39 +00:00
Kirk McKusick f9c8cab591 Add a vnode argument to VOP_BWRITE to get rid of the last vnode
operator special case. Delete special case code from vnode_if.sh,
vnode_if.src, umap_vnops.c, and null_vnops.c.
1999-06-16 23:27:55 +00:00
Tor Egge 23fc6cddce Close a race window where a tcp socket is closed while tcp_pcblist is
copying out tcp socket info, causing a NULL pointer to be dereferenced.
1999-06-16 19:05:17 +00:00
Dmitrij Tejblum 9a56b5f763 Make syscall tracing work: include "opt_ktrace.h" and make it compile. 1999-06-16 18:55:35 +00:00
Dmitrij Tejblum 71ddfdbbd5 Make sure syscall arguments properly aligned in ktrace records.
Make syscall return value a register_t.

Based on a patch from Hidetoshi Shimokawa.
Mostly reviewed by:	Hidetoshi Shimokawa and Bruce Evans.
1999-06-16 18:37:01 +00:00
Matt Jacob 233d9cfce2 Use vput instead of vrele.
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Submitted by:	Ville-Pertti Keinonen <will@iki.fi>
Obtained from:	Matthew Dillon <dillon@apollo.backplane.com>
1999-06-16 18:35:58 +00:00
Nick Hibma f06b2abff3 Remove option USBVERBOSE
Add the options for debugging used in dev/usb/*.c

Submitted by:	Kazu
1999-06-16 17:34:36 +00:00
Bill Paul 05222a2c7d Grrr! The PNIC II's multicast hash table is only 128 bits wide, not 512
like the original PNIC and the MX98715A (from which the PNIC II is derived).
This requires special handling. Save the card type, and in mx_calchash(),
if we see that the card is a PNIC, return only the low 7 bits of the
hash instead of the low 9 bits.
1999-06-16 16:27:30 +00:00
David Greenman cd3fe8d008 Changed trypbuf to a getpbuf to work around a problem where redundant writes
would occur when clustering them - caused by running out of buffers
and taking a degenerate code path as a result. It appears that waiting
instead for buffers to become available is okay.

Submitted by:	Matthew Dillon <dillon@apollo.backplane.com>
Discovered by: Craig A Soules <soules+@andrew.cmu.edu>
1999-06-16 15:54:30 +00:00
Kazutaka YOKOTA 5c539f036d Print verbose messages when there is error.
Oked by: des
1999-06-16 14:04:45 +00:00
Bill Fumerola 73568d2bf1 Fix non-benign typo.
Submitted by:	Daniel Baker <dbaker@cuckoo.com>
1999-06-16 12:26:40 +00:00
Tor Egge a31bad69da Clean up bitrot in interrupt tracing code. 1999-06-16 03:53:52 +00:00
Tor Egge 01cf8ad024 If we still haven't got a sufficient number of free buffers after the
call to flushdirtybuffers() then sleep in waitfreebuffers().
PR:		11697
Reviewed by:	David Greenman, Matt Dillon
1999-06-16 03:19:04 +00:00
Kirk McKusick e4ab40bcb6 Get rid of the global variable rushjob and replace it with a function in
kern/vfs_subr.c named speedup_syncer() which handles the speedup request.
Change the various clients of rushjob to use the new function.
1999-06-15 23:37:29 +00:00
Matt Jacob e672bf9cd6 If we retry this operation from the top of this routine, we need to
make sure we've freed any allocated resources (to avoid a memory leak)
and and do the right thing with respect to the nfs node hash lock we'd
acquired.
1999-06-15 23:24:14 +00:00
Julian Elischer 28808d20e9 Add a couple of command definitions.
Also add offsets into the IDE parameter block so that it is humanly
possible to match the structure to the manufacturer's documentation.
(basically this is just changes to comments)
1999-06-15 23:13:09 +00:00
Kirk McKusick 5e1a20fd26 COM_LLCONSOLE should over-ride COM_DEBUGGER request. 1999-06-15 22:15:10 +00:00
Dag-Erling Smørgrav 9b953cf681 Kill option FAILSAFE.
PR:		i386/12187
Approved by:	bde
1999-06-15 13:14:56 +00:00
Roger Hardiman 69be7dc19e Add VIA Apollo Master VT82c570 chipset. (I have 2 of these)
Also, Apollo IDE controller has device ID of 1571 and 0571
1999-06-15 12:01:26 +00:00
Mark Newton 009b52bf57 Ensoniq AudioPCI sound cards haven't worked since the newbus integration
because they haven't been able to attach.  Now fixed.

Submitted by:	Christian Weisgerber <naddy@mips.rhein-neckar.de>
1999-06-15 00:00:10 +00:00
John Birrell bfc6f8cf11 Add the System V message queue and semaphore options for better 3rd party
software support out-of-the-box (like i386 does).
1999-06-14 22:59:55 +00:00
Nik Clayton 501bebb5be Include <sys/time.h> for correctness. BDE has a better version of this,
but it's more complex, and in his words

    Commit your version, since it is the only one that is clearly permitted
    (if not best), and I'll untangle it later.

PR:		docs/11589
Reviewed by:	Bruce "he kicks ass" Evans
1999-06-14 19:03:46 +00:00
Hidetoshi Shimokawa 7872cbaeea Fix typo confusing `fa' and 'fb' registers.
Now, MATLAB works fine under OSF/1 emulation.
1999-06-14 11:42:30 +00:00
Nick Hibma 85dd1453b1 1) remove the soft reset after a command failed.
2) remove printing of errno and errstr
1999-06-13 22:09:14 +00:00
Poul-Henning Kamp 7a7404d275 Eliminate the bogus procfs private almost struct dirent structure.
Spotted by: Lars Hamren
Reviewed by: bde
1999-06-13 20:53:16 +00:00
Nick Hibma 7b69218647 1) Add non-blocking I/O on read
2) Add checks to make sure we do not dereference the softc when not found
because the device has been removed.
1999-06-13 20:49:12 +00:00
Nick Hibma 680514601e 1) Add the USB controllers (will now print pretty strings when no usb
support is compiled in)
2) Add probing for generic USB host controllers as well so we get them all
3) make the returned strings look alike in the whole file
1999-06-13 20:48:29 +00:00
Nick Hibma b24ecce39c Shorten the strings a bit (remove 'Host') 1999-06-13 20:46:10 +00:00
Alan Cox dabd891d6e Use pmap_kenter instead of pmap_enter to map the message buffer. 1999-06-13 19:20:25 +00:00
Roger Hardiman 3d68f363a4 Removed checking for unit>NBKTR.
No longer need when using device_get_softc.
(also fixed bug where loadable bktr module could only access 1st device)
1999-06-13 16:05:00 +00:00
Roger Hardiman d56282d89f Add bktr_load for the loadable Bt848/Bt878 driver. 1999-06-13 15:45:49 +00:00
Alan Cox 1c85e3df24 vm_map_protect:
The wrong vm_map_entry is used to determine if writes must not be
	allowed due to COW.
1999-06-12 23:10:38 +00:00
Roger Hardiman 05da1d9122 Add bktr (Bt848/Bt878 driver loadable module) to the Makefile i386 only section 1999-06-12 15:11:33 +00:00
Roger Hardiman 6c96acd35c Change perl5 to perl (same change as made in the fxp module) 1999-06-12 15:08:50 +00:00
Roger Hardiman b72df81b21 Makefile to build a loadable bktr Bt848/Bt878 device driver
This allows the bt848 grabber to be loaded in the boot loader or
after bootup without the need for a custom kernel
1999-06-12 15:00:19 +00:00
Roger Hardiman 5a2f31f0fb Updated to use the new 4.x newbus API
Also removed the BSDI support (for now)
This allows the driver to be loaded/unloaded as a KLD
and loaded in the boot loader phase whithout making a custom kernel.
1999-06-12 14:54:56 +00:00
Ruslan Ermilov adbdafc6b2 Don't accept divert/tee/pipe rules without corresponding option.
PR:		10324
Reviewed by:	luigi
1999-06-11 11:27:35 +00:00
Dmitrij Tejblum 23405ee478 Replace my previous fix of saving the FP state with a much simpler one: when
we swap out fpcurproc, save its FP state.

Suggested by:	bde
1999-06-10 20:40:59 +00:00
Jonathan Lemon 5a86dd8c67 Change variable used for calculating ending address of physical memory
from 'int' to 'vm_offset_t'.

Spotted by:	 Richard Cownie <tich@ma.ikos.com>
1999-06-10 02:48:51 +00:00
Andrey A. Chernov 97a83933e5 Add detection code for NVidia Riva 128,TNT,TNT2
(TNT2 from me)

PR: 12094
Submitted by: Ilya Naumov camel@avias.com
1999-06-09 11:46:43 +00:00
Dmitrij Tejblum 2105375397 Use kmem_alloc_nofault() rather than kmem_alloc_pageable() to allocate
kernel virtual address space for UPAGES.
1999-06-08 17:14:22 +00:00
Dmitrij Tejblum a839bdc8af Add a function kmem_alloc_nofault() - same as kmem_alloc_pageable(), but
create a nofault entry. It will be used to allocate kmem for upages.

(I am not too happy with all this, but it's better than nothing).
1999-06-08 17:03:28 +00:00
Dmitrij Tejblum be960acd20 Keep fpcurproc locked in memory, so that we always can save the FP state
correctly.

This should fix the "pmap_changebit didn't" panic that some people see.

Reviewed by:	dfr
1999-06-08 16:42:19 +00:00
Mike Smith 79fc0bf4a0 From the submitter:
- this causes POSIX locking to use the thread group leader
   (p->p_leader) as the locking thread for all advisory locks.
   In non-kernel-threaded code p->p_leader == p, so this will have
   no effect.

   This results in (more) correct POSIX threaded flock-ing semantics.

   It also prevents the leader from exiting before any of the children.
   (so that p->p_leader will never be stale) in exit1().

   We have been running this patch for over a month now in our lab
   under load and at customer sites.

Submitted by:	John Plevyak <jplevyak@inktomi.com>
1999-06-07 20:37:29 +00:00
Archie Cobbs 05292ba234 ksprintn() may be called with base=2, so redefine MAXNBUF accordingly.
Other brucification tweaks.

Obtained from:	bde@freebsd.org
1999-06-07 18:26:26 +00:00
Steve Price 2df9ad0bd7 The FD options are now in /sys/conf/options so need to duplicate them
here and keep people from building new kernels. :)
1999-06-06 22:45:04 +00:00
Bill Paul 32af3bf215 Small optimization: use wi_seek() in wi_read_record() and wi_write_record()
instead of frobbing the buffer access path registers directly. Saves a
few lines of duplicated code.
1999-06-06 16:44:04 +00:00
KATO Takenori ebc253718c Sync with sys/i386/conf/majors.i386 revision 1.76. 1999-06-06 12:50:46 +00:00
KATO Takenori 621ba6f2bb Sync with sys/boot/i386/libi386/bootinfo.c revision 1.19. 1999-06-06 12:46:40 +00:00
Poul-Henning Kamp e1f523d464 Reserve cdev major 126 for sync support. 1999-06-06 10:41:35 +00:00
Poul-Henning Kamp 2f55ead758 typo in previous commit 1999-06-06 09:28:01 +00:00
Poul-Henning Kamp cf4b937128 Introduce IFF_SMART bit.
This means that the driver will add/delete routes when it knows it is
up/down, rather than have the generic code belive it is up if configured.

This is probably most useful for serial lines, although many PHY chips
could probably tell us if we're connected to the cable/hub as well.
1999-06-06 09:17:51 +00:00
Archie Cobbs ad4f8dbd23 The function ksprintn(), which is used to convert numbers to ASCII, is not
reentrant because it returns a static buffer. This results in a race condition
when/if an interrupt handler calls log(), printf() etc. Fix this.
1999-06-06 02:41:55 +00:00
Alan Cox 4738fa0970 vm_mmap:
Insure that device mappings get MAP_PREFAULT(_PARTIAL) set,
	so that 4M page mappings are used when possible.

Reviewed by:	Luoqi Chen <luoqi@watermarkgroup.com>
1999-06-05 18:21:53 +00:00
Luoqi Chen 31fdd69a1f Fix an accounting problem when prefaulting 4M pages.
PR:		kern/11948
1999-06-05 16:16:37 +00:00
Doug Rabson 814ce98883 Floppy driver options moved to conf/options. 1999-06-05 13:57:10 +00:00
Doug Rabson 37b094f876 * Implement ISA dma (only for CIA now but more chipsets to follow).
* Port the fd driver to alpha.
1999-06-05 13:30:13 +00:00
Peter Wemm b903b04cc0 Various changes lifted from the OpenBSD cvs tree:
txdr_hyper and fxdr_hyper tweaks to avoid excessive CPU order knowledge.

nfs_serv.c: don't call nfsm_adj() with negative values, windows clients
could crash servers when doing a readdir of a large directory.

nfs_socket.c: Use IP_PORTRANGE to get a priviliged port without a spin
loop trying to bind().  Don't clobber a mbuf pointer or we get panics
on a NFS3ERR_JUKEBOX error from a server when reusing a freed mbuf.

nfs_subs.c: Don't loose st_blocks on NFSv2 mounts when > 2GB.

Obtained from:  OpenBSD
1999-06-05 05:35:03 +00:00
Peter Wemm ba68ee9642 Fix a malloc race
Obtained from:  OpenBSD (csapuntz)
1999-06-05 05:26:36 +00:00
Peter Wemm adbde675ee Don't mistake a non-async block that needs to be committed for an
interrupted write.

Obtained from: fvdl@NetBSD.org via OpenBSD.
1999-06-05 05:25:37 +00:00
Alan Cox 3d41489171 Restructure pipe_read in order to eliminate several race conditions.
Submitted by:	Matthew Dillon <dillon@apollo.backplane.com> and myself
1999-06-05 03:53:57 +00:00
Bruce Evans e650b8f451 Fixed null setting of `rc_started'. This was fixed for the
corresponding variable `rc_wakeup_started' in rev.1.36 but broken
again in rev.1.37.  This bug only caused excessive polling (it gave
NRC activations for each of the SWI handler and the timeout handler
instead of 1 of each).

Moved cdevsw attachment from the driver probe routine to the driver
attach routine.
1999-06-04 18:53:47 +00:00
Bruce Evans 216b6d2da0 Really fix cy-driver-related panics when SMP is configured. Rev.1.88 only
fixed half the problem.

Tested by:	Michael Scott Boers <mboers@datacompusa.com>
1999-06-04 18:13:25 +00:00
Roger Hardiman 2dc6d34fac Fix the cdevsw_add change made by PHK.
(It was accidentally added to the BSDI bktr_probe and not the
 FreeBSD bktr_probe)
1999-06-04 13:24:54 +00:00
Nick Hibma bb32aa3960 Add remark about where bInterfaceProtocol number for USB Zip drive comes
from. 0x50 == 'P' for protoype.

Obtained from:	Pat LaVarre <LAVARRE@iomega.com> on linux-usb@suse.com
1999-06-04 12:41:42 +00:00
KATO Takenori cbd4e621ff Oops, remove redundant comments. 1999-06-04 08:19:29 +00:00
KATO Takenori 84516d40b6 Declare Crtat and Atrat because screen savers use these variables.
Pointed out by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
1999-06-04 08:17:11 +00:00
Guy Helmer 3d8993c197 Modify the boot loader to recognize the -C flag and pass the RB_CDROM
flag to the kernel to mount a CDROM as the root filesystem.  Alternatively,
the boot_cdrom env var can be set.

As Mike Smith noted, "-C is the "wrong" way to do this", but this is
an acceptable stopgap in lieu of a better way.

PR:		bin/11884
Reviewed by:	msmith@freebsd.org
1999-06-04 03:18:28 +00:00
Michael Haro 1f5abee8bd Add the 3Dfx Voodoo Banshee 1999-06-04 02:38:18 +00:00
Peter Wemm 9c9906e912 Plug a mbuf leak in tcp_usr_send(). pru_send() routines are expected
to either enqueue or free their mbuf chains, but tcp_usr_send() was
dropping them on the floor if the tcpcb/inpcb has been torn down in the
middle of a send/write attempt.  This has been responsible for a wide
variety of mbuf leak patterns, ranging from slow gradual leakage to rather
rapid exhaustion.  This has been a problem since before 2.2 was branched
and appears to have been fixed in rev 1.16 and lost in 1.23/1.28.

Thanks to Jayanth Vijayaraghavan <jayanth@yahoo-inc.com> for checking
(extensively) into this on a live production 2.2.x system and that it
was the actual cause of the leak and looks like it fixes it.  The machine
in question was loosing (from memory) about 150 mbufs per hour under
load and a change similar to this stopped it.  (Don't blame Jayanth
for this patch though)

An alternative approach to this would be to recheck SS_CANTSENDMORE etc
inside the splnet() right before calling pru_send() after all the potential
sleeps, interrupts and delays have happened.  However, this would mean
exposing knowledge of the tcp stack's reset handling and removal of the
pcb to the generic code.  There are other things that call pru_send()
directly though.

Problem originally noted by:  John Plevyak <jplevyak@inktomi.com>
1999-06-04 02:27:06 +00:00
Peter Wemm 5004cc2ecf Remove a rather bogus search path reference.. 1999-06-03 22:07:41 +00:00
Peter Wemm b42a56cd10 GC unused prototype 1999-06-03 22:03:35 +00:00
Peter Wemm 4961913d45 Quieten the bt_isa_probe() messages since they get a bit much when
the isa probe has gone hunting for a card on it's own.
1999-06-03 20:56:09 +00:00
Peter Wemm e6eca02874 remove references to isa_device, it's no longer associated with interrupts. 1999-06-03 20:41:00 +00:00
KATO Takenori 1aa9b8768c Remove VM86 option. 1999-06-03 13:50:54 +00:00
KATO Takenori 11e2bfb4b6 Sync with sys/i386/i386/machdep.c revision 1.339.
New function getmemsize_pc98 is added in this commit, since PC98 is
quite different in obtaining memory size from IBM-PC.  Many lines of
this function is shareable with IBM-PC's getmemsize function, but
sharing needs many #ifdef PC98 statements.  Therefore, I gave up
sharing code with IBM-PC's and just added new function.
1999-06-03 13:49:52 +00:00
KATO Takenori 90397901c8 Sync with sys/i386/conf/files.i386 and options.i386 revisions 1.246
and 1.115, respectively.
1999-06-03 13:04:00 +00:00
Kazutaka YOKOTA 2b9e6c7549 Fix PS/2 MouseMan+ protocol. We have been looking at a wrong place
for the sign bit for roller movement!
1999-06-03 12:42:10 +00:00
KATO Takenori 8326768a5c Use MACHINE_ARCH instead of MACHINE to check x86 architecture.
Pointed out by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
1999-06-03 10:38:07 +00:00
Bruce Evans fcc3f5ee76 Backed out the previous backout. We may as well have a version of ucmpdi2.c
that actually compiles, and I use it for i386's with 64 bit longs.
1999-06-02 16:39:14 +00:00
Mark Newton 3f9d7b80b2 Back out last commit (did I get all of them?)
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-06-02 15:35:46 +00:00
John Birrell c27d843bd9 Remove vinum from the build until Greg reviews phk's cdevsw changes.
Preferred by: phk (rather than committing the patch without review).
1999-06-02 07:15:17 +00:00
Jonathan Lemon 26f13ad079 Unbreak memory sizing for SMP. 1999-06-01 23:45:48 +00:00
Dmitrij Tejblum 4ea5ad99d5 || vs && confusion in cdevsw_add(). 1999-06-01 20:41:26 +00:00
Dmitrij Tejblum e2754b751d Remove an unused variable. 1999-06-01 20:29:58 +00:00
Dmitrij Tejblum 68ae83f809 cdevsw_add(&cn_devsw), not cdevsw_add(&dev). 1999-06-01 20:26:04 +00:00
Bill Paul 7ac97baa2c Change the warning message issued if pci_map_port() fails. I think this
happens if you have a BIOS with a 'Plug & Play OS' setting and you leave
it set to 'Yes.' This is wrong for FreeBSD (and LoseNT): it should be set
to 'No.' Apparently it's still possible to map the iobase of the NIC and
have the card work by reading the config space manually (which is what
the driver does if pci_map_port() fails) but we need to warn the user to
do fix their machine anyway. Anyway, warn the user to check the 'Plug &
Play OS' setting in their BIOS if mapping the io space fails.
1999-06-01 19:04:23 +00:00
Poul-Henning Kamp 6fcd8a7c93 Introduce the makebdev() function, it does the same as the makedev()
function for now, but that will change.
1999-06-01 18:56:26 +00:00
Jonathan Lemon 4065a35af3 Null commit; note that there is a new memory sizing routine that uses
the BIOS calls to determine the memory configuration.  This should fix
problems with >64M for good.

Reviewed by:	Mike Smith
1999-06-01 18:25:26 +00:00
Jonathan Lemon eb9d435ae7 Unifdef VM86.
Reviewed by:	silence on on -current
1999-06-01 18:20:36 +00:00
Jonathan Lemon 778359545e Make vm86 a standard component
Reviewed by:	silence on on -current
1999-06-01 18:18:39 +00:00
Jonathan Lemon 2171c52a81 Unifdef VM86
Reviewed by:	silence on on -current
1999-06-01 18:17:50 +00:00
Roger Hardiman de9f1beee4 Updated to support new Meteor/PPB cards (PCI-PCI Bridge).
The driver now identifies the IBM PCI-PCI Bridge fitted to newer
Matrox cards and initialises it.

Sumitted by: Anton Berezin <tobez@plab.ku.dk>
The Protein Laboratory, University of Copenhagen
1999-06-01 17:30:08 +00:00
Poul-Henning Kamp ae19718ee2 Shorten a detour around dev_t to get a udev_t created. 1999-06-01 17:11:27 +00:00
KATO Takenori a3bcef65cd Fixed locations of include files. 1999-06-01 13:14:35 +00:00
KATO Takenori f0828bf1b0 Sync with sys/i386/isa/clock.c revision 1.136. 1999-06-01 12:32:54 +00:00
Doug Rabson e610a94345 Correct dumb mistake in previous commit. 1999-06-01 11:16:23 +00:00
Doug Rabson a92ac6bc75 Move fd driver back to files.${arch} since pc98 has a special fd driver. 1999-06-01 09:02:27 +00:00
Poul-Henning Kamp d69065a41e devsw and cdevsw_add() changes for i4b.
Reviewed by:	hm
1999-06-01 08:46:56 +00:00
Nick Hibma 509a03961f USB stopped working as of the recent cdevsw cleanup. This fixes that. 1999-06-01 07:22:01 +00:00
Nick Hibma 20f81fcbbc Remove the stub driver. It's useless. 1999-06-01 07:18:53 +00:00
Nick Hibma a0557cd697 usbd_get_request_status now only returns the value if the associated
pointer is passed.
1999-06-01 06:39:03 +00:00
Nick Hibma 114278b089 1) Remove the definition of usb_cdc_generic_descriptor_t. It is
equivalent to usb_descriptor_t

2) Rename USB_CDC_CM_CM_OVER_DATA to USB_CDC_CM_OVER_DATA
1999-05-31 22:35:55 +00:00
Roger Hardiman 153eb46fb6 On the new Meteor cards, the Philips SAA 7116 is connected to the PCI bus
via an IBM PCI-PCI bridge (82351 or 82352 or 82353)

The driver must identify if it is on a secondary PCI bus, which is
created via the IBM PCI-PCI bridge. If it is, then it must initialise
the IBM PCI-PCI bridge correctly.

To do this, the following new functions are added.
Because they use the pcici_t tag, they are considered 2.2 compatibility APIs
  pcici_t * pci_get_parent_from_tag(pcici_t tag);
  int       pci_get_bus_from_tag(pcici_t tag);

(The _from_tag suffix is used to prevent clashes with similarly named
 newbus PCI API functions)

Submitted by: Anton Berezin <tobez@plab.ku.dk>
Reviewed by:  Doug Rabson <dfr@nlsystems.com>
Reworked by:  Me (roger)
1999-05-31 22:13:37 +00:00
Dmitrij Tejblum dcad3b0027 Don't use nblkdev. 1999-05-31 20:44:11 +00:00
Dmitrij Tejblum faaf4ecfd9 Remove declaration of the nblkdev and nchrdev variables. 1999-05-31 20:42:41 +00:00
Doug Rabson a97c75b7ea * Change include file locations.
* Fix some misunderstandings about the return value of resource_int_value().
* Make it build on alpha (doesn't work yet...)
1999-05-31 18:39:17 +00:00
Doug Rabson 3bfc7e5928 Remove fd driver from its old home and change files which include rtc.h
to account for its new location.
1999-05-31 18:36:14 +00:00
Doug Rabson c77dda34ae The fd driver has moved from i386/isa to isa. 1999-05-31 18:33:24 +00:00
Poul-Henning Kamp 2447bec829 Simplify cdevsw registration.
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.
1999-05-31 11:29:30 +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
Bill Paul c008dec8df Add support for SiS 900 chipset (PCI ID 0x1039/0x0900), which appears to
be yet another rebadged RealTek 8139.
1999-05-30 18:55:20 +00:00
Nick Hibma 6e3802969a Enable attachment of multiple drivers to a single device. 1999-05-30 18:49:17 +00:00
Nick Hibma 2eaf666111 Notify CAM of the removed device on detach. 1999-05-30 18:46:04 +00:00
Bill Paul 042d207492 Whoops, forgot to update xl_mediacheck() to account for the 3c905C. 1999-05-30 18:11:47 +00:00
Bill Paul a62accda5a Head for the hills friends and neighbors, 3Com has yet another 3c90X
chipset. First you thrilled to the 3c905, then you trembled at the
3c905B, now gaze in wonder at: the 3c905C! This appears to be another
3c90X series chip called the Tornado (PCI ID 0x10B7/0x9200) and should
be equivalent (from the driver API perspective) to the 3c905B, so all
we have to do is add the PCI ID to the list.
1999-05-30 18:09:17 +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
Poul-Henning Kamp 7a1c7bc99f Don't bogusly define a d_reset_t function. 1999-05-30 14:55:24 +00:00
Nick Hibma 8c701b4eef 1) Add URL for printer class specification
2) Change name of UE_IN to UE_DIR
3) Enable printing of the Printer Id string
4) Clean up debugging output while we are at it.
1999-05-30 13:03:00 +00:00
Nick Hibma 12788196b1 - When aborting an interrupt pipe, just wait for 1ms for the completion
of the current interrupt trasaction.
- Do not schedule the next interrupt transaction if the pipe is being
aborted or the last round of the interrupt transaction ended with error.

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-05-30 12:49:39 +00:00
Nick Hibma c9efdb87e8 When the mouse is being disconnected, do the followings:
- Call ums_disable() to abort the pipe.
- Do not wake up processes which has been waiting or polling for mouse
  data.  It won't be available anymore.

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-05-30 12:48: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 f7f2df54bb No support for pnp yet. 1999-05-30 11:12:30 +00:00
Doug Rabson d384956496 No support for pnp devices yet. 1999-05-30 11:10:10 +00:00
Doug Rabson 8b05278ca1 Allow up to 8 ports, 4 memory regions and two irqs and drqs. 1999-05-30 11:05:39 +00:00
Doug Rabson 4c5088e255 * Use ISA_DELETE_RESOURCE to cancel memory resource if driver clears maddr.
* Don't allow new-style isapnp devices through the compat interfaces.
1999-05-30 11:04:31 +00:00
Doug Rabson d5b5f7a7ac Don't include isa_dma.h if we have already seen isavar.h 1999-05-30 11:03:10 +00:00
Doug Rabson cfa84f4631 * Add ivars for ISA pnp.
* Move isa_dma* declarations to isavar.h.
* Add a method ISA_DELETE_RESOURCE() to the ISA interface.
* Tidy up include protection defines.
1999-05-30 11:02:17 +00:00
Doug Rabson bcbb365b6b In pci_alloc_resource() only check start and end to see if its a default. 1999-05-30 10:54:31 +00:00
Doug Rabson 319e3d3049 Activate/deactivate resources by calling the method, not through the
resource manager automatic handling of RF_ACTIVE.
1999-05-30 10:50:57 +00:00
Doug Rabson 13b285ba59 Use resource allocation apis to get ports. 1999-05-30 10:49:25 +00:00
Doug Rabson 75aeebed71 Typo: "can't boot 'boot'" should be "can't boot 'kernel'" 1999-05-30 10:45:03 +00:00
Doug Rabson 20b62c5ac9 * Add a function devclass_create() which looks up the named devclass and
creates it if it doesn't exist.
* Rename resource_list_remove() to resource_list_delete() for consistency.
1999-05-30 10:27:11 +00:00
Alan Cox c7997d57f1 Addendum to 1.155. Verify the existence of the object before checking
its reference count.
1999-05-30 01:12:19 +00:00
Andrew Gallatin 4742fe7a4d When memory mapping a PCI device (like XFree86 does) on an XP1000, we must
use ALPHA_PHYS_TO_K0SEG(offset) rather than just plain offet.  I've verified
that this does not break other platforms (I've tested an AlphaStation 200
and a Personal Workstation 500au with this patch).

As to why this works, well.. Its black magic as far as I know.  I obtained
this hack from Myricom, who in turn, obtained it from Compaq engineers.
Without this hack, XFree86 cannot talk to a PCI graphics card.

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
Obtained from:  feldy@myri.com (Bob Felderman)
1999-05-29 19:47:51 +00:00
Andrew Gallatin ee05eeaf59 A small change to allow automatic detection of the boot
disk on Compaq XP1000's where Disk zero is dka0.0.0.6.1,
eg bus #1, slot #6.

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
1999-05-29 19:23:20 +00:00
Poul-Henning Kamp 6deb5a62cc Stop the TSC from being used as timecounter on K5/step0 machines. 1999-05-29 06:57:55 +00:00
Bill Paul 74e5e304a4 Fix support for the PNIC II. Earlier I had assumed that the PNIC II was
similar to the PNIC I (supported by the pn driver). In fact, it's really
a Macronix 98715A with wake on LAN support added. According to LinkSys,
the PNIC II was jointly developed by Lite-On and Macronis. I get the
feeling Macronix did most of the work. (The datasheet has the Macronix
logo on it, and is in fact nearly identical to the 98715 datasheet, except
for the extra wake on LAN registers.) In any case, the PNIC II works just
fine with the Macronix driver.

The changes are:

- Move PCI ID for the PNIC II from the pn driver to the mx driver.
- Mention PNIC II support in mx.4.
- Mention PNIC II support in RELNOTES.TXT and HARDWARE.TXT.
1999-05-28 18:43:25 +00:00
Bruce Evans b50641ef9c Fixed glitches (jumps) of about 1/HZ seconds for the i8254 timecounter.
The old version only worked right when the time was read strictly
more often than every 1/HZ seconds, but we only guarantee reading
it every (1/HZ + epsilon) seconds.  Part of rev.1.126-1.127 attempted
to fix this but didn't succeed.  Detect counter rollover using the
heuristic from the old version of microtime() with additional
complications for supporting calls from fast interrupt handlers.
This works provided i8254 interrupts are not delayed by more than
1/(2*HZ) seconds.

This needs more comments, and cleanups for the SMP case, and more
testing of the SMP case before it is merged into RELENG_3.

Tested by:		jhay
1999-05-28 14:08:59 +00:00