Commit graph

19663 commits

Author SHA1 Message Date
Ruslan Ermilov d137714f11 Fix reporting of src and dst IP addresses for ICMP and generic IP packets.
PR:		17319
Submitted by:	Mike Heffner <spock@techfour.net>
2000-03-14 14:11:53 +00:00
Jeroen Ruigrok van der Werven 612a914d90 Remove wd entries.
Reviewed by:	sos
Approved by:	sos, phk, peter
2000-03-14 13:23:10 +00:00
Jeroen Ruigrok van der Werven b2381471b9 Remove the wd driver from the i386 kernel options. 2000-03-14 13:18:14 +00:00
Jeroen Ruigrok van der Werven 844a81a990 Remove unused options.
Reviewed by:	sos
Approved by:	sos, phk, peter
2000-03-14 12:55:23 +00:00
Brian S. Dean 56fc73ff9b In 'ipcperm()', only call 'suser()' if it is actually required.
Previously, it was being called whether it was needed or not and the
ASU flag was being set (as a side affect of calling 'suser()') in
cases where superuser privileges were not actually needed.  This was
all pointed out to me by Bruce Evans.

Reviewed by:	bde
2000-03-13 23:00:08 +00:00
Archie Cobbs a7dc837919 - Document updates in iface netgraph node type functionality
- Remove makefile hacks for opt_inet.h, etc: the KLD now supports
  whatever address families your kernel was compiled with automagically
2000-03-13 19:19:48 +00:00
Archie Cobbs 15ba31b9ad Updates to the ng_iface(8) netgraph node type:
- Make iface nodes removable on shutdown since FreeBSD now supports
    removable interfaces
  - Simplify supporting new protocols using family_enqueue(); add a
    few new ones including IPv6
  - Add support for configurable interface mode using new
    NGM_IFACE_POINT2POINT and NGM_IFACE_BROADCAST control messages
  - Remove NGM_IFACE_GET_IFADDRS control message; it just duplicates
    the functionality of SIOCGIFCONF
2000-03-13 19:18:10 +00:00
Archie Cobbs 9a9a26fd5a Some minor prototype tweaks. 2000-03-13 19:05:11 +00:00
Archie Cobbs af207f2160 Use snprintf() instead of sprintf(). 2000-03-13 18:54:10 +00:00
Archie Cobbs c1b9e5f25b Fix typo: "ng_parse_fixedsstring_info" -> "ng_parse_fixedstring_info" 2000-03-13 18:50:38 +00:00
Bill Fumerola 1df05fbeab Welcome to 5.0-CURRENT. (__FreeBSD_version = 500000)
Approved by:	jkh, phk
2000-03-13 18:44:36 +00:00
Archie Cobbs ef02c1e500 Fix typo.
Reported by:	Robert Swindells <swindellsr@genrad.co.uk>
2000-03-13 18:29:58 +00:00
Matt Jacob 6ca3a52f59 Don't do bus resets for ULTRA2 or later cards because what seems to
happen currently is that several commands issued *after* the bus reset are
then reported destroyed.
2000-03-13 16:30:00 +00:00
Bruce Evans 03e4dc0805 Fixed a spelling error that disabled the rc driver. 2000-03-13 15:29:47 +00:00
Nick Sayer c36837a8d8 Fix some style bugs. The long line is in a chunk of code that's
being rewritten, though.

Submitted by:	bde
2000-03-13 15:27:19 +00:00
Bruce Evans 311b554beb Disabled the optimization of not doing an invltlb_1pg() when changing
pte's from zero.  The TLB is supposed to be invalidated when pte's are
changed _to_ zero, but this doesn't occur in all cases for global pages
(PG_G stops invltlb() from working, and invltlb_1pg() is not used
enough).

PR:		14141, 16568
Submitted by:	dillon
2000-03-13 14:47:46 +00:00
Matthew N. Dodd 01f1828bbb Add 'bootverbose' debug messages to assist with tracking down problems
some users have encountered.
2000-03-13 12:27:21 +00:00
Søren Schmidt 0d611a6c29 Cleanup sweep. 2000-03-13 12:27:11 +00:00
Matthew N. Dodd c7a9e0529c Initial ifmedia support. Once I figure out autoselection I'll put the
rest of the code in (so changing media actually works.)

Add a few more register definitions for use with this and other new code.

Print a few details in the probe message; this should be useful in
bug reports and such but should not add to the clutter.
2000-03-13 12:23:32 +00:00
Søren Schmidt cfb21bbb7d Enable disksort the right way both on ATA disks and ATAPI devices. 2000-03-13 12:04:58 +00:00
Matthew N. Dodd 958795f321 Copy how everyone else is doing packet transmission. (NetBSD mostly)
I've been running this for a month or so and have had no problems with it
and if I recall it was my last speed tweak.  Holler if this breaks anything.
2000-03-13 11:59:21 +00:00
Matthew N. Dodd 6629a1f812 Follow the docs a bit more in epstop() with respect to delays.
Trivial formatting.
2000-03-13 11:55:09 +00:00
Matthew N. Dodd 4a18218d69 Get rid of table lookup in favor of just subtracting. Everyone else
does it like this and I see no point in being different.
2000-03-13 11:51:44 +00:00
Matthew N. Dodd d718250d48 Call epstop() in ep_attach(). While this shouldn't be necessary we'll
do it just in case.  (Actually, with PCMCIA cards we can get in a state
where it may be required.)
2000-03-13 11:48:03 +00:00
Matthew N. Dodd 4fa28dd1c6 Set the RF_SHAREABLE flage when we allocate an IRQ. 2000-03-13 11:43:53 +00:00
Ruslan Ermilov ef61e9f97d Remove option MD5, it has been standardized almost two years ago. 2000-03-13 11:37:43 +00:00
Poul-Henning Kamp 4108e7b995 Remove #ifdef UVM stuff which will never be relevant. 2000-03-13 11:12:30 +00:00
Poul-Henning Kamp 7de472559c Remove unused 3rd argument from vsunlock() which abused B_WRITE. 2000-03-13 10:47:24 +00:00
Poul-Henning Kamp d8b47cbb70 Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.
Define ISADMA_{READ,WRITE,RAW} macros with the same numeric
values as the B_{READ,WRITE,RAW} and use them instead throughout.
2000-03-13 10:19:32 +00:00
Yoshinobu Inoue 3f30603cfb Backout the previous change to __KAME_VERSION (FreeBSD4.x addition),
because this is now 5.0-current.
2000-03-13 10:07:30 +00:00
Warner Losh 02c988c53e Add another Linksys OUI.
PR:		16922
Submitted by:	takawata@shidahara1.planet.sci.kobe-u.ac.jp
2000-03-13 09:42:09 +00:00
Poul-Henning Kamp 5111e26e96 Updates for new FALC chips and other nits.
(And try to make it first post-freeze commit :-)
2000-03-13 09:13:36 +00:00
Jordan K. Hubbard 420e39abee Welcome to 5.0-current!
"First commit" claimed by:	jkh :)
2000-03-13 09:13:01 +00:00
Søren Schmidt 8048917432 Backout the previous fix, it is _not_ that easy too fix.
Leave it as is for 4.0 the real solution comes later.
2000-03-13 09:10:25 +00:00
Duncan Barclay 4ba3ca53cb * add the start_join_net - done
*	i needed it anyway
 * remove startccs and startcmd - done
 *	as those were used for the NetBSD start timeout
 * multicast - done but UNTESTED
 *	I don't have the ability/facilty to test this
 * rxlevel - done
 *	stats reported via raycontrol
 * getparams ioctl - done
 *	reported via raycontrol
 * start_join_done needs a restart in download_done - done
 *	now use netbsd style start up

removed spare timerh

implemented start_assoc in ray_ccs_done

bit more knfing
2000-03-12 22:54:29 +00:00
Duncan Barclay 2143635f71 structure for error counters added 2000-03-12 22:52:00 +00:00
Duncan Barclay aadc434b25 Use ssid length from 80211.h
moved and extended ioctl's

added string and size definitions for raycontrol
2000-03-12 22:51:33 +00:00
Yoshinobu Inoue eb7006c008 Change __KAME_VERSION value. Added the word "FreeBSD4.x" to identify the
system with other platform and/or other version of FreeBSD, which is also
integrated KAME code based on another date.

Approved by: jkh
2000-03-12 20:27:26 +00:00
Bruce Evans 61214975da Try harder to make the lower 16 bits of fsids unique. The vfs type
number was packed very wastefully, giving perfect non-uniqeness in
the lower 16 bits of fsids for filesystems with the same vfs type.
This made linux_stat() return perfectly non-unique (broken) 16-bit
st_dev's for nfs mount points, and effectively reduced mntid_base to
8 bits so that the vfs_getnewfsid() looped endlessly when there are
already 256 mounted filesystems with the required vfs type.

Approved by:	jkh
2000-03-12 14:23:21 +00:00
Søren Schmidt 4c435787ab Dont call ad_start unless the controller is idle.
This effectively nullified the usefullness of disksort().
2000-03-12 13:56:05 +00:00
KATO Takenori 5a9a82e820 Merged from sys/isa/sio.c revision 1.291. 2000-03-12 13:14:51 +00:00
Greg Lehey b6c7afd32c sdio: If sd I/O fails because of an I/O error, set the sd state
correctly.

