Commit Graph

101643 Commits

Author SHA1 Message Date
Luigi Rizzo
769270223c Correct and extend the description of the behaviour of rt_check(). 2004-04-24 23:34:56 +00:00
Luigi Rizzo
3916ebe8f0 document the locking behaviour of the functions that access
the routing table.
2004-04-24 23:34:04 +00:00
Alan Cox
e265f05414 Add a VM_OBJECT_LOCK_ASSERT() call. Remove splvm() and splx() calls. Move
a comment.
2004-04-24 23:23:36 +00:00
Luigi Rizzo
3fefbff0c2 arpcom untangling:
consistently with the rest of the code, use IFP2AC(ifp) to access
the arpcom structure given the ifp.

In this case also fix a difference in assumptions WRT the rest of
the net/ sources: it is not the 'struct *softc' that starts with a
'struct arpcom', but a 'struct arpcom' that starts with a
'struct ifnet'
2004-04-24 22:24:48 +00:00
Luigi Rizzo
56f7062728 arpcom untangling:
do not use struct arpcom directly, rather use IFP2AC(ifp).
2004-04-24 22:11:13 +00:00
Roman Kurakin
0a6818e29c Connect ng_sppp to the build process. 2004-04-24 22:03:02 +00:00
Luigi Rizzo
49572c5b0d arpcom untangling:
- use ifp instead if &ac->ac_if in a couple of nd6* calls;
   this removes a useless dependency.

 - use IFP2AC(ifp) instead of an extra variable to point to the struct arpcom;
   this does not remove the nesting dependency between arpcom and ifnet but
   makes it more evident.
2004-04-24 21:59:41 +00:00
Alan Cox
2ec91846fd Update the comment describing vm_page_grab() to reflect the previous
revision and correct some of its style errors.
2004-04-24 21:36:23 +00:00
Alan Cox
7ef6ba5d27 Push down the responsibility for zeroing a physical page from the
caller to vm_page_grab().  Although this gives VM_ALLOC_ZERO a
different meaning for vm_page_grab() than for vm_page_alloc(), I feel
such change is necessary to accomplish other goals.  Specifically, I
want to make the PG_ZERO flag immutable between the time it is
allocated by vm_page_alloc() and freed by vm_page_free() or
vm_page_free_zero() to avoid locking overheads.  Once we gave up on
the ability to automatically recognize a zeroed page upon entry to
vm_page_free(), the ability to mutate the PG_ZERO flag became useless.
Instead, I would like to say that "Once a page becomes valid, its
PG_ZERO flag must be ignored."
2004-04-24 20:53:55 +00:00
Poul-Henning Kamp
63224f60c3 Add a FreeBSD MIB with a few branches we can hang things from. 2004-04-24 19:54:55 +00:00
Hiroki Sato
c5d76ff8a6 New release note:
acpi_asus(4) added,
	versrcreach option of ipfw(4), and
	Israel Hebrew locale he_IL.UTF-8 added.

Update release note:
	The random ephemeral port allocation can be disabled using
	the net.inet.ip.portrange.randomized sysctl.

MFC:
	ng_hub(4),
	vr(4) polling support,
	per-interface polling(4) support, and
	random ephemeral port allocation.
2004-04-24 17:30:32 +00:00
Søren Schmidt
494377df3d Try the simplify determining what is ata0 and ata1.
Remove the PCI native addressing code, it eed to be run before we even
have control in the ATA driver and should be moved to the pci code.
2004-04-24 16:32:06 +00:00
Nate Lawson
c0b9a6de4a Disable interrupts while testing the timer. Not doing this unnecessarily
added an arbitrary delay to our readings, causing us to use the ACPI-safe
read method when not necessary.  Submitted by: bde

Old:
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks BAD  min = 3, max = 19, width = 16
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks BAD  min = 3, max = 19, width = 16
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks GOOD min = 3, max = 4, width = 1
Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000

New:
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000

Also, reduce unnecesary overhead in ACPI-fast by remove the barrier for
reads.  The timer in the ACPI-fast case is known to increase monotonically
so there is no need to serialize access to it.
2004-04-24 16:25:00 +00:00
Søren Schmidt
3b53326f69 Change setup for SiS device to allow PCI native mode. 2004-04-24 15:54:20 +00:00
Maxim Sobolev
f6520c9c48 Add IC Book Labs Gunboat x2 and x4 series of serial adapters.
Hardware provided by:	IC Book Labs
MFC After:	2 weeks
2004-04-24 13:04:00 +00:00
Simon L. B. Nielsen
6ff58bbd12 Add Sandberg USB to Network Link to the list of supported devices. 2004-04-24 12:30:59 +00:00
Mike Makonnen
afa647196b Unconditionaly initialize any spin lock passed to pthread_spin_init(). While
makeing sure the spinlock isn't already in use might be a nice feature to
have in theory, it's hard to implement in practice since the passed in
pointer may not be NULL, but still be an invalid value (i.e. 1..2..3.. etc).
2004-04-24 09:38:41 +00:00
Bruce Evans
97d114726d Fixed some style bugs (useless forward declarations of structs and
misplaced forward declarations of structs).  This also reduces namespace
pollution (the misplaced declarations were declared in the !_KERNEL case
when they are not used).
2004-04-24 06:44:33 +00:00
Marcel Moolenaar
c050455eac Fix build for non-COMPAT_FREEBSD4 configurations. Make the FreeBSD 4
statfs functions conditional upon the option.
2004-04-24 04:31:59 +00:00
Alan Cox
4da4d293df In cases where a file was resident in memory mmap(..., PROT_NONE, ...)
would actually map the file with read access enabled.  According to
http://www.opengroup.org/onlinepubs/007904975/functions/mmap.html this is
an error.  Similarly, an madvise(..., MADV_WILLNEED) would enable read
access on a virtual address range that was PROT_NONE.

