Commit Graph

26811 Commits

Author SHA1 Message Date
Peter Wemm
016517247f Patch up some style(9) stuff in tcp_new_isn() 2001-07-27 00:03:49 +00:00
Peter Wemm
92971bd3f1 s/OpemBSD/OpenBSD/ 2001-07-27 00:01:48 +00:00
Peter Wemm
3e02a8711a MASK_FPU_SW didn't do what it was expected to do. 2001-07-26 23:47:04 +00:00
Warner Losh
e598f66151 Check the state of the slot when we resume. Set it to empty if we no
longer have a pccard in the slot.  This fixes the problem where pccard
would say that a card had been inserted on resume.  This also appears
to make the insert/remove events more reliable after a resume as well,
but that may be a different bug I need to hunt down.
2001-07-26 23:23:36 +00:00
Peter Wemm
a03bd29498 Use the tunable maxusers rather than the compile-time one. Evaluate and
initialize in the right order to make derivative settings work right.
eg: at compile time, nmbufs was double nmbclusters.  For POLA this should
work the same at runtime.
2001-07-26 23:08:31 +00:00
Peter Wemm
bd40659f85 Call the early tunable setup functions as soon as kern_envp is available.
Some things depend on hz being set not long after this.
2001-07-26 23:06:44 +00:00
Peter Wemm
f74654de47 Move MAXUSERS out of opt_param.h to make sure that other code doesn't
use it rather than the tunable version.
2001-07-26 23:05:35 +00:00
Peter Wemm
18ec8d761c param.c no longer gets special treatment. Use the source tree version. 2001-07-26 23:04:46 +00:00
Peter Wemm
ee342e1bf1 Move param.c out of the conf directory and make it fully dynamic.
Tunables are now derived at boot time from maxusers.  ie: change maxusers
via a tunable and all the derivative settings change.  You can change
the other tunables individually as well.  Even hz etc is tunable.
2001-07-26 23:04:03 +00:00
Thomas Moestl
3d3c27fedf Make sure the total number of sectors is not 0 for a vnode-type md to
avoid a division by zero which would occur on open() in this case.

Reviewed by:	phk
2001-07-26 20:05:20 +00:00
Hajimu UMEMOTO
13cf67f317 move ipsec security policy allocation into in_pcballoc, before
making pcbs available to the outside world.  otherwise, we will see
inpcb without ipsec security policy attached (-> panic() in ipsec.c).

Obtained from:	KAME
MFC after:	3 days
2001-07-26 19:19:49 +00:00
Jun-ichiro itojun Hagino
b954a75e3c incorrect bounds-check on snprintf.
Submitted by:	fenner
2001-07-26 19:14:52 +00:00
Bosko Milekic
49f854f926 - Do not handle the per-CPU containers in mbuf code as though the cpuids
were indices in a dense array. The cpuids are a sparse set and treat
  them as such, setting up containers only for CPUs activated during
  mb_init().

- Fix netstat(1) and systat(1) to treat the per-CPU stats area as a sparse
  map, in accordance with the above.

This allows us to properly boot with certain CPUs disactivated. However, if
we later decide to re-activate said CPUs, we will barf until we decide to
implement CPU spinon/spinoff callback hooks to allow for said CPUs' per-CPU
containers to get configured on their activation.

Reported by: mjacob
Partially (sys/ diffs) Submitted by: mjacob
2001-07-26 18:47:46 +00:00
Maxim Sobolev
aa7cc2322b Move definition of structure used in CONS_SCRSHOT ioctl in front of definition
of ioctl itself, like we have for all other ioctl's in this file.

MFC after:	2 weeks
2001-07-26 14:24:53 +00:00
Yoshihiro Takahashi
28b975bf3d Speed up console driver.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-07-26 03:07:07 +00:00
Mike Smith
b964f385bb Fix typo (* -> &)
Submitted by:	Andrew Doran <ad@netbsd.org>
2001-07-26 02:20:47 +00:00
Scott Long
4aa620cdc6 Add /dev/hpn? as an alias to /dev/aac? so that the HP version of the CLI
utility will work, and document it in the manpage.

MFC after:	3 days
2001-07-25 22:36:17 +00:00
Peter Wemm
e3d1d61f10 This commit was generated by cvs2svn to compensate for changes in r80357,
which included commits to RCS files with non-trunk default branches.
2001-07-25 22:10:56 +00:00
Peter Wemm
4f12dbc3f6 Commit the hwsleep.c patch for suspend/resume onto the vendor branch.
This has supposedly been incorporated into the Intel code already, so this
will get cleanly replaced with the "official" version when it is next
imported and will not cause any conflicts or hiccups.
2001-07-25 22:10:56 +00:00
Bill Fenner
3f2e902a15 Somewhat modernize ip_mroute.c:
- Use sysctl to export stats
- Use ip_encap.c's encapsulation support
- Update lkm to kld (is 6 years a record for a broken module?)
- Remove some unused cruft
2001-07-25 20:15:49 +00:00
Bill Fenner
c3cb7e5d7a Don't bother passing p to rtioctl just so it can fail to pass it to mrt_ioctl 2001-07-25 20:15:28 +00:00
Bill Fenner
fffcbbcd94 Unbreak ip_mroute_mod 2001-07-25 20:15:17 +00:00
Hajimu UMEMOTO
9a70151652 As commented in defined in sys/net/route.c, rt_fixchange() has a bad
effect, which would cause unnecessary route deletion:

 * Unfortunately, this has the obnoxious
 * property of also triggering for insertion /above/ a pre-existing network
 * route and clones.  Sigh.  This may be fixed some day.