Reported-by:	phk
Approved-by:	jkh
2000-03-12 05:05:41 +00:00
Chris Piazza 4951dddb33 Recognize newer NVidia graphics cards. (GeForce and Quadro families)
Approved by:	jkh
2000-03-12 01:24:15 +00:00
Yoshinobu Inoue 820b57927e Disable IPv4 over IPv4 tunnel on the 6to4 interface for better security.
Approved by: jkh
2000-03-11 22:11:57 +00:00
Yoshinobu Inoue dd251c3820 Forbid include of netinet6/ip6.h from user-land, and if included,
print an error message which say, "include netinet/ip6.h".
This is postponed to apply to avoid tcpdump compile error.
Now apply this because tcpdump has been already fixed.

Approved by: jkh

Obtained from: KAME project
2000-03-11 20:44:53 +00:00
Warner Losh 633f93bee5 Fix crashes on card eject for pccard modems. We check for NULL when
we get the com address.  If so, we go ahead and return.  Bruce thinks
there's a bug in the pccard layer that it terminates devices with
extreme prejustice rather than letting them deside for themselves when
to terminate (and he's likely right).  This fix doesn't change that,
but instead works around it by checking for NULL pointers at more
places than before.

The detach routine still calls functions at interrupt level that
aren't reentrant.  In theory this could cause a problem, but none
showed up in practice.  Future versions should correct this problem,
likely by making the detach process a thread/process at the pccard
level.  NEWCARD will do this, and the current pccard layer should
likely be modified to that as well, should it live long enough.

A few style nits of the same form that were in my original patch sent
off to bde were also fixed as part of this process.  Mostly use of
!ptr and return ENOPARENS.

This should prevent a crash on suspend with an active ppp link as
well, but that wasn't tested.

Reviewed by:	bde
Approved by:	jkh
2000-03-11 20:22:09 +00:00
Yoshinobu Inoue 8fca8c97c6 Replace m_pkthdr.rcvif with oif when oif is not NULL, to count
icmp6 error statistics based on sending interface.
This also prevent kernel panic when rcvif is not initialized after M_PKTHDR().
(The initialization issue also need to be fixed in the future.)

Approved by: jkh

Submitted by: k-sugyou@kame.net
2000-03-11 20:03:22 +00:00
Yoshinobu Inoue 19a938aa3d Fix sockaddr_storage related macro definition, as ss_family member type change.
(Currently, no effect but for future portability)

Approved by: jkh

Reviewed by: bde
2000-03-11 19:51:04 +00:00
Duncan Barclay 0f5987ecaf Remove old hand crafted version of start_join_net for download. 2000-03-11 13:34:13 +00:00
Duncan Barclay ec1be5631b Start to use ray_start_join_net (my old code removed on next checkin)
requires current and desired network parameters, so I have created a network parameter structure and used two on them in the softc. This gives a bit of room of expansion. Re-wrote the update check in _net to work with this.

Tidyed up softc due to above.

Removed startccs and startcmd as they were only used by NetBSDs startup timeout.
2000-03-11 13:25:33 +00:00
Yoshinobu Inoue 4739b8076f IPv6 6to4 support.
Now most big problem of IPv6 is getting IPv6 address
   assignment.
   6to4 solve the problem. 6to4 addr is defined like below,

          2002: 4byte v4 addr : 2byte SLA ID : 8byte interface ID

   The most important point of the address format is that an IPv4 addr
   is embeded in it. So any user who has IPv4 addr can get IPv6 address
   block with 2byte subnet space. Also, the IPv4 addr is used for
   semi-automatic IPv6 over IPv4 tunneling.

   With 6to4, getting IPv6 addr become dramatically easy.
   The attached patch enable 6to4 extension, and confirmed to work,
   between "Richard Seaman, Jr." <dick@tar.com> and me.

Approved by: jkh

Reviewed by: itojun
2000-03-11 11:17:24 +00:00
Kazutaka YOKOTA a68d00e3fe One more patch for the atkbd driver. It will make sure that the
keyboard port and interrupt is enabled and the driver is attached even
when the keyboard itself is not present when the system is booting.
(This has been the behavior through out 2.X and 3.X, but is somehow
broken in 4.0.)

# I certainly don't recommend people to `hot-plug' the AT keyboard,
# because the interface isn't designed for hot-plugging and such act
# will often break the keyboard controller.  But, so many people want to
# do that anyway...

Approved by: jkh
2000-03-11 07:44:10 +00:00
Mike Smith 510a809e64 Teach the 'dc' driver how to pick up settings left over by the
SRM on alpha systems.  This is an expedient if not entirely
elegant solution to the problem.

Submitted by:	gallatin
Approved by:	jkh
2000-03-11 05:20:56 +00:00
Robert Watson 76ec7b2f60 The function arpintr() incorrectly checks m->m_len to detect incomplete
ARP packets. This can incorrectly reject complete frames since the frame
could be stored in more than one mbuf.

The following patches fix the length comparisson, and add several
diagnostic log messages to the interrupt handler for out-of-the-norm ARP
packets. This should make ARP problems easier to detect, diagnose and
fix.

Submitted by:	C. Stephen Gunn <csg@waterspout.com>
Approved by:	jkh
Reviewed by:	rwatson
2000-03-11 00:24:29 +00:00
Søren Schmidt 924f6734a5 Cosmetics.. 2000-03-10 22:10:34 +00:00
Archie Cobbs 8081ce2ea7 Correct man page title. 2000-03-10 20:38:24 +00:00
Martin Cracauer 0c14a6606b Change the default FPU control word so that exceptions for new
processes are now masked until set by fpsetmask(3).

Submitted by:	bde
Approved by:	jkh, bde
2000-03-10 17:56:33 +00:00
KATO Takenori e299a9db22 Merged from sys/isa/sio.c revisions 1.289 and 1.290. 2000-03-10 10:34:36 +00:00
Alan Cox af25d10c91 shmat: If VM_PROT_READ_IS_EXEC is defined and prot includes VM_PROT_READ,
VM_PROT_EXECUTE must be added to prot before calling vm_map_find.

Without this change, an mprotect on a shmat'ed region fails (when
it shouldn't).  This bug was reported Feb 28 by Brooks Davis
<brooks@one-eyed-alien.net> on -hackers.

Reviewed by:	bde
Approved by:	jkh
2000-03-10 09:11:24 +00:00
Søren Schmidt 643b70ec9d Dont call make_dev until we are sure the device is there, this prevents
panic'ing when the device is tried accessed later.
2000-03-10 08:09:53 +00:00
Warner Losh 595166f0f7 Add support for PnP ISA cards, and some laptop PnP support:
o break out some of the probe routine the allocation of resources
  into an attach routine
o Recognize PnP ids
o Allocate IRQ per card rather than per system
o Better polling reporting
o Remove unneeded include files in slot.h
o store a pseudo unit number on each device we find.
o Pass a unit number to interrupt/timeout routine and use it for polling
  the hardware.

Tested on: My VAIO and with the Linksys pccard reader.
Approved by: jkh
2000-03-10 05:43:29 +00:00
Warner Losh 8663154bbc Correct PnP ids for pcic-like cards.
Approved by: jkh
2000-03-10 05:26:32 +00:00
Duncan Barclay 5a5368a86c Use the ccs update command mechanism for dowloading parameters on startup 2000-03-09 21:34:47 +00:00
Hellmuth Michaelis 17df19190a Fix a problem which caused i/o resource allocation conflict of this
particular ISDN card with the 2nd IDE controller and/or other cards
depending on configuration.

The amount of i/o ports allocated are reduced from 0x40 per range to
0x20 per range.

Submitted by:	Andrew Gordon <arg@arg1.demon.co.uk>
Approved by:	jkh
2000-03-09 20:57:47 +00:00
Robert Watson c8cf61e182 Introduce ethernet bridge support for if_dc
Approved by:	jkh
2000-03-09 19:28:19 +00:00
Matthew Dillon b39d4d2060 In the 'found' case for ufs_lookup() the underlying bp's data was
being accessed after the bp had been releaed.  A simple move of the
    brelse() solves the problem.

Approved by: jkh
Submitted by:  Ian Dowse <iedowse@maths.tcd.ie>
2000-03-09 18:54:59 +00:00
Marcel Moolenaar 3c1124cfdf Fix bug in linux_wait4 and linux_waitpid where garbage in the status
argument could panic the kernel.

Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Prompted by: jkh, gallatin
Approved by: prompters
2000-03-09 17:52:01 +00:00
Masahide MAEKAWA c62c0f3f76 Add vendor/device ID for Corega FEther USB-TX.
Submitted by:	iwasaki
Approved by:	jkh
2000-03-09 16:35:21 +00:00
Jonathan Lemon 5e3488e373 Add Compaq `ida' driver to GENERIC, update it's LINT entry.
Approved by:	jordan
2000-03-09 16:32:56 +00:00
Masahide MAEKAWA 45c784a50b Regen. 2000-03-09 16:29:49 +00:00
Masahide MAEKAWA ceb48d11a3 Add Corega FEther USB-TX.
Submitted by:	iwasaki
Approved by:	jkh
2000-03-09 16:28:58 +00:00
Yoshinobu Inoue 8692c02553 Enable SCM_RIGHTS on alpha. Allocate necessary buffer as conversion between
int and struct file *.

Approved by: jkh

Submitted by: brian
Reviewed by: bde, brian, peter
2000-03-09 15:15:27 +00:00
Nick Sayer 9deb82d478 Implement Linux BLKGETSIZE ioctl, and open the door to implementing
other BLK.* ioctls should the desire arize.

Approved by:	jkh (via dufault)
2000-03-09 15:14:14 +00:00
Yoshinobu Inoue f63e7634ac Initialize mbuf pointer at getting ipsec policy.
Without this, kernel will panic at getsockopt() of IPSEC_POLICY.
Also make compilable libipsec/test-policy.c which tries getsockopt() of
IPSEC_POLICY.

Approved by: jkh

Submitted by: sakane@kame.net
2000-03-09 14:57:16 +00:00
Yoshinobu Inoue 690a43db7e Update icmp node info query message bit order of query types,
according to draft-ietf-ipngwg-icmp-name-lookups-04 to 05 change.
This is necessary before 4.0, because,
  -This change is non backword compatible
  -Other KAME derived platforms applied 05
  -Author of the draft said he never do backword imcompatible changes
   again.

Approved by: jkh

Obtained from: KAME project
2000-03-09 14:47:21 +00:00
Bruce Evans a4fcac54a1 Fixed a null pointer panic for dumpon(8) on a nonexistent device whose
driver uses the new disk layer.

Reviewed by:	phk
Approved by:	jkh
2000-03-09 12:40:41 +00:00
Bruce Evans d1a417f17e Don't forget to check for unsupported features when updating. It was
possible to defeat the check for rw incompatibilty by mounting ro and
updating to rw.

Approved by:	jkh
2000-03-09 05:21:10 +00:00
Seigo Tanimura ca6da1de5e Add the logical ID of Avance Logic ALS100. The vendor ID is also
checked, which was introduced in 1.18.

PR:		kern/16487
Submitted by:	Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
Approved by:	jkh
2000-03-09 02:13:21 +00:00
Mike Smith 99f0866f12 Remove the PCI device class and all the PCI-only devices. With the newbus
conversion this no longer works, and userconfig is not expected to ever
again be used for these devices.

Approved by:	jkh
2000-03-09 01:27:55 +00:00
Duncan Barclay d9c7d1a456 Mega additions of NetBSD code - most of the NetBSD code is now in here, if
not actually used yet. This created a lot of prototypes.

I moved code around so that the functions are in the same order as NetBSD - this helps diff a lot.

Things that are missing are the TX routine and ifmedia stuff and ioctls

Not all of the stuff is enabled - we are missing calls in ccs_done and ioctl.

Promiscious mode is working.

Am almost ready to use the NetBSD start up routine - essentially all I need
to do is not use a seperate timer to call download_timo.

Other misc. things:
	callout_stop is a newish feature for cancelling a timer without
	argument checking it.

	tried to add a sysctl knob but it doesn't work in the module

	enabled infrastructure code to call netbsd bits.
2000-03-08 23:28:06 +00:00
Jonathan Lemon e7e1e770ed Cosmetic fix: "id" -> "idad" for devstat.
Missed in prior (approved) commit by: jlemon
2000-03-08 21:10:15 +00:00
Jonathan Lemon a17e9eac9c Changes for IDA driver 2000-03-08 16:17:06 +00:00
Jonathan Lemon ee7eb00e05 Add support for older EISA compaq cards and newer Smart 4200 cards.
Change disk names to `idad' to avoid naming conflicts with the controller,
and enable the new disk code to pick up the drives.

Tested by:  	david.w.james@bt.com  (existing compaq support)
Reviewed by:	msmith
Approved by:	jordan
2000-03-08 16:16:31 +00:00
Duncan Barclay 6cc8b85b99 Fix cock up with test on start address.
This code sent out to alpha testers.
2000-03-08 08:53:36 +00:00
Nik Clayton 9e54a8cebb Document the discard device appearing as 'ds0', 'ds1', etc.
PR:             docs/16994
Submitted by:   Giorgos Keramidas <keramida@ceid.upatras.gr>
2000-03-07 13:56:37 +00:00
Duncan Barclay bd0f7bd72d Added reset code and converted many panics into call to reset.
Finished ray_stop and ray_unload.

A little more macro tidying.
2000-03-05 22:24:30 +00:00
Duncan Barclay 1942c15d8e Minor tidy up. 2000-03-05 22:04:09 +00:00
Søren Schmidt aaa29cf209 Fix the CD driver so that the last blocks can be read even if
a blocksize != 2k is used.
Update the timeout code to try fallback to PIO if problems
arise in DMA mode.
2000-03-05 16:52:26 +00:00
Cameron Grant 1a7d73a130 Partial fix: the following patch correctly configures the card for dual
channel DMA. The problem was that the SDC bit (0x04) can only be set in
the MCE state.

PR:		kern/16587
Submitted by:	Matthew Reimer <mreimer@vpop.net>
Approved by:	jkh (in person)
2000-03-05 15:51:09 +00:00
Peter Wemm d365f16644 Recognize another modem, "PMC2430 - Pace 56 Voice Internal Modem"
Submitted by:	Mark Ovens <mark@ukug.uk.freebsd.org>
2000-03-05 14:44:05 +00:00
Duncan Barclay ca0f567e91 Moved a lot of my inline comments to head of code and documented
card configuration hassles.

Added a TODO list so I don't forget to finish stuff.

Tidyed up a lot of XXX.

Tidy'd and documented debugging - all DPRINTF have a debug level associated.
RAY_DEBUG = 1, will log packet errors.

#if protect common memory hacking

Don't rely on pccardd for common memory settings.

Added a simple transmit mode - reasonable performance but not great. Will do a version of the NetBSD chained buffers soon. Yup we have two way transmisson!

Fix a stupid bug in the common memory code - the ioctl call was
hidden behind a debug test!
2000-03-05 14:39:23 +00:00
Duncan Barclay c74a1b1d16 Tidy up.
Add TX tib structure.
2000-03-05 14:29:29 +00:00
Duncan Barclay e6ae459351 Mostly notes and minor style changes whilst I was travelling. 2000-03-03 17:07:42 +00:00
Yoshinobu Inoue 7d0d8dc306 CMSG_XXX macros alignment fixes to follow RFC2292.
Approved by: jkh

Submitted by: Partly from tech@openbsd
Reviewed by: itojun
2000-03-03 11:13:12 +00:00
Bruce Evans fc47f29c64 MFS (ext2_lookup.c 1.17.2.2, ext2_vnops.c 1.42.2.2: fix "filetype" support).
Approved by:	jkh
2000-03-03 08:00:27 +00:00
Peter Dufault 6d9a8d3e8f I applied the wrong patch set. Back out anything associated
with the known bogus currtpriority.  This undoes the previous changes to
sys/i386/i386/trap.c, sys/alpha/alpha/trap.c, sys/sys/systm.h

Now we have the patch set approved by bde.

Approved by:	bde
2000-03-02 22:03:49 +00:00
Peter Dufault 383774c417 Patches that eliminate extra context switches in FIFO case.
Fixes p1003_1b regression test in the simple case of no RR and
FIFO processes competing.

Reviewed by:	jkh, bde
2000-03-02 16:20:07 +00:00
Nick Hibma 290c9a02c3 Fix flushing of the clists before deleting them. Stops the machine
from panicing when disconnecting a USB Wacom Graphire tablet.

jhk approved the fix some time ago, but I forgot to actually commit the
thing.

Reported by:	Dirk van Gulik <dirkx@webweaving.org>
Approved by:	jhk
2000-03-02 16:01:53 +00:00
Sheldon Hearn c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
Greg Lehey e7a1a7d809 Fix a problem with device number parsing, which caused da10 to map to
da1, and da11 to da2.

Reported by:  Dan Nelson <dnelson@emsphone.com>

Implicitly-approved-by:	 jkh
2000-03-02 07:46:10 +00:00
Peter Wemm fee576b2e5 Fix two more problems with freeing the softc data manually. subr_bus.c
is responsible for this and this will lead to malloc 'freeing already
free' type panics.  One was in the probe code, the other was in the
pccard eject? code.

Not explicitly approved by: jkh (but the first is fallout from subr_bus.c
rev 1.54 which was an approved commit, the second is the same problem)
2000-03-02 03:45:41 +00:00
Justin T. Gibbs 58d246367e adv_pci.c:
adw_pci.c:
	Update comments describing supported chips/cards.

adwcam.c:
adwlib.c:
adwlib.h:
	Handle more error return codes from the firmware.

	Break out the bus reset code into its own function.

	Usa a constant for the bus reset hold delay.

	Fix an interrupt race problem in adw_idle_cmd_send by
	incorporating the poll loop for command completion.

Approved by:	jkh@FreeBSDorg
2000-03-02 00:08:35 +00:00
Poul-Henning Kamp 1285d5557c Fix a initialization bug.
Report xmit queue length.
Remove old magic and clean up some printfs.
2000-03-01 21:04:54 +00:00
Peter Wemm a6b8513096 Don't free(sc) before returning an error from probe, it does not "belong"
to us, subr_bus.c will free it.  This bug (panic: freeing already free)
was exposed by kern/subr_bus.c rev 1.54

Not explicitly approved by: jkh (but this is a showstopper and fallout of
the above approved change)
2000-03-01 19:30:36 +00:00
Søren Schmidt b744c0fdc6 Spell construct right. 2000-03-01 14:39:51 +00:00
KATO Takenori f1b7989974 Merged from sys/i386/isa/isa_compat.h revision 1.27. 2000-03-01 08:56:47 +00:00
KATO Takenori bb8a9f4d25 Merged from sys/i386/i386/userconfig.c revision 1.174. 2000-03-01 08:55:23 +00:00
KATO Takenori ce4274863e Merged from sys/i386/i386/machdep.c revisions 1.384 and 1.385. 2000-03-01 08:53:59 +00:00
KATO Takenori 9c675e3c19 Merged from sys/i386/conf/GENERIC revisions 1.243, 1.244 and 1.245. 2000-03-01 08:52:28 +00:00
KATO Takenori 7fb0223fd0 Merged from files.i386 rev 1.307. 2000-03-01 08:50:05 +00:00
Sheldon Hearn 7a4cd69f7a Disconnect pcfclock from the build until it works on the Alpha. 2000-03-01 07:42:09 +00:00
Greg Lehey 2903a30d77 Set default revive block size to 64 kB.
Implicitly-sanctioned-by:	jkh
2000-03-01 07:25:46 +00:00
Greg Lehey c6dd6dd0d0 Tidy up splbio() protection.
Tidy up locking.  Previously we were taking two locks for a parity
block, and only releasing one of them.

Implicitly-sanctioned-by:	jkh
2000-03-01 07:25:07 +00:00
Greg Lehey bd685df802 vinumstrategy: Don't count the read and written bytes before they're
transferred, do it in complete_rqe instead.

launch_requests: Replace the inadvertently removed splbio() around the
                 main loop.  It may not be necessary, but the biggest
                 test of this stuff are IDE disks, which I'm not
                 using.

                 Remove throttling code, I'm pretty sure it's not
                 needed any more.

		 Don't set B_ORDERED, it's not necessary either.

Objected-to-by: alfred

build_rq_buffer: Don't lose the B_ORDERED bit, it still has some
		 residual meaning.  To do this right, Vinum needs to
		 look at the B_ORDERED bit and order the transfer
		 across all disks involved.  That's an exercise for
		 another day.

Objected-to-by: alfred

Implicitly-sanctioned-by:	jkh
2000-03-01 07:24:26 +00:00
Greg Lehey 38a54177c5 Add keywords raid4 and partition.
Implicitly-sanctioned-by:	jkh
2000-03-01 07:23:40 +00:00
Greg Lehey 7d6abd1af3 complete_rqe: Handle volume read stats here with other objects.
Previously vinumstrategy counted the bytes before they were hatched,
giving rise to strangenesses when a read failed.

Implicitly-sanctioned-by:	jkh
2000-03-01 07:23:13 +00:00
Archie Cobbs 33d0e2a76d The "sdl_family" field in a "struct sockaddr_dl" will be equal
to AF_LINK, not AF_DLI, as stated in the comment. Fix the comment.

Reviewed by:	wollman
2000-03-01 02:46:25 +00:00
Brian S. Dean e777d9c31a Fix a superuser credential check.
Reviewed by:	phk
Approved by:	jkh
2000-02-29 22:58:59 +00:00
Søren Schmidt 7caf73fb3c Add DVD-RAM support.
The driver constructs a fake disklabel that makes the 'a' partition
cover the entire DVD-RAM disk. This cannot be changed from the user
side. This solution was chosen because most DVD-RAM will have a
UDF (or until we have that CD9660) filesystem on it covering the
entire disk, its not really thought as a real random access device.

This might change over time, but for now this is what we have, and
it is compatible with CDROM's etc, that makes using the minidisk
subsystem less than ideal, because of !modulo BDEV_SIZE blocks.
2000-02-29 22:00:53 +00:00
Bill Fumerola 958b92d24d Add a little more history of when netgraph appeared in FreeBSD.
Reviewed by:	asmodai
2000-02-29 18:32:26 +00:00
Luigi Rizzo da3fc682a7 Fix panic when doing keep-state and "forward".
Removed a redundant check.
Also move check for expired rules before using them.
Sorry for the whitespace changes.

Approved-by: jordan
2000-02-29 17:51:25 +00:00
Søren Schmidt 41ef40c93d Only read user data when blocksize != 2048, this "read the works"
sneaked in sometime which is not what the average user wants.
2000-02-29 16:11:18 +00:00
Sheldon Hearn cb166ce422 Enable pcfclock as a kernel loadable module.
PR:		16804
Submitted by:	sascha@schumann.cx
Approved by:	jkh (release engineer)
2000-02-29 10:57:42 +00:00
Bill Fumerola 2394baefd8 'driver support' -> 'driver supports' 2000-02-29 10:02:29 +00:00
Doug Rabson 1d9a6ae08b If a driver probe fails, unset it from the device. This fixes a problem
with certain multiport cards.

Approved by: jkh
2000-02-29 09:36:25 +00:00
Doug Rabson db1d02f417 * Fix the memory probing code so that it sees all memory clusters, not
just the first one.
* Don't reserve extra memory for the prom console unless the platform
  actually uses it.
* Fix some historical confusion and a minor bug in the message buffer
  initialisation.

Submitted by: gallatin for the prom console part
Approved by: jkh
2000-02-29 08:48:10 +00:00
Greg Lehey 2cd253ad0f Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.

Set DRIVE_MAXACTIVE and VINUM_MAXACTIVE to 30000, effectively
disabling the request limitation code.  This code was added as an
attempt to escape from a bug which seems to have gone away, and it's
very likely I'll remove the code Real Soon Now, but I don't want to do
it just yet.

struct drive: Remove references to vnode pointers, including debug
output.  Vinum now talks directly to the device driver.  Instead, add
a dev_t.

enum plexorg: Add an instance for RAID-4.

Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.

Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.

Approved-by:  jkh
2000-02-29 06:17:26 +00:00
Greg Lehey 536aceefa2 plex_org: Add case for RAID-4.
Approved-by:  jkh
2000-02-29 06:16:44 +00:00
Greg Lehey 5823cef910 set_drive_state: update subdisk states more correctly.
set_sd_state: update the state of a subdisk in a multi-plex volume
more correctly.

update_plex_state: Bring the plex up correctly when the last subdisk
comes up.

checksdstate: Update comments.

vpstate: Don't return an "up" state on a degraded, unattached plex.

start_object: Return a sensible error message when trying to revive a
subdisk whose drive is down.  Previously it returned EBUSY.

Approved-by:  jkh
2000-02-29 06:16:06 +00:00
Greg Lehey ea77bd8579 Fix horrible, embarrassing breakage which caused occasional panics and
data corruption.  It's a wonder it worked at all.

Led-on-the-right-path-by:  dillon

revive_block: Add treatment for RAID-4.

Add function parityrebuild, called by revive_block and parityops.

Approved-by:  jkh
2000-02-29 06:15:26 +00:00
Greg Lehey 25ac879b0c launch_requests: If too many requests are active, include PCATCH in
the tsleep call flags.

Submitted-by:  Bernd Walter <ticso@cicely.de>

Remove references to vnode pointers, including debug output.  Vinum
now talks directly to the device driver.

bre: Add case for RAID-4.

sdio: Don't try to write to a down drive.  Set the sd state instead.

Approved-by:  jkh
2000-02-29 06:14:44 +00:00
Greg Lehey 857b0d4e21 Add support for RAID-4. This is the only change which is needed for
RAID-4 support: the rest is just configuration management.

Requested-by:	peter
Approved-by:	jkh
2000-02-29 06:14:06 +00:00
Greg Lehey e08bedf9bf Malloc: Save the caller's file name in the correct entry. 2000-02-29 06:13:24 +00:00
Greg Lehey 6992cfe973 Add keywords 'partition' and 'raid4'.
Approved-by:  jkh
2000-02-29 06:13:02 +00:00
Greg Lehey 74a2966a34 Modify comments to indicate that RAID-5 functions also apply to
RAID-4.

Approved-by:  jkh
2000-02-29 06:12:34 +00:00
Greg Lehey e862b9e36a open_drive: open drives directly rather than going via namei and
vn_open.  This is necessary in order to be able to open drives before
the root file system is mounted.  This also involves restructuring the
drive struct, which no longer contains a vnode pointer.  Instead,
open_drive sets an open flag.  It's a horrible kludge, and I'll gladly
borrow a Danish axe and hack it in little pieces when devfs comes.

read_drive, write_drive, drive_io_done: Replace with driveio.  The
function names are now macros.

driveio: Fix horrible, embarrassing breakage which was the reason why
read_drive and write_drive existed in the first place.

Code-torn-to-shreds-by:  dillon

format_config: Don't save config of objects in referenced state.  They
get rebuilt automatically.

Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.

Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.

Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.

vinum_scandisk: Don't free memory twice on error, once is enough.

Approved-by:  jkh
2000-02-29 06:11:13 +00:00
Greg Lehey 09ebc38020 Remove references to vnode pointers, including debug output. Vinum
now talks directly to the device driver.

Approved-by:  jkh
2000-02-29 06:10:21 +00:00
Greg Lehey 3e0311b705 Remove declarations of read_drive and write_drive and replace them
with macros.

Add declaration for parityrebuild, a new function.

Approved-by:  jkh
2000-02-29 06:09:41 +00:00
Greg Lehey e435b3206e Add support for RAID-4, even though it is inferior in almost every way
to RAID-5.  peter claims that it might be faster for sequential
reading, since the drive caches don't trip over the parity blocks.  I
have seen no evidence to support this, but it's a trivial change.

Requested-by:	peter

Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.

Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.

atoi(): Remove, nobody was talking to it.

give_sd_to_drive: If no space is available, make the subdisk down,
don't delete it.

Change the manner in which the subdisk count was maintained to avoid
cases where the count was not adjusted correctly.

config_drive: Check if we have subdisks referencing us, and add them
if so.  This fixes problems which arose when a drive is replaced in a
running system.

config_sd: Add support for a keyword 'partition', whose meaning will
	   be revealed in the fullness of time.

Cosmetic: Shorten some console messages.

Approved-by:  jkh
2000-02-29 06:08:33 +00:00
Greg Lehey 7a7d8290f0 Change the startup sequence of the vinum volume from SI_SUB_DRIVERS
to SI_SUB_VINUM, thus making it possible for Vinum to access I/O
devices and start.

Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.

Style fixes: replace NULL with 0 where appropriate.

Submitted-by: Charlie Root <root@sms-1.follo.net> (yup, that's all I
	      have to go on).

Approved-by:	jkh
2000-02-29 06:07:39 +00:00
Greg Lehey cb357bf915 Cosmetic changes.
Approved-by:	jkh
2000-02-29 06:07:01 +00:00
Matt Jacob eb76ec8076 Add in mailbox return codes for failed fabric logins (port_id_used,
loop_id_used, etc...)

Do a more precise structure for Get All Next name server responses.

Approved: jkh
2000-02-29 05:54:48 +00:00
Matt Jacob adde48b322 Minor non-FreeBSD changes (keeping source sync'd).
Approved: jkh
2000-02-29 05:53:41 +00:00
Matt Jacob 40cfc8fe8e Prettier print of fabric devices being attached- say what kind of
port they are (e.g., F_Port vs. N_Port).

Approved: jkh
2000-02-29 05:53:10 +00:00
Matt Jacob cf74f2682e Slightly cleaner fabric support (whiter whites! redder reds!).. No,
seriously- only attempt to logout a previously logged in fabric device.

Fix a longstanding bug for aborting overtime commands- handle halves
have always been reversed.

Clean up some error messages to indicate channel number.

Approved:jkh
2000-02-29 05:52:14 +00:00
Matt Jacob 2e56bc770d Clean up defines for correct 12160/1080 exclusion. Final 4.0.
approved: JKH
2000-02-29 05:48:46 +00:00
Matt Jacob 44b0af2592 Some minor fixing - final for 4.0. Debugging messages toned down a bit.
Approved: jkh
2000-02-29 05:45:50 +00:00
Greg Lehey 047e0b4e52 Add SI_SUB_VINUM startup sequence for Vinum. This is part of Vinum
root file system support.

Approved-by:	 jkh
2000-02-29 01:57:33 +00:00
Paul Saab f885f63606 Limit the maximum permissible TCP window size to 65535 octets if
window scaling is disabled.

PR:		kern/16914
Submitted by:	Jayanth Vijayaraghavan <jayanth@yahoo-inc.com>
Reviewed by:	wollman
Approved by:	jkh
2000-02-28 21:18:21 +00:00
Brian S. Dean 2265d5e30d Reset the hardware debug registers when exec'ing a new image.
Reviewed by:	bde,jlemon
Approved by:	jkh
2000-02-28 19:48:51 +00:00
Guido van Rooij b3f1e629e9 This fixes a problem where the SIOCGIFCONF ioctl goes wrong. This
is triggered when qmail is used with INET6 enabled.  The bug
manifests itself in that the space variable can become negative
and that in the comparison in the guards of the 2 loops, this was
not noticed because sizeof() returns an unsigned and thus the signed
variable gets promoted to unsigned. I decided not to make space
unsigned because I think we should guard against this from happening.
Thus panic() in case space becomes negative.

Approved by:	jkh
2000-02-28 19:30:25 +00:00
Marcel Moolenaar dba5ab6662 Fix accept(2) behavior in that accepted sockets don't inherit the
parents flags.

Note on the PR:
The PR contains another patch that's not being committed without
further background information. The PR stays open for now.

PR: 16946 (Victor A. Salaman <salaman@teknos.com>)
Prompted by: msmith
Indirect/implicit approval: jkh (shoot me if I'm wrong :-)
2000-02-28 18:58:59 +00:00
Bruce Evans 71c458de9d Fixed configuration of fast interrupts for the pci cy driver. They were
an early newbus casualty.  The fix in rev.1.28 didn't work because the
most important part of it used a wrong macro name.

Approved by:	jkh
2000-02-28 08:12:24 +00:00
Bruce Evans ce7a637f11 Fixed configuration of fast interrupts for the isa cy driver. They were
an early newbus casualty.  The isa compatibility cruft turned out to be
well suited for this fix.

Approved by:	jkh
2000-02-28 07:52:22 +00:00
Paul Saab 77ac690c97 Update a comment in elf_coredump to reflect that if you madvise
with MADV_NOCORE, its address space is also excluded from a core
file.

Pointed out by:	alc
2000-02-28 06:36:45 +00:00
Paul Saab 9730a5daab Add MAP_NOCORE to mmap(2), and MADV_NOCORE and MADV_CORE to madvise(2).
This
This feature allows you to specify if mmap'd data is included in
an application's corefile.

Change the type of eflags in struct vm_map_entry from u_char to
vm_eflags_t (an unsigned int).

Reviewed by:	dillon,jdp,alfred
Approved by:	jkh
2000-02-28 04:10:35 +00:00
Brian Feldman 76e964f1f5 Fix a repetition typo about the settings the settings.
Submitted by:	Kris Dow <kris@vilnya.demon.co.uk>
2000-02-28 03:02:17 +00:00
Alfred Perlstein 47a11f04b3 -it do, among other things, clear out any
+it does, amongst other things, clear out any

The old sentance didn't seem to make sense.
2000-02-28 00:31:18 +00:00
Duncan Barclay a7049e2bfd Completed start/join code (well only infrastructure mode)
Added receive code and support for Webgear encapsulation.

More debugging macros/functions.

conditionalised timeout for start/join network

conditonalised attribute/common memory hacks

identified tracking code with XXX_TRACK

sorted out initialistion of instance structure to some extent

finished docuementing the start/join sequence
2000-02-27 19:52:29 +00:00
Duncan Barclay 3a28c0ff4e Initial import 2000-02-27 19:47:06 +00:00
Yoshinobu Inoue 90da21c697 Wrap if_up() by splnet.
Approved by: jkh

Submitted by: peter
2000-02-27 18:36:30 +00:00
Yoshinobu Inoue e7e3ecb6c3 At detaching IPv6 raw socket, also finish IPv6 multicast router.
Approved by: jkh

Submitted by: fenner
2000-02-27 18:35:10 +00:00
Søren Schmidt cb66e8d4e3 Fix the problem that caused the boot to fail when modules were loaded.
Real braino, confuses two different softc types, I wonder how this
could ever work :(
2000-02-27 12:41:07 +00:00
Brian Feldman 60bfc3b09b Do some cleanups of the IPv6 stuff. This is a non-functional change.
Approved by:	jkh
2000-02-27 07:35:42 +00:00
Kris Kennaway 0990cf946f Crank __FreeBSD_version for OpenSSH
Approved by:	jkh
2000-02-27 06:42:14 +00:00
Jordan K. Hubbard 2217c725f9 Enable IPv6 options 2000-02-26 22:13:21 +00:00
Jordan K. Hubbard 0dab491675 Enable IPv6 support by default. 2000-02-26 22:09:31 +00:00
Poul-Henning Kamp 90a822243f Implement queue-limiting based on bandwidth.
Approved by:	jkh
2000-02-26 18:28:24 +00:00
Duncan Barclay 32c1df1038 Snap shot check in.
The code doesn't compile (I'll do that in a minute), but functionally
it gets to receveing the interrupt from the start or join net command.

There is a lot of code to deal with the limitations of the PCCard memory
mapping code - I'm changing some of it hence the check in to preserve something
that worked.
2000-02-26 14:49:24 +00:00
Matthew N. Dodd a535079a85 MCA is supported to some extent. Modify a comment that claims otherwise.
Approved by: 	jkh
2000-02-26 05:07:05 +00:00
Jordan K. Hubbard 8d0bf3d6f8 Add new oid, debug.boothowto. This allows userland apps to see
how the kernel was booted and perhaps do conditional things
based upon it (sysinstall, for example, will now turn Debug mode
on automatically if boot -v was done).

Submitted by:	msmith
Suggested by:	ulf
2000-02-25 11:43:08 +00:00
Kazutaka YOKOTA 9e6f8bee0e Do not add children (atkbd and psm) if they are disabled.
Approved by: jkh
2000-02-25 11:40:31 +00:00
Søren Schmidt 1a488af60f Add (partial) support for the Cypress ATA controller.
Call intr_teardown on detach.

Always add non masterdevice from unit 2 upwards.

Update to the pccard code, at least some cards are now working,
more testing to follow.
2000-02-25 09:48:23 +00:00
Boris Popov ce0d1c79c3 Fix the loader to handle module dependencies properly. More fixes
will be provided after modmetadata appears in the kernel.

Reviewed by:	msmith
Approved by:	jkh
2000-02-25 05:10:44 +00:00
John Polstra 7e4977c94e Fix two bugs in the fault handler for copy{in,out} and friends.
First, it was failing to reset the PCB's pcb_onfault member to NULL.
Under some really obscure circumstances this might cause a wild jump
within the kernel when a panic would otherwise occur.  Second, the
handler was loading the GP register needlessly and with an incorrect
value.

Reviewed by:	Doug Rabson <dfr>
Approved by:	Jordan Hubbard <jkh>
2000-02-25 03:26:10 +00:00
Matthew Dillon f8fa53397f Fix a 'freeing free block' panic in UFS. The problem occurs when the
filesystem fills up.  If the first indirect block exists and FFS is able
    to allocate deeper indirect blocks, but is not able to allocate the
    data block, FFS improperly unwinds the indirect blocks and leaves a
    block pointer hanging to a freed block.  This will cause a panic later
    when the file is removed.  The solution is to properly account for the
    first block-pointer-to-an-indirect-block we had to create in a balloc
    operation and then unwind it if a failure occurs.

Detective work by: Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by: mckusick, Ian Dowse <iedowse@maths.tcd.ie>
Approved by: jkh
2000-02-24 20:43:20 +00:00
Yoshinobu Inoue 0b97e97cd2 Add length check to sbcreatecontrol().
Now this check is necessary because IPv6 source routing might use
  control data bigger than MLEN. (e.g. 16bytes IPv6 addr x 23 hops)
  Actually mbuf cluster should be used in uipc_socket.c:sbcreatecontrol()
  and uipc_syscalls.c:sockargs() when data size is bigger then MLEN,
  and such patches were already in KAME environment and have been
  confirmed to work well. I just forgot to merge them into 4.0, sorry.

  For safety, I'll postpone such patches until after 4.0 release.
  The effect of postponement is followings.
    -Ping6 source routing hops are limitted to around 6 or so.
    -If some apps do setsockopt IPV6_RTHDR and try to receive
     incoming IPv6 source routing info, it can't receive more
     than 6 hops source routing info.
     (But currently, no apps seems to be doing it.)

Approved by: jkh
2000-02-24 19:21:26 +00:00
Doug Rabson ac19291f35 Add a workaround to allow us to detect the second pci bus on an HP
Netserver LS/2.

Approved by: jkh
2000-02-23 20:25:06 +00:00
Guido van Rooij 6d37c73e26 Remove option IPFILTER_KLD. In case you wanted to kldload ipfilter,
the module would only work in kernels built with this option.

Approved by:	jkh
2000-02-23 20:11:57 +00:00
Guido van Rooij 7830d3c3a1 Remove option IPFILTER_KLD. In case you wanted to kldload ipfilter,
the module would only work in kernels built with this option.
2000-02-23 20:10:53 +00:00
Jason Evans dd85920a4f Add the VFS_AIO config option and leave it off by default. Unless the
VFS_AIO option is specified, all aio-related syscalls return ENOSYS.

The aio code is very fragile right now, and is unsuitable for default
inclusion in a production shell box.

Approved by:	jkh
2000-02-23 07:44:25 +00:00
Bill Fumerola bebfe1cadb o No need to print the vendor/device ID for things that matched succesfully.
o ``<device name>'' versus ``device name'' for things that fall under nomatch.

Reviewed by:	dfr (in principle)
Approved by:	Baron von Hubbard
2000-02-22 21:44:39 +00:00
Søren Schmidt 9bd1c89ad3 Add UDMA66 support to the Intel ICH chip.
Submitted by: sakichan@lares.dti.ne.jp
2000-02-22 20:37:01 +00:00
Robert Watson 0f71afb31e After much consulting with bde, concluded that this fix was the best fix
to the current jail/chflags interactions.  This fix conditionalizes ``root
behavior'' in the chflags() case on not being in jail, so attempts to
perform a chflags in a jail are limited to what a normal user could do.
For example, this does allow setting of user flags as appropriate, but
prohibits changing of system flags.

Reviewed by:	bde
2000-02-22 03:56:58 +00:00
Bill Fumerola a91df2ff09 Add the ESS Maestro and the ATI Mobility-1 to the generic chip match and
the vga match (respectivly, though they aren't much different anymore..)

These can be found on newer Dell laptops.

Approved by: Sir Hubbard
2000-02-21 21:46:19 +00:00
Søren Schmidt 456b5ad253 Fix the changer code, dont wait for device ready on unload, it
wont become ready as there is no media - doh.

Update the command name reporting.
2000-02-21 18:41:05 +00:00
Brian S. Dean 80275388cb Fix an __asm operand constraint which broke the -O3 and -O0 builds.
Submitted by:	Seigo Tanimura <tanimura@freebsd.org>
Approved by:	jkh
2000-02-21 13:06:50 +00:00
Warner Losh da144b9373 /tmp/msg 2000-02-21 06:52:20 +00:00
Gary Jennejohn 4f9d49f140 Newbus-ify the USR Sportster TA Intern driver.
Enable the driver in sys/conf/files.i386.

In isa/isavar.h increase ISA_NPORT from 32 to 50. This is required
because this brain-damaged card maps 49 (!) port ranges. This does
not have a negative impact because this value only specifies the maximum
number of entries in a linked list and not the size of an array which
is allocated in all drivers.

The register/fifo access routines were not newbus-ified because
1) I knew that the old code worked and is simpler and more efficient
2) the if_ed driver does something similar and
3) the newbus macros collapse to inb/outb anyway.

Reviewed and tested by:	hm
Approved by:	jkh
2000-02-21 02:10:10 +00:00
Andrey A. Chernov df2ef4c180 Fix possible SLIOCSUNIT panic
PR:		16564
Submitted by:	ru
Approved by:	jkh
2000-02-20 21:03:53 +00:00
Brian S. Dean de8050f9b8 Don't forget to reset the hardware debug registers when a process that
was using them exits.

Don't allow a user process to cause the kernel to take a TRCTRAP on a
user space address.

Reviewed by:	jlemon, sef
Approved by:	jkh
2000-02-20 20:51:23 +00:00
Peter Wemm 6ecfb1da44 Followup to previous commit; change fd_mask from signed to unsigned as
it should have been to start with.  The implications of that are not
pleasant when combined with >> as it breaks on multiples of NFDBITS.
Right shifting of a signed value fills with a copy of the sign bit,
not a zero.

Reported by:	bde
2000-02-20 15:01:37 +00:00
Duncan Barclay 83463004f1 Skeleton framework for network driver and initial probing of device. 2000-02-20 14:56:17 +00:00
Nick Hibma 418a4537cf Update the documentation to reflect Bill Paul's latest changes. 2000-02-20 14:41:54 +00:00
Nick Hibma 5e78bf3190 Move the warning on wrong IRQ values to the right place, before any
resource allocation is attempted.

It will present the user with a message that he has to switch on USB
support in his BIOS.
2000-02-20 14:22:44 +00:00
Peter Wemm f082218c18 Fix select(2) for the Alpha. (!!) It was never returning true for
fd's in the range of 32-63, 96-127 etc.  The first problem was the
FD_*() macros were shifting a 32 bit integer "1" left by more than
32 bits.  The same problem happened in selscan().  ffs() also takes
an int argument and causes failure.  For cases where int == long
(ie: the usual case for x86, but not always as gcc can have long
being a 64 bit quantity) ffs() could be used.

Reported by:	Marian Stagarescu <marian@bile.skycache.com>
Reviewed by:	dfr, gallatin (sys/types.h only)
Approved by:	jkh
2000-02-20 13:36:26 +00:00
Søren Schmidt a6e23e28c1 Hide the "devclass_alloc_unit: %s%d already exists, using next available..."
behind bootverbose

Approved by: jkh
2000-02-20 10:07:28 +00:00
Sheldon Hearn 4ca7c740a6 Fix buffer overrun in pcfclock_read(). The submitter is the original
author of the affected code.

PR:		16552
Submitted by:	Sascha Schumann <sascha@schumann.cx>
Approved by:	jkh
2000-02-20 09:08:33 +00:00
Kenneth D. Merry 955f7e7474 Fix 'camcontrol inquiry'. The inquiry data structure changes (increased to
256 bytes) caused it to break on many devices.

The SCSI spec says that for commands with 8-bit length fields, a value of 0
means 256 bytes.  As it turns out, many devices don't deal with that
properly.  Some interpret the 0 as 0, and return no data.  Others return
more than 256 bytes of data, and cause an overrun.

The fix is to tell the device we've only allocated SHORT_INQUIRY_LENGTH (36
bytes) of inquiry data, instead of sizeof(struct scsi_inquiry_data).