The solution implemented herein is (1) to pass a vm_prot_t to
vm_map_pmap_enter() describing the allowed access and (2) to make
vm_map_pmap_enter() responsible for understanding the limitations of
pmap_enter_quick().

Submitted by:	"Mark W. Krentel" <krentel@dreamscape.com>
PR:		kern/64573
2004-04-24 03:46:44 +00:00
Peter Grehan
50069af197 - Catch up with recent ATA changes.
- Remove trailing space in ata_macio.c
2004-04-23 23:39:53 +00:00
Mike Silbersack
6b2fc10b64 Wrap two long lines in the previous commit. 2004-04-23 23:29:49 +00:00
Andre Oppermann
2d166c0202 Correct an edge case in tcp_mss() where the cached path MTU
from tcp_hostcache would have overridden a (now) lower MTU of
an interface or route that changed since first PMTU discovery.
The bug would have caused TCP to redo the PMTU discovery when
not strictly necessary.

Make a comment about already pre-initialized default values
more clear.

Reviewed by:	sam
2004-04-23 22:44:59 +00:00
Maksim Yevmenkin
48bd0712bc Make sure RFCOMM multiplexor channel does not hang in DISCONNECTING
state. Apparently it happens when both devices try to disconnect RFCOMM
multiplexor channel at the same time.

The scenario is as follows:

- local device initiates RFCOMM connection to the remote device. This
  creates both RFCOMM multiplexor channel and data channel;

- remote device terminates RFCOMM data channel (inactivity timeout);

- local device acknowledges RFCOMM data channel termination. Because
  there is no more active data channels and local device has initiated
  connection it terminates RFCOMM multiplexor channel;

- remote device does not acknowledges RFCOMM multiplexor channel
  termination. Instead it sends its own request to terminate RFCOMM
  multiplexor channel. Even though local device acknowledges RFCOMM
  multiplexor channel termination the remote device still keeps
  L2CAP connection open.

Because of hanging RFCOMM multiplexor channel subsequent RFCOMM
connections between local and remote devices will fail.

Reported by:	Johann Hugo <jhugo@icomtek.csir.co.za>
2004-04-23 20:21:17 +00:00
Maksim Yevmenkin
666ea1b65f Make sure Bluetooth stuff can be statically compiled into kernel
Submitted by:	ps
Reviewed by:	imp (mentor), ru
2004-04-23 19:48:43 +00:00
Thomas Moestl
3a5aee5adc Clean up two printf()s that were on a line by themselves unintendedly
after the ethernet address printing was moved to common code.
2004-04-23 19:43:35 +00:00
Philip Paeps
647e5349ec Enable the led-toggling magic. Compiling files which are in the kernel into
modules is a very nice way to produce hard-to-find panics.  Who would look for
a bug in a Makefile anyway?

Has anyone seen the pointy hat? :-o

Approved by:	njl (mentor)
2004-04-23 17:41:05 +00:00
Tim Kientzle
a020f1405f Make clone more aggressive about copying strings to the new entry.
The original might have pointers to user-specified strings;
copying the string (instead of just the pointer) protects against
the client re-using their own buffers.

I'm trying hard to avoid dumping all of the 'set' string functions
in favor of slower, but more predictable 'copy' semantics.
2004-04-23 17:15:48 +00:00
Bill Paul
9ad2cfc795 Correct KASSERT()s that check for initialization of mutexes in ndis_detach(),
which are different now that I'm not using mutex pools anymore.

Noticed by: des
2004-04-23 17:15:14 +00:00
Tim Kientzle
4db0943252 Set the 'dump' flag for shardump format.
Credit Juergen Lock.
Pointy hat to me for deleting this somewhere along the way.
2004-04-23 17:13:40 +00:00
Andre Oppermann
8b75eec175 Add the comment of the previous commit to the source file directly.
Requested by:	ru
2004-04-23 16:57:43 +00:00
Tim Kientzle
7e02198e95 Fix username/groupname cache so it returns a name that
was just looked up by get{pw,gr}id().  Otherwise, it
returns a NULL name unless it's already in the cache.

Credit to Juergen Lock.
2004-04-23 16:33:51 +00:00
Tim Kientzle
9214908dca Correct spelling of == so that file flags are correctly restored.
Credit to Juergen Lock.
2004-04-23 16:27:37 +00:00
Andre Oppermann
5efdd80a6a Call ip_output() with IP_FORWARD flag to prevent it from overwriting the
ip_id again.  ip_id is already set to the ip_id of the encapsulated packet.