The effect has been even worse, because recent versions of route.c set
the parent rtentry for cloned routes from an interface-direct route.
For example, suppose that we have an interface "ne0" that has an IPv4
subnet "10.0.0.0/24".  Then we may have a cloned route like 10.0.0.1
on the interface, whose parent route is 10.0.0.0/24 (to the interface
ne0).  Now, when we add the default route (i.e. 0.0.0.0/0),
rt_fixchange() will remove the cloned route 10.0.0.1.  The (bad) effect
also prevents rt_setgate from configuring rt_gwroute, which would not
be an intended behavior.

As suggested in the comments to rt_fixchange(), we need stricter check
in the function, to prevent unintentional route deletion.

This fix also solve the "IPV6 panic?" problem in nd6_timer().

Submitted by:	JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
MFC after:	4 days
2001-07-25 19:31:43 +00:00
Sheldon Hearn
81dd89bf46 Add build infrastructure for a libiconv loadable kernel module.
This should allow the use of the smbfs module without the
requirement to rebuild the kernel with LIBICONV.
2001-07-25 19:21:06 +00:00
Jonathan Lemon
48e417eb5a Reset the device's powerstate to d0 when resuming from a suspend
operation, not just when we initally attach to the device.

Submitted by: warner
2001-07-25 18:00:17 +00:00
Peter Pentchev
7ca4d05f34 Make dynamic sysctl entries start at 0x100, not decimal 100 - there are
static entries with oid's over 100, and defining enough dynamic entries
causes an overlap.

Move the "magic" value 0x100 into <sys/sysctl.h> where it belongs.

PR:		29131
Submitted by:	"Alexander N. Kabaev" <kabaev@mail.ru>
Reviewed by:	-arch, -audit
MFC after:	2 weeks
2001-07-25 17:21:18 +00:00
Peter Pentchev
107e7dc5c3 Style(9): function names on a separate line, max line length 80 chars.
Reviewed by:	-arch, -audit
MFC after:	2 weeks
2001-07-25 17:13:58 +00:00
Mitsuru IWASAKI
44df042b35 Better checking of duplicated interrupt handler installation.
Reviewed by:	msmith
2001-07-25 16:13:30 +00:00
Mitsuru IWASAKI
5394e6a026 Some minor fixes.
- Set system power profile only when AC-line status has canged.
 - Get initial AC-line status after whole system is up.

Reviewed by:	msmith
2001-07-25 16:08:58 +00:00
Warner Losh
dd99c79cc1 Make the multiple interrupts attachment an error not a panic.
Sometimes, when pccardd is restarted, it fails to realize that the
device is already attached and tries to attach it again.  This leads
to bad mojo since the pccard code isn't setup to handle that, so the
panic was put in.  Now it appears that it is triggering too easily, so
I'm backing it off to a non-fatal error.
2001-07-25 15:09:54 +00:00
Dima Dorfman
101f105db2 Move the kernel stuff out of snoop.h. It was only there because some
of the snp* functions needed to be called from tty.c, which is no
longer the case.
2001-07-25 14:47:56 +00:00
Dima Dorfman
02bd5400fe sys/kern/tty_snoop.c is now sys/dev/snp/snp.c.
Repo-copy by:	jdp
2001-07-25 12:06:36 +00:00
Matt Jacob
f44257c29a Remove ISP_SMPLOCK stuff- we're just using locking now.
Correctly reintroduce loop_seen_once semantics- that is, if we've never
seen good link, start bouncing commands with CAM_SEL_TIMEOUT. But we
have to be careful to have let ourselves try (in isp_kthread) to check
for loop up at least once.

PR:		28992
MFC after:	1 week
2001-07-25 04:23:52 +00:00
Matt Jacob
3910362ab8 Roll minor version. Remove ISP_SMPLOCK nonsense. We're using full locking,
and that's final.

MFC after:	1 week
2001-07-25 04:21:53 +00:00
Brian Somers
9088fa05ae If an attempt is made to LISTEN for a service tag that's already being
LISTENed for, return EEXISTS.

Only match the magic "*" service tag if no other LISTEN service tags
match.

Require an explicit LISTEN for an empty service tag in order to match
empty service requests.