camcontrol.c:		Change inq_len in the call to scsi_inquiry() to
			SHORT_INQUIRY_LENGTH, and add a long comment
			explaining the reason for the change.

scsi_all.h:		Add a comment above the definitinon of
			SHORT_INQUIRY_LENGTH alerting people that it is
			both the initial probe inquiry length, and the
			minimum amount of data needed for scsi_print_inquiry()
			to function.

scsi_all.c:		Add a comment about SHORT_INQUIRY_LENGTH being the
			minimum amount of data needed for
			scsi_print_inquiry() to function.

Reviewed by:	gibbs
Approved by:	jkh
Reported by:	"John W. DeBoskey" <jwd@unx.sas.com>
2000-02-20 04:42:44 +00:00
Robert Watson 41ecf3565f Disable chflags() from within jail() so that root within jail can't make
a mess in securelevel environments.  Results in one warning during
/etc/rc as it attempts to remove file flags, but this is harmless.

Approved by:	High Lord Hubbard
2000-02-20 01:10:36 +00:00
Doug Rabson 6874d62958 Remove the vga-pci driver. It serves no purpose and it hides the hardware
from useful drivers such as the 3D DRI drivers I will be porting for
hardware accelerated OpenGL. The hardware will still be reported during
boot using the nomatch system.