Make a comment about mbuf allocation failures more realistic.

Reviewed by:	sobomax
2004-04-23 16:10:23 +00:00
Marius Strobl
27c2013edf Add a stopgap for the EBus breakage on sparc64 since the PCI code does
resource pre-allocation. The problem is that the BARs of the EBus bridges
contain the ranges for the resources for the EBus devices beyond the bridge.
So when the EBus code tries to allocate the resource for an EBus device
it's already allocated by the PCI code.
To be removed again as soon as we have a proper solution in the EBus Code.

Reviewed by:	tmm
Approved by:	marcel (mentor)
2004-04-23 15:48:48 +00:00
Darren Reed
a835fd68a1 Change the dependency between these two scripts so that ipmon depends on
ipfilter rather than the other way around, preventing ipmon from exiting
at startup because ipfilter is not yet enabled (using the device results
too early results in ENXIO.)
2004-04-23 15:43:13 +00:00
Tim J. Robbins
0b1d420254 Add files required for the NETSMBCRYPTO option. 2004-04-23 14:41:23 +00:00
Andre Oppermann
bb4f06e701 Recompile of ipfw(8) is required because of new ipfw option (versrcreach). 2004-04-23 14:33:30 +00:00
Andre Oppermann
22b5770b99 Add the option versrcreach to verify that a valid route to the
source address of a packet exists in the routing table.  The
default route is ignored because it would match everything and
render the check pointless.

This option is very useful for routers with a complete view of
the Internet (BGP) in the routing table to reject packets with
spoofed or unrouteable source addresses.

Example:

 ipfw add 1000 deny ip from any to any not versrcreach

also known in Cisco-speak as:

  ip verify unicast source reachable-via any

Reviewed by:	luigi
2004-04-23 14:28:38 +00:00
Andre Oppermann
b62dccc7e5 Fix a potential race when purging expired hostcache entries.
Spotted by:	luigi
2004-04-23 13:54:28 +00:00
Tim J. Robbins
6d4ba9cd4e Print fork statistics with %u as they are unsigned quantities.
PR:		65889
Submitted by:	Ken Stailey
2004-04-23 13:10:29 +00:00
Philip Paeps
2fb38b860c Hook up acpi_asus and its manual page in two more places I managed to overlook
last night.  Sorry about that :-o

Spotted by:	njl (mentor, spotter of forgetfulness)
2004-04-23 06:29:08 +00:00
Alan Cox
87aefa499a Push down Giant into vm_pager_get_pages(). The only get pages methods that
require Giant are in the device and vnode pagers.
2004-04-23 06:10:58 +00:00
Warner Losh
6c92cac930 Start programming the bus numbers for the pci<->cardbus. When the
secondary bus is 0, we program the primary bus, the secondary bus and
the suborindate bus.  This isn't ideal, since we start at parent_bus +
1 and store this in a static.

Ideally, we'd walk the tree and assign bus numbers.  However, that's
harder to accomplish without some help from the bus layer which we're
not planning on doing that until 6.

This fixes my CardBus problems on my Sony PCG-Z1WA, and might fix the
Dells that have had problems.
2004-04-23 05:25:13 +00:00
Alan Cox
59c8bc40ce Utilize sf_buf_alloc() rather than pmap_qenter() (and sometimes
kmem_alloc_wait()) for mapping the image header.  On all machines with a
direct virtual-to-physical mapping and SMP/HTT i386s, this is a clear win.
2004-04-23 03:01:40 +00:00
Bill Paul
c72292c9ec Set the INTR_MPSAFE flag. 2004-04-22 21:49:18 +00:00
David E. O'Brien
207a6c0dcb There was a thread on "unusually high load averages" when running under
sched_ule, in January 2004.  Looking at this, "pagezero" is (one of) the
culprit(s).  We had no provision for processes with P_NOLOAD set.  With
pagezero not running at PRI_ITHD, kseq_load_{add,rem} count pagezero as
another-normal-process, thus the "expected-plus-one" load reported in
the above thread.

Submitted by:	Nikos Ntarmos <ntarmos@ceid.upatras.gr>
2004-04-22 21:37:46 +00:00
Philip Paeps
a2c4a178ab Missed this out in my last commit. Makefile for the acpi_asus driver. 2004-04-22 21:30:56 +00:00
Philip Paeps
9a1fc77e3a Add the ACPI Asus extras driver. Provides support for cool ACPI-controled
gadgets (hotkeys, lcd, ...) on Asus laptops.  I aim to closely track the
acpi4asus project which implements these features in the Linux kernel.

If this breaks your laptop, please let me know how it does it :-)

Approved by:	njl (mentor)
2004-04-22 21:29:02 +00:00
David E. O'Brien
c6f13844f6 Fix some style issues in rev 1.58.
Use 64-bit integer math vs. mixed FP & integer.
Add -g to the usage().
2004-04-22 17:05:08 +00:00