Approved by:	julian
MFC after:	3 days
2001-07-25 03:34:07 +00:00
Matt Jacob
d567d6183a Move netgraph to i386 only. Which is where it works only. 2001-07-25 00:20:33 +00:00
Brooks Davis
bbce7eba7f IFT_8021_VLAN -> IFT_L2VLAN per if_vlan_var.h rev 1.9. With this change
LINT compiles, but doesn't link.
2001-07-25 00:19:59 +00:00
Brooks Davis
4d60fee22b Allow ng_split to be compiled in staticly.
MFC after:	7 weeks
2001-07-25 00:15:02 +00:00
Brooks Davis
851127a276 Make ng_split part of the module building process.
MFC after:	7 weeks
2001-07-24 23:42:56 +00:00
Brooks Davis
bb5c977fbd General cleanup providing better style(9) conformance and generally
improved readability.  The two real functional changes are that
netgraph now sees this as the "split" node type rather then the
"ng_split" node type and that meta data is passed through without
processing rather then being dropped.

Reviewed by:	jhb, julian
MFC after:	7 weeks
2001-07-24 23:33:06 +00:00
Bill Fenner
1b2a4f7a3c Eliminate the panic, reported by Daniel Sobral, which occurs when
vlan_unconfig()-ing an interface on which multicast groups have been
joined.  Instead, keep the list of groups around (and, in fact, allow
changing of the membership list) and re-join them when the vlan interface
is reassociated with a lower level interface.
2001-07-24 17:14:37 +00:00
Assar Westerlund
2b3dc41c15 correct description of `vpp' for mknod/symlink: they are actually
returned locked
2001-07-24 16:16:00 +00:00
Kris Kennaway
6979f76ff6 Sync to OpenBSD (update comment and minor style change).
Obtained from:	OpenBSD
MFC after:	1 week
2001-07-24 11:34:22 +00:00
KATO Takenori
03b6f6e5ed Merged from sys/i386/conf/GENERIC revision 1.315. 2001-07-24 11:24:58 +00:00
Doug Rabson
d4127edb9d Simplify the implementation of pmap_emulate_reference(). The new version
simply manipulates the pte which faulted instead of traversing the mapping
list for that page. This makes it possible to complete the trap without
needing locks and incidentally improves the accuracy of some statistics
used by the VM system.
2001-07-24 07:13:07 +00:00
Bill Fenner
d2a75853a2 Use the IANA assignment IFT_L2VLAN directly instead of indirecting through
a privately #defined IFT_8021_VLAN.

MFC after:	3 days
2001-07-24 00:03:51 +00:00
Bill Paul
2a5772457d Turn on __STRICT_ALIGNMENT. We need this to fix up alignment so the alpha
won't trap.
2001-07-23 22:27:17 +00:00
Julian Elischer
c31b4a5381 Add an external function to unlink a netgraph type from the types list. 2001-07-23 21:14:57 +00:00
Bill Paul
6b8fa04225 AIEEE! Commit the firmware image too. *blush* 2001-07-23 21:01:36 +00:00
Bill Paul
de8e167ce6 Grrr. Module depends on vlan.h, and I committed the wrong version
of if_txpreg.h, which didn't have sc_rxbufprod defined in the softc
struct.
2001-07-23 20:54:31 +00:00
Bill Paul
362c5c1e02 You were knocked senseless by the Boomerang, spun around by the Cyclone,
blown over by the Hurricane and had a house dropped on you by the Tornado.
Now it's time to have your parade rained on by... the Typhoon!

This commit adds driver support for 3Com 3cR990 10/100 ethernet
adapters based on the Typhoon I and Typhoon II chipsets. This is actually
a port of the OpenBSD driver with many hacks by me.

No Virginia, there isn't any support for the hardware crypto yet. However
there is support for TCP/IP checksum offload and VLANs.

Special thanks go to Jason Wright, Aaron Campbell and Theo de Raadt for
squeezing enough info out of 3Com to get this written, and for doing
most of the hard work.

Manual page is included. Compiled as a module and included in GENERIC.
2001-07-23 20:44:54 +00:00
David E. O'Brien
d09d8a1ed9 Remind people to document bumps in the Porter's Handbook. 2001-07-23 17:51:02 +00:00
Ruslan Ermilov
38c1bc358b Avoid a NULL pointer derefence introduced in rev. 1.129.
Problem noticed by:	bde, gcc(1)
Panic caught by:	mjacob
Patch tested by:	mjacob
2001-07-23 16:50:01 +00:00
Yoshihiro Takahashi
99df3e3b1a Integrate fdc.h into fd.c. 2001-07-23 13:07:24 +00:00
Assar Westerlund
d3e5863fa9 make vm_page_select_cache static
Requested by:	bde
2001-07-23 12:34:31 +00:00
Kris Kennaway
56bded8a29 s/adress/address/
Inspired by:    OpenBSD
MFC After:      1 week
2001-07-23 12:05:27 +00:00
Kris Kennaway
b0b32f29dc Typo fix: fasion -> fashion
Inspired by:	OpenBSD
MFC After:	1 week
2001-07-23 11:03:48 +00:00
Jim Pirzyk
814c95264f Added the linux_sysinfo function to implement sysinfo(2).
PR:		kern/27759
Reviewed by:	marcel
Approved by:	marcel
MFC after:	1 week
2001-07-23 06:22:10 +00:00
Jim Pirzyk
3d39316d2b Added the proper arguments the sysinfo system call
PR:		kern/27759
Reviewed by:	marcel
Approved by:	marcel
Obtained from:	Linux man page sysinfo(2)
MFC after:	1 week
2001-07-23 06:17:34 +00:00
Assar Westerlund
8f8cd845fa add %option nounput 2001-07-22 23:15:14 +00:00
Ian Dowse
071dbcd2cc Add a few missing spl calls in preparation for an MFC of the miibus
support.
2001-07-22 21:39:54 +00:00
Kris Kennaway
6521db35ae Note that the umass device requires scbus and da 2001-07-22 21:35:02 +00:00
Ian Dowse
2cc42e154e Remove an old hack that remembered if the card type was Linksys by
storing a flag in the global variable 'linksys' during the probe
routine and reading it during the attach routine. We now have the
ED_VENDOR_LINKSYS vendor code stored in sc->vendor, so check that
instead.
2001-07-22 21:31:44 +00:00
Hellmuth Michaelis
f305cfab6a make driver compile under 4.3-STABLE 2001-07-22 19:55:05 +00:00
Mitsuru IWASAKI
56d8cb57b9 Don't do sleep state transition if specified sleep state is not
supported by the system.
2001-07-22 19:13:54 +00:00
Ian Dowse
dc53090488 Attach the miibus for Linksys/Dlink cards from the attach routine,
not from the probe routine. This was an oversight when I originally
ported the miibus support to -current, though it was mostly harmless.

We now set the vendor code to the new value ED_VENDOR_LINKSYS in
ed_pccard_Linksys() at probe time. Then ed_pccard_attach() checks
the vendor code, and sets up the miibus if appropriate.

Reviewed by:	imp
2001-07-22 18:58:44 +00:00
Matthew Dillon
4fec48c6fe As per further discussions on hackers redo the SIGCHLD patch to not generate
an unexpected user-visible side effect with the sigaction flags.  Also cleanup
a minor union issue.

Submitted by: Rudolf Cejka <cejkar@dcse.fee.vutbr.cz>
MFC addendum: MFC will be combined w/ original commit
MFC after: 3 days
2001-07-22 18:47:31 +00:00
Kazutaka YOKOTA
a4fc697e58 - Fix "off by one" error in VT_WAITACTIVATE. Correctly accept
0 as meaning the requesting vty.
- Accept 0 as the requesting vty in VT_ACTIVATE as in VT_WAITACTIVE.

PR: 24423
MFC after: 10 days
2001-07-22 13:58:23 +00:00
Assar Westerlund
17b65d5532 revert previous commit (bad style and not needed)
Noticed:	bde
2001-07-22 10:24:31 +00:00
Mike Smith
0bc88fe1eb Add another Dell 3/Di PCI ID. You'd think they had enough of these
already...
2001-07-22 04:06:36 +00:00
Assar Westerlund
8cfdf32239 add prototype for dosetrlimit 2001-07-22 00:21:19 +00:00
Assar Westerlund
51bb585207 revert previous accidental commit 2001-07-22 00:12:23 +00:00
Assar Westerlund
57762323e5 get rid of some printf and pointer type warnings 2001-07-22 00:12:22 +00:00
Assar Westerlund
81e8cb900e add <sys/sytm.h> (for cpufunc.h -> rdtsc) 2001-07-21 20:53:42 +00:00
Assar Westerlund
129a62d7c7 add <sys/cdefs.h> (for __unused and such) 2001-07-21 17:12:44 +00:00
Assar Westerlund
20de0f980e null_do_probe: mark as unused 2001-07-21 17:10:30 +00:00
Assar Westerlund
0379d76358 (vm_page_select_cache): add prototype 2001-07-21 17:08:15 +00:00
Robert Nordier
816aa3c0b5 Unset MAINTAINER. 2001-07-21 14:32:47 +00:00
Hellmuth Michaelis
4d02f92dd2 update step. 2001-07-21 11:31:27 +00:00
Mike Smith
bfae45aa43 Convert from acpi_strerror() to AcpiFormatException()
Fix dangling include of the dear departed acpi_ecreg.h
2001-07-21 10:24:37 +00:00
Mike Smith
9d839ea8e4 Update the OSD module to match the ACPI CA 20010717 import.
Submitted by:	"Grover, Andrew" <andrew.grover@intel.com> (OsdHardware.c)
2001-07-21 04:10:01 +00:00
Mike Smith
787fa5b805 Implement a "proper" timecounter hung off the ACPI timer device.
This code is based on the mp_clock code by phk.  It attempts to
detect the PIIX4 (see comments for details) and use a workaround
for its problems.

This code is experimental, and could use some testing and review by a
timekeeping enthusiast.
2001-07-21 04:08:42 +00:00
Mike Smith
da3b867e37 Merge the EC register definitions into the EC module proper, they're not
used anywhere else.

AcpiOsSleepUsec() -> AcpiOsStall()
2001-07-21 04:06:44 +00:00
Mike Smith
ad5dc75bb4 Use our saved copy of the FADT rather than fetching it again. 2001-07-21 04:05:32 +00:00
Mike Smith
67ce16735b Don't call ourselves a "control method" anything, that's not useful.
Move the "button pressed" diagnostics to the point where we can print
out which button was actually pressed.
2001-07-21 04:05:08 +00:00
Mike Smith
acf72ef4f1 The API for loading tables changed (we no longer explicitly search for the
RSDP, it's now found via a callback).

AcpiOsSleepUsec() went away, use AcpiOsSleep() instead (we could use
AcpiOsStall() too)

AcpiFormatException() was changed to make more sense (it behaves like
our old acpi_strerror() did), so throw acpi_strerror() away (still
#defined in acpivar.h though, we need to sweep these seperately).
2001-07-21 04:04:03 +00:00
Mike Smith
0b920e45df Merge local changes with the ACPI CA 20010717 import. 2001-07-21 03:57:37 +00:00
Mike Smith
9d5c013ca4 Vendor import of the Intel ACPI CA 20010717 snapshot. 2001-07-21 03:55:17 +00:00
Mike Smith
4ad41296a7 This commit was generated by cvs2svn to compensate for changes in r80062,
which included commits to RCS files with non-trunk default branches.
2001-07-21 03:55:17 +00:00
Mike Smith
2e5c56cb6b Vendor import of the Intel ACPI CA 20010717 snapshot. 2001-07-21 03:55:15 +00:00
Mike Smith
bb83d65cfd This commit was generated by cvs2svn to compensate for changes in r80060,
which included commits to RCS files with non-trunk default branches.
2001-07-21 03:55:15 +00:00
John Baldwin
a5dd141db6 Add a missing ~ so that the LO_INITIALIZED flag actually gets turned off
in witness_destroy().
2001-07-20 23:29:25 +00:00
Jim Pirzyk
5ecfb8f922 Put a knob in the kernel config files to tweak the user max stack size.
PR:		kern/28925
Reviewed by:	bakul@bitblocks.com and tlambert2@mindspring.com on -arch.
MFC after:	1 week
2001-07-20 20:26:34 +00:00
Brooks Davis
9753d2f8ae gif isn't a count device anymore so don't put a number after it.
Pointed out by:	brian
2001-07-20 19:53:08 +00:00
Kazutaka YOKOTA
9a1d7da7c1 Fix typo; the meaning of the 3rd parameter to genkbd_keyaction() is
'up' rather than 'down'.

PR: 22466
MFC after: 10 days
2001-07-20 14:49:54 +00:00
Kazutaka YOKOTA
34e45f9e71 Fix off by one error for ESC[1J.
PR: kern/18381
MFC after: 10 days
2001-07-20 14:08:12 +00:00
Kazutaka YOKOTA
4dbf3ccb9b Define a couple of subroutines to replace duplicated common code. You
shoulnd't see any functional difference.
2001-07-20 13:10:59 +00:00
Kazutaka YOKOTA
764952572b Return consistent key action codes at key press and release
events. Otherwise you would see unexpected results if shift or
locking keys are defined to give different actions depending
on other shift/locking keys' state.

Please keep the ukbd module and the kernel in sync, otherwise
the USB keyboard won't work after this change.
MFC after:	10 days
2001-07-20 13:05:57 +00:00
Mike Smith
f7ae7f1d00 We haven't used this for ages, and we're not going to either. 2001-07-20 09:44:55 +00:00
Nick Hibma
53f8b5d2f1 Support for USB floppies based upon SMSC USB FDD controller.
PR:		28877
Submitted by:	Larry Baird <lab@gta.com>
MFC after:	1 week
2001-07-20 09:20:43 +00:00
Mark Murray
87242f3724 Fix type warnings.
PR: 29101
2001-07-20 08:58:04 +00:00
Mike Smith
a5934d76a8 We haven't had AcpiSetSystemSleepState for a while now, clean out the
prototype.
2001-07-20 08:49:17 +00:00
Takanori Watanabe
6161544ca7 Add ACPI S2-S4BIOS Suspend/Resume code.
Some problems may remain.

Reviewed by:iwasaki
2001-07-20 06:07:34 +00:00
Jonathan Chen
42845cb855 Fix setting serial baud rate under ibcs2 emulation by moving a line to the
right place.  Reported by Jonathan Chen <jonc@pinnacle.co.nz> (someone with
the same name who's not me)

PR:	i386/8414
Submitted by:	Jonathan Chen <jonc@pinnacle.co.nz>
MFC after:	2 weeks
2001-07-20 06:00:02 +00:00
Warner Losh
c8ce6587d0 When including pci header files, do things differently for 5x and 4x
to make code sharing between the two easier.

Also, only do power management in -current.  It doesn't exist in stable
yet.
2001-07-19 21:43:01 +00:00
Scott Long
19f2be11b0 Limit the device to only one playback channel until I can figure out why
a) newpcm insists on using only the highest number channel available, and
b) the maestro3 driver no longer likes anything above channel 0.
2001-07-19 20:53:52 +00:00
Scott Long
e93d24c2f0 Fix an off-by-one error in the dma tag. This was causing the VM system to
freak out occasionally.

MFC after:	1 week
2001-07-19 20:51:29 +00:00
Assar Westerlund
ac01ecd9fb remove support for creating files and directories from msdosfs_mknod 2001-07-19 19:15:42 +00:00
Jonathan Lemon
b5ebd06eb3 Rename vm86pcb_lock -> vm86_lock to correctly reflect its function.
Requested by: jhb
2001-07-19 19:07:10 +00:00
Jonathan Lemon
5f5c2e958f Introduce EVFILT_TIMER, which allows a process to establish an
arbitrary number of timers, both oneshot and periodic.

Repeatedly reminded to commit by: jayanth
Reviewed by: peter (a while back)
2001-07-19 18:34:40 +00:00
Jonathan Lemon
9009a48f03 Unconditinally turn on VLAN support when building fxp as a module, since
it may be plugged into a kernel that supports VLANs.  If the kernel is
not VLAN aware, things will still work as before.

Modules don't really have option support, so this is somewhat of a hack.
2001-07-19 15:58:40 +00:00
Jonathan Lemon
74396a0a26 Only turn on MWI if the PCI configuration word indicates that it
is supported, in addition to checking for a valid cacheline size.
Add a missing splx() in fxp_tick that got dropped.

Found by: peter
MFC in: 3 days
2001-07-19 15:48:00 +00:00
Jonathan Lemon
4834ec4db9 Expand the range of the vm86pcb_lock so that it protects manipulations
to the global vm86 page table as well.

Spotted by: Kazu
2001-07-19 15:33:13 +00:00
KATO Takenori
499438b356 Merged from sys/i386/isa/npx.c revision 1.106. 2001-07-19 09:07:19 +00:00
KATO Takenori
e6a23687f6 Merged from sys/i386/isa/npx.c revision 1.105. 2001-07-19 09:06:33 +00:00
KATO Takenori
efa1251026 Merged from sys/i386/i386/machdep.c revisions 1.462 and 1.464. 2001-07-19 08:51:08 +00:00
Ruslan Ermilov
f2c2962ee5 Backout non-functional changes from revision 1.128.
Not objected to by:	dcs
2001-07-19 07:10:30 +00:00
Brian S. Dean
3ad234d4ef swtch.s: During context save, use the correct bit mask for clearing
the non-reserved bits of dr7.

         During context restore, load dr7 in such a way as to not
         disturb reserved bits.

machdep.c: Don't explicitly disallow the setting of the reserved bits
           in dr7 since we now keep from setting them when we load dr7
           from the PCB.

           This allows one to write back the dr7 value obtained from
           the system without triggering an EINVAL (one of the
           reserved bits always seems to be set after taking a trace
           trap).

MFC after:	7 days
2001-07-19 04:37:27 +00:00
Kris Kennaway
2d075e994c Don't use kp->arg0 as a format string, grr.
MFC after:	1 week
2001-07-19 02:18:54 +00:00
Kris Kennaway
a081aa7d72 Quiet a variable format-string warning.
MFC after:    1 week
2001-07-19 02:16:24 +00:00
Kris Kennaway
58d9a05948 Quiet a variable format-string warning.
MFC after:	1 week
2001-07-19 02:05:00 +00:00
Justin T. Gibbs
cd036e891a ahc_pci.c:
If bus_dma will give us addresses > 32 bits, setup our dma tag
	to accept up to 39bit addresses.

aic7770.c:
	Update the softc directly rather than use an intermediate
	"probe_config" structure.

aic7xxx.c:
	Complete core work to support 39bit addresses for bulk data
	dma operations.  Controller data structures still must reside
	under the 4GB boundary to reduce code/data size in the sequencer
	and related data structures.  This has been tested under Linux
	IA64 and will be tested on IA64 for FreeBSD as soon as our port
	can run there.

	Add bus dmamap synchronization calls around manipulation of
	all controller/kernel shared host data structures.

	Implement data pointer reinitialation for a second data phase
	in a single connection in the kernel rather than bloat the
	sequencer.  This is an extremely rare operation (does it ever
	happen?) and the sequencer implementation was flawed for some
	of the newest chips.

	Don't ever allow our target role to initiate a PPR.  This
	is forbidden by the SCSI spec.

	Add a few missing endian conversions in the ignore wide pointers
	code.  The core has been tested on the PPC under Linux and should
	work for FreeBSD PPC.  As soon as I can test the OSM layer for
	FreeBSD PPC, I will.

	Move some of ahc_softc_init() into ahc_alloc() now that the
	probe_config structure is gone.

	Add a 4GB boundary condition on all of our dma tags.  32bit
	DAC under PCI only works on a single 4GB "page".  Although
	we can cross 4GB on a true 64bit bus, the card won't always
	be installed in one and we can save code space and cost in
	implementing high address support by assuming the high DWORD
	address will never change.

	Add diagnostics to ahc_search_qinfifo().

	Correct a target mode issue with bus resets.  To avoid an
	interrupt storm from a malicious third party holding the
	reset line, the sequencer would defer re-enabling the reset
	interrupt until either a select-out or select-in.  Unfortunately,
	the select-in enable bit is cleared by a bus reset, so a second
	reset will render the card deaf to an initiator's attempts to
	contact it.  We now re-enable bus reset interrupts immediately
	if the target role is enabled.

aic7xxx.h:
	Remove struct ahc_probe_config.

	SCB's now contain a pointer to the sg_map_node so we can perfrom
	bus dma sync operations on the SG list prior to queuing a command.

aic7xxx.reg:
	Register the Perforce ID for this file with the VERSION keyword
	so it is printed in generated files.

	Add the DSCOMMAND1 register which is used to access the high
	DWORD of address bits.

	Add the data pointer reinitialize sequencer interrupt code.

aic7xxx.seq:
	Register the Perforce ID for this file with the VERSION keyword
	so it is printed in generated files.

	Remove code to re-enable the bus reset interrupt after a select-in.
	In target mode we cannot defer this operation as ENSELI is cleared
	by a bus reset.

	Complete 39bit support.

	Generate a sequencer inteerrupt rather than handle the data
	pointers re-initialitation in the sequencer.

	Inline the "seen identify" assertion to save a few cycles.

	Short circuit the update of our residual data if we have
	fully completed a transfer.  The residual is correct from
	our last S/G load operation.

	Short circuit full SDPTR processing if the residual is 0.
	Just mark the transfer as complete.

aic7xxx_93cx6.c:
	Synchronize perforce IDs.

aic7xxx_freebsd.c:
	Complete untested 39bit support.

	Add missing endia conversions.

	Clear our residuals prior to starting a command.  The
	update residual code in the core only sets the residual
	if there is one.

aic7xxx_freebsd.h:
	Modeify ahc_dmamap_sync() macros to take an offset and a length.
	This is how sync operations are performed in NetBSD, and we should
	update our bus dma implementation to match.

aic7xxx_inline.h:
	Add data structure synchronization helper functions.

	Fix a bug in ahc_intr() where we would not clear our unsolicited
	interrupt counter after running our PCI interrupt handler.  This
	may have been the cause of the spurious PCI interrupt messages.

aic7xxx_pci.c:
	Adjust for loss of probe_config structure.

	Guard against bogus 9005 subdevice information as seen on some
	IBM MB configurations.

	Add 39bit address support.

MFC after: 10 days
2001-07-18 21:39:48 +00:00
Justin T. Gibbs
2d0fbde8e7 Add support for parsing version strings out of assembler source files
and outputing them in generated files.

Fixed a few other scanner bugs that for some reason didn't show up until
these modifications were made.

MFC after:	10 days
2001-07-18 21:03:32 +00:00
John Baldwin
7063595315 Grab the process lock around psignal().
Noticed by:	tanimura
2001-07-18 19:17:36 +00:00
Poul-Henning Kamp
344d118fd4 Add printf format checking to sbuf_printf()
Submitted by:	Harti Brandt <brandt@fokus.gmd.de
2001-07-18 15:58:06 +00:00
Dima Dorfman
ac60b28d35 Keep track of all "struct snoop"'s so that snp_modevent can fail with
EBUSY if there's a device still open.
2001-07-18 13:39:43 +00:00
Dima Dorfman
10b0e058bb Use MD_NAME and MDCTL_NAME constants where appropriate. 2001-07-18 13:32:38 +00:00
Peter Pentchev
2f7538d646 Make sure that installing a module complains if the target modules
directory does not exist, instead of creating/overwriting a file
with the name of the (expected) directory.  Yes, this deviates a bit
from nearly all other install targets in the tree, but let's face it,
removing a modules directory is not all that uncommon a mistake,
and finding a file with the contents of the last module installed
is a baaad surprise at boot time..

PR:		26317
Submitted by:	"T. William Wells" <bill@twwells.com> (the PR)
		Gregory Bond <gnb@itga.com.au> (the actual patch)
Reviewed by:	silence on -arch and -audit for the last 10 days
MFC after:	2 weeks
2001-07-18 09:59:55 +00:00
Daniel C. Sobral
3afefa3924 Skip the route checking in the case of multicast packets with known
interfaces.

Reviewed by:	people at that channel
Approved by:	silence on -net
2001-07-17 18:47:48 +00:00
David E. O'Brien
b46ba8880c Increase NMBCLUSTERS by 4x.
This takes a GENERIC kernel (MAXUSERS=32) from 1536 to 3072.
2001-07-17 15:51:12 +00:00
Tor Egge
e55bc0a096 The per-cpu temporary buffers are not needed since the pcb_save areas have
the proper alignment.  Change dummy variable in npxinit from stack to bss
to ensure proper alignment.

Reviewed by:	bde
2001-07-17 13:06:47 +00:00
Ruslan Ermilov
9f81cc840b Backout damage to the INADDR_TO_IFP() macro in revision 1.7.
This macro was supposed to only match local IP addresses of
interfaces, and all consumers of this macro assume this as
well.  (See IP_MULTICAST_IF and IP_ADD_MEMBERSHIP socket
options in the ip(4) manpage.)

This fixes a major security breach in IPFW-based firewalls
where the `me' keyword would match the other end of a P2P
link.