Approved by: jkh
2000-02-19 09:44:06 +00:00
Søren Schmidt 47351d2774 Update the ata driver to take more advantage of newbus, this
was needed to make attach/detach of devices work, which is
needed for the PCCARD support.
(PCCARD support is still not working though, more to come on that)

Support the CMD646 chip which is used on many alphas, sadly only
in WDMA2 mode, as the silicon is broken beyond belief for UDMA modes.

Lots of cosmetic fixes here and there.

Sorry for the size of this megapatchfromhell but it was not
possible otherwise...

newbus patches based on work from: dfr (Doug Rabson)
2000-02-18 20:57:33 +00:00
Mike Smith a3c8168096 Increase the time we spend waiting for the controller to become ready to
accept a new command; in high load cases it may be too busy for the old
value.

This loop needs something to tie it to real time, rather than just the CPU's
ability to fetch from the L1 data cache, but this hack works for now.

Approved by:	jkh
2000-02-17 23:33:57 +00:00
Mike Smith bb328b87c1 Change the mountroot prompt to something that doesn't look at all like a
firmware prompt.  Several sleepy folk mistook the '>>>' for the SRM
prompt, which was never the desired idea.

Submitted by:	Andrew Gallatin <gallatin@cs.duke.edu>
Approved by:	jkh
2000-02-17 23:32:08 +00:00
Bruce Evans 90bb57afd9 Don't include <machine/ipl.h> in <sys/systm.h> in the i386 case. This
fixes some namespace pollution in general and breakage of modules that
aren't in the sys tree in particular (<machine/ipl.h> includes further
headers that aren't installed under /usr/include).

Reimplemented SPLASSERT() so that it is more machine independent and
less bloated and doesn't require the <machine/ipl.h> include spam.
In particular, don't assume that `cpl' can be printed using %08x
format.  The alpha arch doesn't even have `cpl'.  SPLASSERT() was
harmless on alphas because it isn't actually used.
2000-02-17 18:37:45 +00:00
KATO Takenori df16ced79a Merged from sys/isa/sio.c rev 1.288. 2000-02-17 15:09:12 +00:00
KATO Takenori baf67f3c77 Synced with sys/i386/i386/userconfig.c rev 1.173. 2000-02-17 14:45:05 +00:00
Warner Losh e6157956d2 Add the VIA 82C596B PCI ISA south bridge on my ASUS P3V133.
Approved by: jkh
2000-02-17 06:12:16 +00:00
Mike Smith 51b5739aaf Close a file descriptor leak in the code which loads file objects.
Submitted by:	Paul Saab <paul@mu.org>
Approved by:	jkh
2000-02-17 02:19:19 +00:00
Matthew Dillon 1f6889a1eb Fix null-pointer dereference crash when the system is intentionally
run out of KVM through a mmap()/fork() bomb that allocates hundreds
    of thousands of vm_map_entry structures.

    Add panic to make null-pointer dereference crash a little more verbose.

    Add a new sysctl, vm.max_proc_mmap, which specifies the maximum number
    of mmap()'d spaces (discrete vm_map_entry's in the process).  The value
    defaults to around 9000 for a 128MB machine.  The test is scaled for the
    number of processes sharing a vmspace (aka linux threads).  Setting
    the value to 0 disables the feature.