PR:		kern/28567
2001-07-17 10:30:21 +00:00
Poul-Henning Kamp
dd8efa4aa4 Add missing () around macro argument in cv_waitq_empty()
Submitted by:	Harti Brandt <brandt@fokus.gmd.de>
2001-07-17 08:25:24 +00:00
Bill Paul
248fa967ca Change the interrupt handler a bit so that we call the nge_rxeof() handler
when we get an RX_ERR interrupt rather than the nge_rxeoc() handler. The
rxeoc (end of channel) handler attempts to reinitialize the whole NIC,
which we don't want to do if we only received a bad packet.
2001-07-16 16:35:09 +00:00
Tor Egge
a5d00fe997 Use PCPU_GET(cpuid) instead of curproc->p_oncpu.
Reviewed by:	peter
2001-07-16 06:00:23 +00:00
Peter Wemm
815d14ddab Use a fixed type for times in on-disk structures for ufs rather than
something that could potentially change like time_t.
2001-07-16 00:55:27 +00:00
David E. O'Brien
59177a15cc Now that config(8) has stopped breaking POLA (mkmakefile.c rev 1.69) by
always including <KERNEL>.hints if its exist reguardless of the lack of a
"hints" directive in the <KERNEL> file; we can have a real hints file again.
2001-07-15 17:56:53 +00:00
Hajimu UMEMOTO
09541513e6 do not M_WAITOK in in6_update_ifa(), since this function can be called
under splnet().  (some comment was added by KAME)