PR: kern/16573
Approved by: jkh
2000-02-16 21:11:33 +00:00
Justin T. Gibbs 945111e5a7 Remove a diagnostic printf.
Noticed by:	 imp@FreeBSD.org
2000-02-16 18:41:00 +00:00
John Baldwin 536fcb08bf This patch to BTX fixes several small things:
1) Fix a bug in the int15 function 87 emulation where we only copied half
   of what the BIOS asked for.  This caused the Mylex RAID adapter to go
   haywire and start trashing memory when you tried to boot from it.
2) Don't use interrupt 19 to reboot.  Instead, set the reboot flag to a warm
   boot and jump to the BIOS's reboot handler.  int 19 doesn't clear memory
   or restore the interrupt vector table, and thus really isn't safe.  For
   example, when booting off of PXE, the PXE BIOS eats up a chunk of memory
   for its internal data and structures.  Since we rebooted via int 19,
   using the 'reboot' command in the loader resulted in that memory not
   being reclaimed by the BIOS.  Thus, after a few PXE boots, the system
   was out of lower memory.
3) Catch any int 19 calls made by a BTX client or a user pressing
   Ctrl-Alt-Delete and shutdown BTX and reboot the machine cleanly.  This
   fixes Ctrl-Alt-Delete in the loader and in boot2 instead of presenting
   the user with a BTX fault.