PR:		28927
MFC after:	1 week
2001-07-15 14:24:00 +00:00
Dima Dorfman
02c4d9cff7 Remove whitespace at EOL. 2001-07-15 08:21:37 +00:00
Brooks Davis
09261c4f2f Put module directories one per line so adding new modules creates readable
diffs and produces less conflicts with local source trees.
2001-07-15 04:55:37 +00:00
Benno Rice
1f246456a5 The i386-specific includes in this file were "fixed" by bracketing them with
#ifndef __alpha__.  Fix this for the rest of the world by turning it into
#ifdef __i386__.

Reviewed by:	obrien
2001-07-15 04:11:51 +00:00
David E. O'Brien
2a57c11a3a Turn off preemption on the Alpha for the time being. Peter and JHB aren't
sure when things got so bad (JHB says preemption worked just fine for months
before the AlbertVM commit).  Even post DillionVM locking commit, Miatas
(DEC Personal Workstations) are very fragile -- not making it thru a world
build.  With this patch it does.

Those hacking on SMPng will want to locally back out this commit.  The rest
of us will want to run with it until the SMPng guys figure out the problem(s).

Submitted by:	peter
2001-07-15 00:03:01 +00:00
John Baldwin
ce11a18f0e Fix MCOUNT_ENTER() so it actually compiles in the profiling case.
Pointy hat to:	me
Submitted by:	Danny J. Zerkel <dzerkel@columbus.rr.com>
2001-07-14 21:40:53 +00:00
Matt Jacob
8f01c08a34 Fix reboot hangs that have happened with multiple processors
on Alpha 4100s.

Basically, if you're halting or you're rebooting, you should
tell all other processors to halt first. Define IPI_HALT- IPI_STOP
is not what we want for this purpose, which will call prom_halt(0)
on receipt.

The processor running the halt or reboot wil send an IPI_HALT to all
other processors, delay a bit, then continue to do what what it was
planning on doing (prom_halt({0|1})).
2001-07-14 21:37:57 +00:00
Joerg Wunsch
3a5c2c86a8 Hrmpf. nyan's rev 1.25 commit to fdc.h crossed with my removal of it.
Back-integrate his (PC98) changes into fd.c.
2001-07-14 20:28:02 +00:00
Joerg Wunsch
246ed35d55 Yet another large non-function change.
. Integrate fdc.h into fd.c, with the removal of ft(4) there's no longer
  a reason to scatter things across two files.

. Sanitize comments.  Convert them into the style(9)-recommended
  multi-line form, make them sentences where apprpriate, etc.

. Declare all functions on top, and declare them in the order they
  appear in the file.  This order is totally chaotic, but Bruce
  convinced me that reordering the file wouldn't make it better either.

. Kill a `possibly uninitialized' warning (only seen with -O2) in
  fd_read_status().

. Make the comments at return (0|1) statements in fdstate() consistent.

. Nuke a ``keep the compiler happy'' dummy return at the end of fdstate(),
  gcc is smart enough to detect that it would never be reached anyway.
2001-07-14 20:25:01 +00:00
Peter Wemm
2fc4762c60 Move the hints gunk to a seperate file. It isn't really part of the
newbus structure (no more than subr_rman.c is anyway).
2001-07-14 08:25:18 +00:00
Yoshihiro Takahashi
2308cfa4fc Fixed conflict with sys/dev/syscons/syscons.h.
Submitted by:	yokota
2001-07-14 08:07:26 +00:00
Dima Dorfman
a7a1b07e25 Move fxp to the miibus section where it belongs. 2001-07-14 06:35:54 +00:00
Julian Elischer
8b68f82f72 remember to set the return address in a message when
sending it along a hook.

PR: 27906
Submitted by: Harti Brandt <brandt@fokus.gmd.de>

no MFC as code is different in 4.x
2001-07-14 05:51:33 +00:00