Approved by:	jkh
Found by:	1) by msmith
2000-02-16 07:00:16 +00:00
Kazutaka YOKOTA 528b8853bb Make it clear that 'options XSERVER' is for pcvt and not for syscons.
Submitted by: Doug Barton <Doug@gorean.org>
Approved by: jkh
2000-02-16 04:27:04 +00:00
Matthew N. Dodd 8d5d0412c0 Track if_i{bytes,packets,errors}.
Approved by: 	jkh
2000-02-16 04:04:36 +00:00
Matt Jacob af077239b6 Include the file that defines PCIM_CMD_BUSMASTEREN. 2000-02-16 02:22:37 +00:00
Mike Smith 7af42aebc4 Ensure that the busmaster enable bit is set; we can't assume that all
BIOS code will get this right (and some certainly doesn't).

Submitted by:	W. Gerald Hicks <jhix@mindspring.com>
Approved by:	jkh
2000-02-16 01:12:09 +00:00
Joerg Wunsch 2c6610f343 Hide the boring `not probed (disabled)'' messages behind bootverbose'.
This unspams the boot messages, concentrating on the drivers that have
actually been probed.

This basically resurrects revision 1.106 from old /sys/i386/isa/isa.c.

Reviewed by:	jkh, dfr
2000-02-15 19:23:34 +00:00
Andrew Gallatin 128f43c891 o Wilko Bulte has tested our AlphaServer 1000A ("Noritake") support
code & it survives a buildworld.  So remove the dire warnings about
  Noritake support being untested.

o Remove a disconserting printf() left over from NetBSD

Approved by: 	jkh
2000-02-15 18:47:51 +00:00
Jordan K. Hubbard 7db56b4c3e Add userconfig entries for the new atapi devices.
Submitted by:	Dan Papasian <bugg@bugg.strangled.net>
2000-02-15 18:33:25 +00:00
Bruce Evans 34ae9210dd Fixed regressions in rev.1.274:
1) Non-AST4 multiport cards were broken by bypassing the code that changes
   `idev' to the multiport master device.
2) AST4 multiport cards apparently were broken by inverting the test for
   the master device having an irq.
3) Error handling for nonexistent master devices was broken by removing a
   check for a null pointer.
4) `int' error codes returned by bus_get_resource() were assigned directly
   to the boolean variable com->no_irq.  Probably harmless, since the
   boolean is implemented as a u_char.

Submitted by:	part 1) by Chris Radek <cradek@in221.inetnebr.com>
		part 2) by yokota
Approved by:	jkh
2000-02-15 17:29:09 +00:00
Poul-Henning Kamp 693e27d473 Don't try to account for the partial quantum unless the process is
curproc.  This only makes any difference on SMP, where we used a
(potentially very bogus) switchtime from our own CPU to calculate
resource usage on another CPU.

This should remove some if not all calcru() related warnings on SMP.

Approved by:		jkh
2000-02-15 09:02:07 +00:00
Martin Cracauer 30de91e8b8 Allow comments in interpreter specification lines as in
#! /bin/sh # -*- perl -*-

This is simply "delete everything after the next '#', not counting the
first char in the line". No effort has been made to allow quoting,
backslash escaping or '#' in interpreter names.

The complies to POSIX 1003.2 in that Posix says the implementation is
free to choose whatever it likes.

PR:		bin/16393
2000-02-15 08:49:57 +00:00
Matt Jacob a6dd44dea5 Add comments about 12160 options.
Approved: jkh
2000-02-15 01:08:27 +00:00
Matt Jacob b6f774e39b Fix ITDEBUG macro.
Approved: jkh
2000-02-15 00:54:26 +00:00
Matt Jacob 14a3729325 Correctly identify which bus of dual bus SCSI adapters some target mode
commands (enable/disable/modify lun && immediate notify) we're talking about.

Approved: jkh
2000-02-15 00:53:49 +00:00
Matt Jacob d667c06c77 Clean up some target mode debug messages. Fix (finally, I believe)
Andrew's problems with SCSI on some alphas- do not call isp_update
directly to update parameters- just mark them as being ready to
update for the next command- the system would just hang on a READ
CAPACITY for a drive. Really annoying because it wouldn't even timeout
(and it has a timeout) so either the SET PARAMETERS call was nuking
things or the f/w was really dropping the ball.

approved: jkh

Reviewed by:	gallatin@freebsd.org
2000-02-15 00:52:52 +00:00
Matt Jacob e142669a43 If the CDB length is greater than 12 for parallel SCSI, ispscsicmd has
made the initial queue entry a EXTENDED CMD queue entry, so we have to
go straight to continuation segments for any data segments.

approved: jkh
2000-02-15 00:50:01 +00:00
Matt Jacob fe4d046167 Clean out residual bogosity for fast posting stuff- ISP_NO_FASTPOST_SCSI
is gone as a define. We just don't support fast posting for anything less
than the 1240/1080/1280/12160 or Fibre Channel cards.

Put in support for CDB's larger than 12 bytes for parallel SCSI (up to 44
bytes are allowed).

Approved: jkh
2000-02-15 00:35:00 +00:00
Cameron Grant 73bd6f4aab fix ess end-of-buffer repeating
Submitted by:	nhibma
Approved by:	jkh
2000-02-14 23:37:02 +00:00
Peter Wemm e463cfe7b6 Fix is_splxxx() warnings when not compiled with INVARIANT_SUPPORT.
Approved by:	jkh
2000-02-14 06:11:53 +00:00
Peter Wemm 194a0b6c97 Avoid a panic in __getcwd(2) when combined with umount -f. 2000-02-14 06:09:01 +00:00
Duncan Barclay 91a2dd11db Initial import 2000-02-13 21:07:25 +00:00
Gerard Roudier 7a35ada03e Simplifications:
- Remove all the code intended to deal with experimental
  C1010 revisions. This code got useless due to commercial
  chip revisions having been fixed.
Fixes:
- Rewrite/rework the WSR condition handling.
  Previous drivers snooped on the BUS through the SBDL IO
  register and this has been discovered to trigger a spurious
  SCSI parity error when WSR had been set by chip and cleared
  by SCRIPTS prior to reading SBDL bit [0...7].
  On the other hand, the C1010 does not use the SWIDE register
  when synchronous data transfers are taking place and
  requires a CHMOV (1) WHEN DATA_IN to be performed in order
  to move to memory the residual byte when WSR is set and
  the residual byte is useful data.
  BTW, the new WSR handling by the driver is simpler.
- No longer attempt to read from SCRIPTS the SBDL register.
  This is intended to avoid to be victimized again by any other
  issue regarding the handling of this register by 8xx chips.
Miscellaneous:
- The driver is now able to handle the WSR + IGN RESIDUE
  condition at the end of a DATA IN I/O without need of a
  programmed interrupt. It is a minor? optimization.
- A few other minor cosmetic changes.

This driver version fixes notably a permanent SCSI parity
error condition at boot that can be triggerred due to recent
changes in cam_xpt.c between 1.79 and 1.80.
Changes in CAM/XPT are fine, but the new handling of the full
INQUIRY may trigger the driver problem when a target returned
an odd value in the `additionnal length' field of the INQUIRY
response.

The diff against previous driver version is large, but it
consists approximatively in:
- 350 lignes removed and not compiled in previous drivers
  (They addressed experimental C1010 revisions)
- 250 lignes added or changed, half being comments or empty
  lines.
So, in fact, the real changes are about 120 lines of source.
About 80 lines address SCRIPTS changes and about 40 lines
address C code changes.

Approved by: jkh

New WSR handling reviewed by Pamela Delaney <pam.delaney@lsil.com>
(For back-porting to Linux sym53c8xx driver 1.6x series)
2000-02-13 12:14:07 +00:00
Poul-Henning Kamp f1220da49c Fix sign reversal in adjtime(2).
Approved by:	jkh
2000-02-13 10:56:32 +00:00
Doug Rabson 9a1498a435 Fix an uninitialised variable which affected probing on some machines.
Approved by: jkh
Reviewed by: gallatin
2000-02-13 09:49:05 +00:00
Peter Wemm 56d8a1e30d Oops, forgot this from the previous commit. Remove obsolete #ifdef ISO.
Approved by:	jkh
2000-02-13 03:55:16 +00:00
Peter Wemm 242c5536ea Clean up some loose ends in the network code, including the X.25 and ISO
#ifdefs.  Clean out unused netisr's and leftover netisr linker set gunk.
Tested on x86 and alpha, including world.

Approved by:	jkh
2000-02-13 03:32:07 +00:00
Peter Wemm 84a5b01504 Fix two warnings. 2000-02-13 03:03:31 +00:00
David E. O'Brien ed0010ed09 Document the support in the kernel for hardware debug registers on the
ix86 platform which allows for hardware watchpoints, etc...

Submitted by:	Brian Dean <brdean@unx.sas.com>
2000-02-12 18:33:54 +00:00
Doug Rabson eb06360f04 Add functions which allow i/o memory to be accessed without forcing a
memory barrier (needed for XFree86 4.0).

Approved by: jkh
2000-02-12 14:57:01 +00:00
Robert Watson 83f1e257e0 Yet-another-update: rename ``kern.prison'' to a new sysctl root entry,
``jail'', and move the set_hostname_allowed sysctl there, as well as
fixing a bug in the sysctl that resulted in jails being over-limited
(preventing them from reading as well as writing the hostname).  Also,
correct some formatting issues, courtesy bde :-).

Reviewed by:	phk
Approved by:	jkh
2000-02-12 13:41:56 +00:00
Peter Wemm be3448f6ad The Leadtek Winfast TV2000 has one of the FM capable Tuners. Don't
default to a non-FM tuner or FM radio is non-functional.

Approved by:	jkh
2000-02-12 08:49:21 +00:00
Peter Wemm be6ccf3f6c Do a trivial conversion of xrpu to newbus.
Reviewed by:	phk  ("commit it!" :-)
Pre-Approved by: jkh
2000-02-12 07:56:44 +00:00
Matt Jacob 960f6939af Add in 12160 (Ultra3) support. Redo things to use the newbus code.
Approved: jkh@freebsd.org

PR:		16141
2000-02-11 19:45:17 +00:00
Matt Jacob 66dcc0e99f Turn back on fast posting- the code that turns it off (for 1020/1040) is
now in isp.c

Approved: jkh@freebsd.org
2000-02-11 19:37:56 +00:00
Matt Jacob af4d01494d Correct a minor typo in error message.
Approved: jkh@freebsd.org
2000-02-11 19:36:30 +00:00
Matt Jacob c2e7467339 Add in new async mbox defines for 2200- point to point stuff.
Add in definitions for the extended initialization control block
(2200 only again).

Approved: jkh@freebsd.org
2000-02-11 19:35:42 +00:00
Matt Jacob c211f23b90 Add in 12160 (Ultra3) NVRAM definitions.
Approved: jkh@freebsd.org
2000-02-11 19:34:33 +00:00
Matt Jacob fd589c2e36 Add in 12160 (Ultra3) firmware. Gawd, this file is bulky.
Approved: jkh@freebsd.org
2000-02-11 19:32:51 +00:00
Matt Jacob 0f38a25b52 Restructure nvram reading routine to split out to separate functions
for 1020/1X80/12160/2X00- for readability. Add in 12160 (Ultra3)
support- but not with PPR just yet.  Fix and clarify fetching of
return parameter for getting firmware rev which for the 2200 contains
the connection topology (Private Loop (NL-port), N-port, FL-port,
F-port). Synthesize the connection topology for the 2100 which can
only be Private Loop or FL-port. Handle a couple of new async
mailbox commands which signify connection in Point-to-Point mode
(N-port or F-port) or indicate various toe stubbing getting to same.

Approved: jkh@freebsd.org
2000-02-11 19:31:32 +00:00