]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoDisable TLS for arm and sparc64 here as binutils 2.15 predate GNU TLS
marius [Mon, 8 Oct 2007 18:59:34 +0000 (18:59 +0000)]
Disable TLS for arm and sparc64 here as binutils 2.15 predate GNU TLS
support for these. This is in line with gnu/lib/libgomp/config.h and
gnu/lib/libstdc++/config.h.

Reviewed by: cognet, obrien
Approved by: re (kensmith)

16 years agoIn the rare case that vm_page_cache() actually frees the given page,
alc [Mon, 8 Oct 2007 18:01:38 +0000 (18:01 +0000)]
In the rare case that vm_page_cache() actually frees the given page,
it must first ensure that the page is no longer mapped.  This is
trivially accomplished by calling pmap_remove_all() a little earlier
in vm_page_cache().  While I'm in the neighborbood, make a related
panic message a little more useful.

Approved by: re (kensmith)
Reported by: Peter Holm and Konstantin Belousov
Reviewed by: Konstantin Belousov

16 years agoResolve conflicts to complete less v408 import.
delphij [Mon, 8 Oct 2007 16:17:42 +0000 (16:17 +0000)]
Resolve conflicts to complete less v408 import.

Approved by: re (kensmith)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r172468,
delphij [Mon, 8 Oct 2007 16:14:52 +0000 (16:14 +0000)]
This commit was generated by cvs2svn to compensate for changes in r172468,
which included commits to RCS files with non-trunk default branches.

16 years agoVirgin import of less v408.
delphij [Mon, 8 Oct 2007 16:14:52 +0000 (16:14 +0000)]
Virgin import of less v408.

Approved by: re (kensmith)

16 years agoAdd FBSDID to all files in netinet so that people can more
silby [Sun, 7 Oct 2007 20:44:24 +0000 (20:44 +0000)]
Add FBSDID to all files in netinet so that people can more
easily include file version information in bug reports.

Approved by: re (kensmith)

16 years agoCorrect a lock assertion failure in sparc64's pmap_page_is_mapped() that is
alc [Sun, 7 Oct 2007 18:03:03 +0000 (18:03 +0000)]
Correct a lock assertion failure in sparc64's pmap_page_is_mapped() that is
a consequence of sparc64/sparc64/vm_machdep.c revision 1.76.  It occurs
when uma_small_free() frees a page.  The solution has two parts: (1) Mark
pages allocated with VM_ALLOC_NOOBJ as PG_UNMANAGED.  (2) Defer the lock
assertion in pmap_page_is_mapped() until after PG_UNMANAGED is tested.
This is safe because both PG_UNMANAGED and PG_FICTITIOUS are immutable
flags, i.e., they do not change state between the time that a page is
allocated and freed.

Approved by: re (kensmith)
PR: 116794

16 years agoImprove the debugging message:
silby [Sun, 7 Oct 2007 00:07:27 +0000 (00:07 +0000)]
Improve the debugging message:

TCP: [X.X.X.X]:X to [X.X.X.X]:X tcpflags 0x18<PUSH,ACK>; tcp_do_segment: FIN_WAIT_2: Received data after socket was closed, sending RST and removing tcpcb

So that it also includes how many bytes of data were received.  It now looks
like this:

TCP: [X.X.X.X]:X to [X.X.X.X]:X tcpflags 0x18<PUSH,ACK>; tcp_do_segment: FIN_WAIT_2: Received X bytes of data after socket was closed, sending RST and removing tcpcb

Approved by: re (gnn)

16 years agoThis patch adds an M_NOFREE flag which allows one to mark an mbuf as
kmacy [Sat, 6 Oct 2007 21:42:39 +0000 (21:42 +0000)]
This patch adds an M_NOFREE flag which allows one to mark an mbuf as
not being independently freeable. This allows one to embed an mbuf in
the cluster itself. This confers the benefits of the packet zone on
all cluster sizes. Embedded mbufs currently suffer from the same
limitation that packet zone mbufs do in that one cannot disconnect
them and pass them around independently of the cluster. It would
likely be possible to eliminate this limitation in the future by
adding a second reference for the mbuf itself.

Approved by: re(gnn)

16 years agoAllow drivers to free an mbuf without having the mbuf be touched if
kmacy [Sat, 6 Oct 2007 21:13:55 +0000 (21:13 +0000)]
Allow drivers to free an mbuf without having the mbuf be touched if
the driver has already freed any attached tags

Approved by: re(gnn)

16 years ago- Fix the one-2-one model to properly do a socantrecv()
rrs [Sat, 6 Oct 2007 13:23:42 +0000 (13:23 +0000)]
- Fix the one-2-one model to properly do a socantrecv()
Approved by: re@freeBSD.org (Ken Smith)

16 years agoAdd an MLINKS for pci_find_dbsf.9.
marius [Fri, 5 Oct 2007 22:50:44 +0000 (22:50 +0000)]
Add an MLINKS for pci_find_dbsf.9.

Submitted by: ru
Approved by: re (gnn)

16 years agoDisable TCP syncache debug logging by default. While useful in debugging
rwatson [Fri, 5 Oct 2007 22:39:44 +0000 (22:39 +0000)]
Disable TCP syncache debug logging by default.  While useful in debugging
problems with the syncache, it produces a lot of console noise and has led
to quite a few false positive bug reports.  It can be selectively
re-enabled when debugging specific problems by frobbing the same sysctl.

Discussed with: silby
Approved by: re (gnn)

16 years agoUse the correct pid when checking to see whether or not the /proc/<pid>
jhb [Fri, 5 Oct 2007 17:37:25 +0000 (17:37 +0000)]
Use the correct pid when checking to see whether or not the /proc/<pid>
directory itself (rather than any of its contents) is visible to the
current thread.

MFC after: 1 week
PR: kern/90063
Submitted by: john of 8192.net
Approved by: re (kensmith)

16 years agomanpage update for the recent commit to uscanner.c
luigi [Fri, 5 Oct 2007 15:17:14 +0000 (15:17 +0000)]
manpage update for the recent commit to uscanner.c
I also took the chance to make the list of supported devices a
bit more compact, as it was really long to read.

Even though re@ and Warner only saw the diffs for the code, i expect
their approval also covered the manpage update.

Approved by: re, imp (implicitly i hope)
MFC after: 3 days

16 years agoAdd entries for Epson multifunction scanner/printer/card readers,
luigi [Fri, 5 Oct 2007 07:26:39 +0000 (07:26 +0000)]
Add entries for Epson multifunction scanner/printer/card readers,
with all functions supported. This is done adding usb device IDs
to the table of recognised devices (because there is no standard
'scanner' class, so no other way to recognise them), and with
a small change to the uscanner attach routine that prevents
reconfiguring the whole USB device while we are dealing only with
one of its USB interfaces.

The latter part has been suggested by Steinar Hamre in
http://www.freebsd.org/cgi/query-pr.cgi?pr=107665 , i have
only added a bit of explaination to the code.

I have personally tried this on the Epson DX-5050 and DX-6000
devices (on the US market they have different names, CX-something).
I have good reasons to think that, possibly with the mere addition
of more USB ids to the table in uscanner.c, this should work with
all Epson multifunction devices in that family (from DX-3800 to
DX-7000 - these units are in the 50-120$ price range).
More details on related topics (SANE configuration, OCR, etc.)
at http://info.iet.unipi.it/~luigi/FreeBSD/dx5050.html

Manpage updates coming soon.

Approved by: re, imp
MFC after: 3 days

16 years agoAMD CS5536 and VIA 8237S support.
brueffer [Fri, 5 Oct 2007 07:06:51 +0000 (07:06 +0000)]
AMD CS5536 and VIA 8237S support.

Approved by: re (blanket)

16 years agoMake selector parsing accept the dot "." as an alternative selector
se [Thu, 4 Oct 2007 22:27:08 +0000 (22:27 +0000)]
Make selector parsing accept the dot "." as an alternative selector
with identical meaning as the colon ":". This is to support a syntax
that is more similar to a PCI device specification in the device hints
file. The selector is not fully compatible with the specification in
the hints file, since entries in that file use a different prefix,
which needs to be added to the getsel() routine, if full support of
that syntax is found to be desirable.

Approved by: re (Ken Smith)

16 years agoRestore compatibility with version before introduction of PCI domains.
se [Thu, 4 Oct 2007 22:18:53 +0000 (22:18 +0000)]
Restore compatibility with version before introduction of PCI domains.
PCI selectors with 2 or 3 elements behave exactly as before (i.e. the
domain is 0 and in the 2 element case, the function is also 0).
The form with 4 selector elements works as in the previous revision
and provides the PCI domain number as the left-most selector element.

This change allows old scripts (which used the 2 or 3 selector element
formats) to be kept. Without this patch, the 3 element form was parsed
as starting with a domain number (and the function was assumed to be 0),
with this patch, the domain is assumed to be 0 (and the last value is
used as the function number).

The man page is updated to describe the new selector semantics.

Approved by: re (Ken Smith)

16 years agoAdd support for the VIA 8237S
sos [Thu, 4 Oct 2007 19:17:16 +0000 (19:17 +0000)]
Add support for the VIA 8237S
Fix the LBA28/LBA48 crossover bug.

Approved by: re@

16 years agoAlso boot *.debug if everything else fails.
obrien [Thu, 4 Oct 2007 18:29:52 +0000 (18:29 +0000)]
Also boot *.debug if everything else fails.

Approved by: re(gnn)

16 years agoFix lock leak leading to the 'System call <name> returning with 1 locks held'
pjd [Thu, 4 Oct 2007 17:51:59 +0000 (17:51 +0000)]
Fix lock leak leading to the 'System call <name> returning with 1 locks held'
panic.

Reported by: kris
Approved by: re (kensmith)

16 years agoMFp4: Provide a dummy verb "export" to shut up the message
delphij [Thu, 4 Oct 2007 17:11:48 +0000 (17:11 +0000)]
MFp4: Provide a dummy verb "export" to shut up the message
showed up at start when NFS is enabled.

Reported by: rafan
Approved by: re (tmpfs blanket)

16 years agoAdditional work is still needed before we can claim that tmpfs
delphij [Thu, 4 Oct 2007 17:08:46 +0000 (17:08 +0000)]
Additional work is still needed before we can claim that tmpfs
is stable enough for production usage.  Warn user upon mount.

Approved by: re (tmpfs blanket)

16 years agoThe exit status of a case statement where none of the patterns is matched
stefanf [Thu, 4 Oct 2007 16:14:48 +0000 (16:14 +0000)]
The exit status of a case statement where none of the patterns is matched
is supposed to be 0, not the status of the previous command.

Reported by: Eygene Ryabinkin
PR: 116559
Approved by: re (gnn)

16 years agoFix the module name matching to the drivers present in the kernel. Previously
thompsa [Thu, 4 Oct 2007 09:45:41 +0000 (09:45 +0000)]
Fix the module name matching to the drivers present in the kernel. Previously
it would return true on a partial match where it would think the edsc module
was already present by having a positive match on 'ed'.  This changes it so
that it compares the full string including the nul terminators.

This also fixes a buffer overflow in the ifkind variable where the length of
the interface name in *argv wasnt checked for size.

Reviewed by: brooks
Approved by: re (gnn)

16 years ago- We should return error = 0 and the upper processing would
rrs [Thu, 4 Oct 2007 09:29:33 +0000 (09:29 +0000)]
- We should return error = 0 and the upper processing would
  return a zero length read. Otherwise we don't return the
  right error indication.

Approved by: re@freebsd.org (gnn)

16 years agoRecognize the CS5536 support chip for the AMD Geode LX CPU to enable
phk [Thu, 4 Oct 2007 06:21:54 +0000 (06:21 +0000)]
Recognize the CS5536 support chip for the AMD Geode LX CPU to enable
UDMA modes.

Please notice that Soekris NET5501 bios versions before 1.32f has a bug
that prevents this from working.

Approved by: re (gnn)
MFC: 2 weeks

16 years agoFreeBSD 6.2 is now known to mdoc.
ru [Thu, 4 Oct 2007 04:39:06 +0000 (04:39 +0000)]
FreeBSD 6.2 is now known to mdoc.

Approved by: re (kensmith)

16 years agoMFV: recent mdoc(7) changes.
ru [Thu, 4 Oct 2007 04:38:23 +0000 (04:38 +0000)]
MFV: recent mdoc(7) changes.

Approved by: re (kensmith)

16 years agoCorrect a buffer overflow in OpenSSL SSL_get_shared_ciphers().
simon [Wed, 3 Oct 2007 21:38:57 +0000 (21:38 +0000)]
Correct a buffer overflow in OpenSSL SSL_get_shared_ciphers().

Security: FreeBSD-SA-07:08.openssl
Approved by: re (security blanket)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r172423,
ru [Wed, 3 Oct 2007 06:04:40 +0000 (06:04 +0000)]
This commit was generated by cvs2svn to compensate for changes in r172423,
which included commits to RCS files with non-trunk default branches.

16 years agoPull up current -mdoc version from vendor. This includes the
ru [Wed, 3 Oct 2007 06:04:40 +0000 (06:04 +0000)]
Pull up current -mdoc version from vendor.  This includes the
following changes:

: 2007-10-02  Ruslan Ermilov  <ru@FreeBSD.org>
:
:         * tmac/doc-common, tmac/groff_doc.man: Add FreeBSD 6.2, document
:         FreeBSD 5.5 and 7.0.
:
:         * tmac/doc-syms: Give better names for System V releases.

: 2007-05-30  Werner LEMBERG <wl@gnu.org>
:
:         * tmac/groff_mdoc.man: Convert `-' to `\-' where appropriate.
:         Recommend `tbl' instead of `-column' lists for more complicated
:         cases.

16 years agoSort as per README.
ru [Wed, 3 Oct 2007 05:51:20 +0000 (05:51 +0000)]
Sort as per README.

Approved by: re (kensmith)

16 years agoRemoved "tail +5" from the command used to sanity check changes to
ru [Wed, 3 Oct 2007 05:44:27 +0000 (05:44 +0000)]
Removed "tail +5" from the command used to sanity check changes to
mtree files -- the 5-line header is no longer printed when mtree(8)
is run with -n (as of mtree/create.c,v 1.34).

Approved by: re (kensmith)

16 years agoCorrection to the log for rev. 1.4:
obrien [Wed, 3 Oct 2007 01:26:24 +0000 (01:26 +0000)]
Correction to the log for rev. 1.4:
"One must now explicitly specify -ftree-vrp if one wants it".

Approved by: re(KenSmith)

16 years agoDo not imply -ftree-vrp with -O2 and above. One must implicitly specify
obrien [Tue, 2 Oct 2007 20:06:14 +0000 (20:06 +0000)]
Do not imply -ftree-vrp with -O2 and above.  One must implicitly specify
'-ftree-vrp' if one wants it.
Some bad code generation has been tracked to -ftree-vrp.  jdk1{5,6} are
notable examples.

Approved by: re(kensmith)

16 years agoFix usage example since we don't have wext driver.
kevlo [Tue, 2 Oct 2007 15:30:28 +0000 (15:30 +0000)]
Fix usage example since we don't have wext driver.

Reviewed by: sam
Approved by: re (kensmith)

16 years agoFix sx_try_slock(), so it only fails when there is an exclusive owner.
pjd [Tue, 2 Oct 2007 14:48:48 +0000 (14:48 +0000)]
Fix sx_try_slock(), so it only fails when there is an exclusive owner.
Before that fix, it was possible for the function to fail if number
of sharers changes between 'x = sx->sx_lock' step and atomic_cmpset_acq_ptr()
call.

This fixes ZFS problem when ZFS returns strange EIO errors under load.
In ZFS there is a code that depends on the fact that sx_try_slock() can
only fail if there is an exclusive owner.

Discussed with: attilio
Reviewed by: jhb
Approved by: re (kensmith)

16 years agoRemoving obsolete cached files after cached->nscd renaming.
bushman [Tue, 2 Oct 2007 07:51:43 +0000 (07:51 +0000)]
Removing obsolete cached files after cached->nscd renaming.

Approved by: re (kensmith), brooks (mentor)

16 years ago - Reassign the thread queue lock to newtd prior to switching. Assigning
jeff [Tue, 2 Oct 2007 01:30:18 +0000 (01:30 +0000)]
 - Reassign the thread queue lock to newtd prior to switching.  Assigning
   after the switch leads to a race where the outgoing thread still owns
   the local queue lock while another cpu may switch it in.  This race
   is only possible on machines where cpu_switch can take significantly
   longer on different cpus which in practice means HTT machines with
   unfair thread scheduling algorithms.

Found by: kris (of course)
Approved by: re

16 years agoRemove a -N flag.
kevlo [Tue, 2 Oct 2007 01:22:14 +0000 (01:22 +0000)]
Remove a -N flag.

Reviewed by: sam
Approved by: re (kensmith)

16 years ago - Move the rebalancer back into hardclock to prevent potential softclock
jeff [Tue, 2 Oct 2007 00:36:06 +0000 (00:36 +0000)]
 - Move the rebalancer back into hardclock to prevent potential softclock
   starvation caused by unbalanced interrupt loads.
 - Change the rebalancer to work on stathz ticks but retain randomization.
 - Simplify locking in tdq_idled() to use the tdq_lock_pair() rather than
   complex sequences of locks to avoid deadlock.

Reported by: kris
Approved by: re

16 years agoAlways install libpthread.* symlinks if at least one of
ru [Mon, 1 Oct 2007 18:29:55 +0000 (18:29 +0000)]
Always install libpthread.* symlinks if at least one of
the threading libraries is built.  This simplifies the
logic in makefiles that need to check if the pthreads
support is present.  It also fixes a bug where we would
build a threading library that we shouldn't have built:
for example, building with WITHOUT_LIBTHR and the default
value of DEFAULT_THREADING_LIB (libthr) would mistakenly
build the libthr library, but not install it.

Approved by: re (kensmith)

16 years agoRevise the list of directories we manually create under
ru [Mon, 1 Oct 2007 18:24:46 +0000 (18:24 +0000)]
Revise the list of directories we manually create under
${WORLDTMP} and ${LIB32TMP}; some of them are no longer
needed, and some were never needed.

Approved by: re (kensmith)

16 years agoDon't build bits that depend on the pthreads support if a
ru [Mon, 1 Oct 2007 18:23:24 +0000 (18:23 +0000)]
Don't build bits that depend on the pthreads support if a
system was configured without such support.

Approved by: re (kensmith)

16 years agoAlways install libpthread.* symlinks if at least one of
ru [Mon, 1 Oct 2007 18:22:32 +0000 (18:22 +0000)]
Always install libpthread.* symlinks if at least one of
the threading libraries is built.  This simplifies the
logic in makefiles that need to check if the pthreads
support is present.  It also fixes a bug where we would
build a threading library that we shouldn't have built:
for example, building with WITHOUT_LIBTHR and the default
value of DEFAULT_THREADING_LIB (libthr) would mistakenly
build the libthr library, but not install it.

Approved by: re (kensmith)

16 years agoFixed static linkage (build with -DNO_SHARED).
ru [Mon, 1 Oct 2007 18:17:24 +0000 (18:17 +0000)]
Fixed static linkage (build with -DNO_SHARED).

Approved by: re (kensmith)

16 years agoFixed "make checkdpadd" (missing library dependencies).
ru [Mon, 1 Oct 2007 18:15:11 +0000 (18:15 +0000)]
Fixed "make checkdpadd" (missing library dependencies).

Approved by: re (kensmith)

16 years ago- Add cddl/lib to the list of library directories.
ru [Mon, 1 Oct 2007 18:11:43 +0000 (18:11 +0000)]
- Add cddl/lib to the list of library directories.
- Add /bin to PATH to suppress a harmless warning from a
  makefile that sets a variable using cat(1).

Approved by: re (kensmith)

16 years agoThe shell_1_sh test was failing with "make -jX".
ru [Mon, 1 Oct 2007 18:09:42 +0000 (18:09 +0000)]
The shell_1_sh test was failing with "make -jX".

Approved by: re (kensmith)

16 years agoMK_LIBTHR was misspelled.
ru [Mon, 1 Oct 2007 18:08:11 +0000 (18:08 +0000)]
MK_LIBTHR was misspelled.

Approved by: re (kensmith)

16 years agoInstall the forgotten /usr/include/geom/multipath/ header.
ru [Mon, 1 Oct 2007 18:07:29 +0000 (18:07 +0000)]
Install the forgotten /usr/include/geom/multipath/ header.

Approved by: re (kensmith)

16 years ago- Bug fix managing congestion parameter on immediate
rrs [Mon, 1 Oct 2007 03:22:29 +0000 (03:22 +0000)]
- Bug fix managing congestion parameter on immediate
  retransmittion by handover event (fast mobility code)
- Fixed problem of mobility code which is caused by remaining
  parameters in the deleted primary destination.
- Add a missing lock. When a peer sends an INIT, and while we
  are processing it to send an INIT-ACK the socket is closed,
  we did not hold a lock to keep the socket from going away.
  Add protection for this case.
- Fix so that arwnd is alway uses the minimal rwnd if the user
  has set the socket buffer smaller. Found this when the test
  org decided to see what happens when you set in a rwnd of 10
  bytes (which is not allowed per RFC .. 4k is minimum).
- Fixes so a cookie-echo ootb will NOT cause an abort to
  be sent. This was happening in a MPI collision case.
- Examined all panics and unless there was no recovery, moved
  any that were not already to INVARANTS.

Approved by: re@freebsd.org (gnn)

16 years agoMake the PCI code aware of PCI domains (aka PCI segments) so we can
marius [Sun, 30 Sep 2007 11:05:18 +0000 (11:05 +0000)]
Make the PCI code aware of PCI domains (aka PCI segments) so we can
support machines having multiple independently numbered PCI domains
and don't support reenumeration without ambiguity amongst the
devices as seen by the OS and represented by PCI location strings.
This includes introducing a function pci_find_dbsf(9) which works
like pci_find_bsf(9) but additionally takes a domain number argument
and limiting pci_find_bsf(9) to only search devices in domain 0 (the
only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are
changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order
to no longer report false positives when searching for siblings and
dupe devices in the same domain respectively.
Along with this change the sole host-PCI bridge driver converted to
actually make use of PCI domain support is uninorth(4), the others
continue to use domain 0 only for now and need to be converted as
appropriate later on.
Note that this means that the format of the location strings as used
by pciconf(8) has been changed and that consumers of <sys/pciio.h>
potentially need to be recompiled.

Suggested by: jhb
Reviewed by: grehan, jhb, marcel
Approved by: re (kensmith), jhb (PCI maintainer hat)

16 years agoUpdating ObsoleteFiles.inc after cached->nscd renaming.
bushman [Sat, 29 Sep 2007 22:37:40 +0000 (22:37 +0000)]
Updating ObsoleteFiles.inc after cached->nscd renaming.

Approved by: re (bmah), brooks (mentor)

16 years agoAdd my self and my mentor.
kaiw [Sat, 29 Sep 2007 17:01:19 +0000 (17:01 +0000)]
Add my self and my mentor.

Approved by: jkoshy (mentor)
Approved by: re (bmah)

16 years agoo For dynamic rules log a parent rule number. Prefix a log message
maxim [Sat, 29 Sep 2007 15:01:41 +0000 (15:01 +0000)]
o For dynamic rules log a parent rule number.  Prefix a log message
by 'ipfw: '.

PR: kern/115755
Submitted by: sem
Approved by: re (gnn)
MFC after: 4 weeks

16 years agofix building with NO_CRYPT=true
sam [Fri, 28 Sep 2007 15:52:28 +0000 (15:52 +0000)]
fix building with NO_CRYPT=true

PR: 116439
Approved by: re (gnn)

16 years agoAdjust history.
obrien [Fri, 28 Sep 2007 15:31:44 +0000 (15:31 +0000)]
Adjust history.

Approved by: re(ken)

16 years ago- Change the description of sleepq_add(), sleepq_broadcast() and
gabor [Fri, 28 Sep 2007 11:13:40 +0000 (11:13 +0000)]
- Change the description of sleepq_add(), sleepq_broadcast() and
  sleepq_signal() to reflect recent changes

Submitted by: attilio
Approved by: re (bmah)

16 years agoFinishing renaming of cached into nscd. etc/rc.d and usr.sbin/Makefile
bushman [Fri, 28 Sep 2007 10:38:08 +0000 (10:38 +0000)]
Finishing renaming of cached into nscd. etc/rc.d and usr.sbin/Makefile
updated. Note added to UPDATING.

Approved by: re (kensmith, bmah), brooks (mentor)

16 years agoAdd a missing word in one place and delete an extraneous article in
bmah [Fri, 28 Sep 2007 05:14:39 +0000 (05:14 +0000)]
Add a missing word in one place and delete an extraneous article in
another.

Approved by: re (implicitly)

16 years agoNew release note: gvirstor(8).
bmah [Fri, 28 Sep 2007 05:04:13 +0000 (05:04 +0000)]
New release note:  gvirstor(8).

MFC noted:  camcontrol(8) readcap.

Approved by: re (implicitly)

16 years agoAdd fts_set_clientptr(3), fts_get_clientptr(3) and fts_get_stream(3) man
scf [Fri, 28 Sep 2007 02:22:56 +0000 (02:22 +0000)]
Add fts_set_clientptr(3), fts_get_clientptr(3) and fts_get_stream(3) man
page links to fts(3).

Approved by: wes
Approved by: re (hrs)
MFC after: 5 days

16 years agoOk I hope I got it right this time.
cognet [Thu, 27 Sep 2007 22:39:49 +0000 (22:39 +0000)]
Ok I hope I got it right this time.
After discussion with Sam, switch back to use firmware(9) instead of
having the firmware in hex format.
Put the binary firmware uuencoded into sys/contrib/dev/npe, and slap a
LICENSE file, as found on the Intel website.

Approved by: re (blanket), mux (mentor)
MFC After: 1 week

16 years agoNow that Intel changed the license for the NPE firmware, import it directly
cognet [Thu, 27 Sep 2007 21:18:34 +0000 (21:18 +0000)]
Now that Intel changed the license for the NPE firmware, import it directly
hexed into our tree, instead of requiring the user to download it.

Approved by: re (blanket)
MFC after: 1 week

16 years agoFix a comment to reflect the truth.
cognet [Thu, 27 Sep 2007 20:52:17 +0000 (20:52 +0000)]
Fix a comment to reflect the truth.

Spotted out by: Marius Nuennerich <marius.nuennerich AT gmx D0T de>
Approved by: re (blanket)

16 years agoWhen orphaning a provider, cancel events related to it.
pjd [Thu, 27 Sep 2007 20:18:34 +0000 (20:18 +0000)]
When orphaning a provider, cancel events related to it.
Without this change the following situation was possible:

1. Provider is orphaned from within class' access() method on last write
   close - orphan provider event is send.
2. GEOM detects last write close on a provider and sends new provider event.
3. g_orphan_register() is called, and calls all orphan methods of attached
   consumers.
4. New provider event is executed on orphaned provider, all classes can
   taste already orphaned provider, and some may attach consumers to it.
   Those consumers will never go away, because the g_orphan_register()
   was already called.

We end up with a zombie provider.

With this change, at step 3, we will cancel new provider event.

How to repeat this problem:

# mdconfig -a -t malloc -s 10m
# geli init -i 0 md0
# geli attach md0
# newfs -L test /dev/md0.eli
# mount /dev/ufs/test /mnt/tmp
# geli detach -l md0.eli
# umount /mnt/tmp
# glabel status
            Name  Status  Components
        ufs/test  N/A     N/A

Reviewed by: phk
Approved by: re (kensmith)

16 years agoFix previous commit: I should be in alphabetical order.
rpaulo [Thu, 27 Sep 2007 20:11:32 +0000 (20:11 +0000)]
Fix previous commit: I should be in alphabetical order.

Pointed out by: brueffer
Approved by: re (bmah), njl

16 years ago - Honor the PREEMPTION and FULL_PREEMPTION flags by setting the default
jeff [Thu, 27 Sep 2007 16:39:27 +0000 (16:39 +0000)]
 - Honor the PREEMPTION and FULL_PREEMPTION flags by setting the default
   value for kern.sched.preempt_thresh appropriately.  It can still by
   adjusted at runtime.  ULE will still use IPI_PREEMPT in certain
   migration situations.
 - Assert that we're not trying to compile ULE on an unsupported
   architecture.  To date, I believe only i386 and amd64 have implemented
   the third cpu switch argument required.

Approved by: re

16 years agoForced commit to note repocopy:
bushman [Thu, 27 Sep 2007 12:30:12 +0000 (12:30 +0000)]
Forced commit to note repocopy:

The files were copied in order to rename cached to nscd.

Approved by: re (kensmith), brooks (mentor)

16 years agoAdd myself and my mentor.
rpaulo [Thu, 27 Sep 2007 11:43:56 +0000 (11:43 +0000)]
Add myself and my mentor.

Reviewed by: njl (mentor)
Approved by: re

16 years agoCorrect an error of omission in the reimplementation of the page
alc [Thu, 27 Sep 2007 04:21:59 +0000 (04:21 +0000)]
Correct an error of omission in the reimplementation of the page
cache: vm_object_page_remove() should convert any cached pages that
fall with the specified range to free pages.  Otherwise, there could
be a problem if a file is first truncated and then regrown.
Specifically, some old data from prior to the truncation might reappear.

Generalize vm_page_cache_free() to support the conversion of either a
subset or the entirety of an object's cached pages.

Reported by: tegge
Reviewed by: tegge
Approved by: re (kensmith)

16 years agoFix typo.
brueffer [Wed, 26 Sep 2007 21:31:47 +0000 (21:31 +0000)]
Fix typo.

Approved by: re (blanket)

16 years agoBelatedly add cxgb(4).
brueffer [Wed, 26 Sep 2007 21:30:50 +0000 (21:30 +0000)]
Belatedly add cxgb(4).

Approved by: re (blanket)

16 years agogem(4) works on all archs now.
brueffer [Wed, 26 Sep 2007 21:22:56 +0000 (21:22 +0000)]
gem(4) works on all archs now.

Approved by: re (blanket)

16 years agoo Revert the part of if_gem.c rev. 1.35 which added a call to gem_stop()
marius [Wed, 26 Sep 2007 21:14:18 +0000 (21:14 +0000)]
o Revert the part of if_gem.c rev. 1.35 which added a call to gem_stop()
  to gem_attach() as the former access softc members not yet initialized
  at that time and gem_reset() actually is enough to stop the chip. [1]
o Revise the use of gem_bitwait(); add bus_barrier() calls before calling
  gem_bitwait() to ensure the respective bit has been written before we
  starting polling on it and poll for the right bits to change, f.e. even
  though we only reset RX we have to actually wait for both GEM_RESET_RX
  and GEM_RESET_TX to clear. Add some additional gem_bitwait() calls in
  places we've been missing them according to the GEM documentation.
  Along with this some excessive DELAYs, which probably only were added
  because of bugs in gem_bitwait() and its use in the first place, as
  well as as have of an gem_bitwait() reimplementation in gem_reset_tx()
  were removed.
o Add gem_reset_rxdma() and use it to deal with GEM_MAC_RX_OVERFLOW errors
  more gracefully as unlike gem_init_locked() it resets the RX DMA engine
  only, causing no link loss and the FIFOs not to be cleared. Also use it
  deal with GEM_INTR_RX_TAG_ERR errors, with previously were unhandled.
  This was based on information obtained from the Linux GEM and OpenSolaris
  ERI drivers.
o Turn on workarounds for silicon bugs in the Apple GMAC variants.
  This was based on information obtained from the Darwin GMAC and Linux GEM
  drivers.
o Turn on "infinite" (i.e. maximum 31 * 64 bytes in length) DMA bursts.
  This greatly improves especially RX performance.
o Optimize the RX path, this consists of:
  - kicking the receiver as soon as we've a spare descriptor in gem_rint()
    again instead of just once after all the ready ones have been handled;
  - kicking the receiver the right way, i.e. as outlined in the GEM
    documentation in batches of 4 and by pointing it to the descriptor
    after the last valid one;
  - calling gem_rint() before gem_tint() in gem_intr() as gem_tint() may
    take quite a while;
  - doubling the size of the RX ring to 256 descriptors.
  Overall the RX performance of a GEM in a 1GHz Sun Fire V210 was improved
  from ~100Mbit/s to ~850Mbit/s.
o In gem_add_rxbuf() don't assign the newly allocated mbuf to rxs_mbuf
  before calling bus_dmamap_load_mbuf_sg(), if bus_dmamap_load_mbuf_sg()
  fails we'll free the newly allocated mbuf, unable to recycle the
  previous one but a NULL pointer dereference instead.
o In gem_init_locked() honor the return value of gem_meminit().
o Simplify gem_ringsize() and dont' return garbage in the default case.
  Based on OpenBSD.
o Don't turn on MAC control, MIF and PCS interrupts unless GEM_DEBUG is
  defined as we don't need/use these interrupts for operation.
o In gem_start_locked() sync the DMA maps of the descriptor rings before
  every kick of the transmitter and not just once after enqueuing all
  packets as the NIC might instantly start transmitting after we kicked
  it the first time.
o Keep state of the link state and use it to enable or disable the MAC
  in gem_mii_statchg() accordingly as well as to return early from
  gem_start_locked() in case the link is down. [3]
o Initialize the maximum frame size to a sane value.
o In gem_mii_statchg() enable carrier extension if appropriate.
o Increment if_ierrors in case of an GEM_MAC_RX_OVERFLOW error and in
  gem_eint(). [3]
o Handle IFF_ALLMULTI correctly; don't set it if we've turned promiscuous
  group mode on and don't clear the flag if we've disabled promiscuous
  group mode (these were mostly NOPs though). [2]
o Let gem_eint() also report GEM_INTR_PERR errors.
o Move setting sc_variant from gem_pci_probe() to gem_pci_attach() as
  device probe methods are not supposed to touch the softc.
o Collapse sc_inited and sc_pci into bits for sc_flags.
o Add CTASSERTs ensuring that GEM_NRXDESC and GEM_NTXDESC are set to
  legal values.
o Correctly set up for 802.3x flow control, though #ifdef out the code
  that actually enables it as this needs more testing and mainly a proper
  framework to support it.
o Correct and add some conversions from hard-coded functions names to
  __func__ which were borked or forgotten in if_gem.c rev. 1.42.
o Use PCIR_BAR instead of a homegrown macro.
o Replace sc_enaddr[6] with sc_enaddr[ETHER_ADDR_LEN].
o In gem_pci_attach() in case attaching fails release the resources in
  the opposite order they were allocated.
o Make gem_reset() static to if_gem.c as it's not needed outside that
  module.
o Remove the GEM_GIGABIT flag and the associated code; GEM_GIGABIT was
  never set and the associated code was in the wrong place.
o Remove sc_mif_config; it was only used to cache the contents of the
  respective register within gem_attach().
o Remove the #ifdef'ed out NetBSD/OpenBSD code for establishing a suspend
  hook as it will never be used on FreeBSD.
o Also probe Apple Intrepid 2 GMAC and Apple Shasta GMAC, add support for
  Apple K2 GMAC. Based on OpenBSD.
o Add support for Sun GBE/P cards, or in other words actually add support
  for cards based on GEM to gem(4). This mainly consists of adding support
  for the TBI of these chips. Along with this the PHY selection code was
  rewritten to hardcode the PHY number for certain configurations as for
  example the PHY of the on-board ERI of Blade 1000 shows up twice causing
  no link as the second incarnation is isolated.
  These changes were ported from OpenBSD with some additional improvements
  and modulo some bugs.
o Add code to if_gem_pci.c allowing to read the MAC-address from the VPD on
  systems without Open Firmware.
  This is an improved version of my variant of the respective code in
  if_hme_pci.c
o Now that gem(4) is MI enable it for all archs.

Pointed out by: yongari [1]
Suggested by: rwatson [2], yongari [3]
Tested on: i386 (GEM), powerpc (GMACs by marcel and yongari),
sparc64 (ERI and GEM)
Reviewed by: yongari
Approved by: re (kensmith)

16 years ago- Use the actual clock frequency of the PCI bus instead of assuming
marius [Wed, 26 Sep 2007 20:10:36 +0000 (20:10 +0000)]
- Use the actual clock frequency of the PCI bus instead of assuming
  33MHz for calculating the latency timer values for its children.
  Inspired by NetBSD doing the same and Linux as well as OpenSolaris
  using a similar approach.
  While at it rename a variable and change its type to be more
  appropriate fuer values of PCI properties so the variable can be
  more easily reused.
- Initialize the cache line size register of PCI devices to a
  legal value; the cache line size is limited to 64 bytes by the
  Fireplane/Safari, JBus and UPA interconnection busses. Setting
  it to an unsupported value caused bad performance at least with
  GEM as it causes them to not do cache line bursts and to not
  issue cache line commands on the PCI bus.

Approved by: re (kensmith)
MFC after: 1 week

16 years agoUse the correct expanded name for SCTP.
brueffer [Wed, 26 Sep 2007 20:05:07 +0000 (20:05 +0000)]
Use the correct expanded name for SCTP.

PR: 116496
Submitted by: koitsu
Reviewed by: rrs
Approved by: re (kensmith)

16 years agoFix the description of the formula used to autosize the number of
ru [Wed, 26 Sep 2007 11:22:23 +0000 (11:22 +0000)]
Fix the description of the formula used to autosize the number of
buffers in the buffer cache.

Approved by: re (kensmith)

16 years agoMention that autoboot_delay also accepts the "NO" value.
ru [Wed, 26 Sep 2007 08:38:25 +0000 (08:38 +0000)]
Mention that autoboot_delay also accepts the "NO" value.

Approved by: re (kensmith)

16 years agoForce -O1 compilation when targeted for ia64. GCC 4 generates
marcel [Wed, 26 Sep 2007 01:31:28 +0000 (01:31 +0000)]
Force -O1 compilation when targeted for ia64. GCC 4 generates
bad code at -O2. Since this is likely caused by the low-level
optimizer, testing TARGET_ARCH rather than MACHINE_ARCH should
handle ia64 cross-compilation as well. With this work-around
in place, we can release using the current GCC and Binutils
code at the default optimization level on ia64.

Approved by: re (kensmith)

16 years agoFix possible uninitialized variable insert due to previous commit.
edwin [Tue, 25 Sep 2007 21:41:22 +0000 (21:41 +0000)]
Fix possible uninitialized variable insert due to previous commit.

Pointy hat to: me and my absence of -Wall in my CFLAGS.

MFC will happen at the same time of the earlier commit.

Thanks to ru@ for spotting.

Approved by: re (Ken Smith), grog@ (mentor)

16 years agoFix for a very rare race, caused by the nfsiod wakeup and nfsiod idle
mohans [Tue, 25 Sep 2007 21:08:49 +0000 (21:08 +0000)]
Fix for a very rare race, caused by the nfsiod wakeup and nfsiod idle
timeout occurring at exactly the same time. If this happens, the nfsiod
exits although there may be a queued async IO request for it.

Found by : Kris Kennaway
Approved by: re

16 years agoif_axe.c 1.54 and if_axereg.h 1.15 were obtained from OpenBSD.
imp [Tue, 25 Sep 2007 21:08:33 +0000 (21:08 +0000)]
if_axe.c 1.54 and if_axereg.h 1.15 were obtained from OpenBSD.

Pointed out by: sam@
Obtained from: openbsd (prev rev)
Approved by: re@
Pointy stick to the eye: imp@

16 years agoCorrect an error in the previous revision, specifically,
alc [Tue, 25 Sep 2007 21:01:10 +0000 (21:01 +0000)]
Correct an error in the previous revision, specifically,
vm_object_madvise() should request that the reactivated, cached page
not be busied.

Reported by: Rink Springer
Approved by: re (kensmith)

16 years agoAdd support for the AX88178 and AX88772 based devices.
imp [Tue, 25 Sep 2007 20:47:24 +0000 (20:47 +0000)]
Add support for the AX88178 and AX88772 based devices.

Submitted by: sam@
Approved by: re@ (blanket)

16 years agoAssorted spelling, punctuation and mdoc fixes.
brueffer [Tue, 25 Sep 2007 16:48:08 +0000 (16:48 +0000)]
Assorted spelling, punctuation and mdoc fixes.

Approved by: re (blanket)

16 years agoo enable use of EAP methods w/o modification to the base system; use
sam [Tue, 25 Sep 2007 16:08:16 +0000 (16:08 +0000)]
o enable use of EAP methods w/o modification to the base system; use
  WPA_SUPPLICANT_CFLAGS, etc. (consult the Makefile's for details)
o enable ipv6 support in hostapd (for communication w/ a radius backend)

PR: bin/116164
Submitted by: "Scot Hetzel" <swhetzel@gmail.com>
Approved by: re (gnn)
MFC after: 2 weeks

16 years ago- Use the correct expanded name for SCTP (1)
brueffer [Tue, 25 Sep 2007 16:03:10 +0000 (16:03 +0000)]
- Use the correct expanded name for SCTP (1)
- Remove empty section

PR: 116496 (1)
Submitted by: koitsu
Approved by: re (blanket)

16 years agoChange the management of cached pages (PQ_CACHE) in two fundamental
alc [Tue, 25 Sep 2007 06:25:06 +0000 (06:25 +0000)]
Change the management of cached pages (PQ_CACHE) in two fundamental
ways:

(1) Cached pages are no longer kept in the object's resident page
splay tree and memq.  Instead, they are kept in a separate per-object
splay tree of cached pages.  However, access to this new per-object
splay tree is synchronized by the _free_ page queues lock, not to be
confused with the heavily contended page queues lock.  Consequently, a
cached page can be reclaimed by vm_page_alloc(9) without acquiring the
object's lock or the page queues lock.

This solves a problem independently reported by tegge@ and Isilon.
Specifically, they observed the page daemon consuming a great deal of
CPU time because of pages bouncing back and forth between the cache
queue (PQ_CACHE) and the inactive queue (PQ_INACTIVE).  The source of
this problem turned out to be a deadlock avoidance strategy employed
when selecting a cached page to reclaim in vm_page_select_cache().
However, the root cause was really that reclaiming a cached page
required the acquisition of an object lock while the page queues lock
was already held.  Thus, this change addresses the problem at its
root, by eliminating the need to acquire the object's lock.

Moreover, keeping cached pages in the object's primary splay tree and
memq was, in effect, optimizing for the uncommon case.  Cached pages
are reclaimed far, far more often than they are reactivated.  Instead,
this change makes reclamation cheaper, especially in terms of
synchronization overhead, and reactivation more expensive, because
reactivated pages will have to be reentered into the object's primary
splay tree and memq.

(2) Cached pages are now stored alongside free pages in the physical
memory allocator's buddy queues, increasing the likelihood that large
allocations of contiguous physical memory (i.e., superpages) will
succeed.

Finally, as a result of this change long-standing restrictions on when
and where a cached page can be reclaimed and returned by
vm_page_alloc(9) are eliminated.  Specifically, calls to
vm_page_alloc(9) specifying VM_ALLOC_INTERRUPT can now reclaim and
return a formerly cached page.  Consequently, a call to malloc(9)
specifying M_NOWAIT is less likely to fail.

Discussed with: many over the course of the summer, including jeff@,
   Justin Husted @ Isilon, peter@, tegge@
Tested by: an earlier version by kris@
Approved by: re (kensmith)

16 years agoAllow the ia32 resource limits (compat.ia32.max{dsiz,ssiz,vmem} to be
jhb [Mon, 24 Sep 2007 20:49:39 +0000 (20:49 +0000)]
Allow the ia32 resource limits (compat.ia32.max{dsiz,ssiz,vmem} to be
set via loader tunables.  They are already tunable via sysctl.

MFC after: 1 week
Approved by: re (kensmith)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r172314,
jkim [Mon, 24 Sep 2007 17:12:36 +0000 (17:12 +0000)]
This commit was generated by cvs2svn to compensate for changes in r172314,
which included commits to RCS files with non-trunk default branches.

16 years agoFix global lock recursion bug.
jkim [Mon, 24 Sep 2007 17:12:36 +0000 (17:12 +0000)]
Fix global lock recursion bug.

This patch was part of ACPI-CA 20070508 release and the
following is excerpt from its change log:

Fixed a problem where the Global Lock handle was not properly
updated if a thread that acquired the Global Lock via executing
AML code then attempted to acquire the lock via the
AcpiAcquireGlobalLock interface. Reported by Joe Liu.

Approved by: re (kensmith)
Tested by: ambrisko
Obtained from: Intel

16 years agoRewrite the EC driver event model. The main goal is to avoid
njl [Mon, 24 Sep 2007 16:59:06 +0000 (16:59 +0000)]
Rewrite the EC driver event model.  The main goal is to avoid
polling/interrupt-driven fallback and instead use polling only during
boot and pure interrupt-driven mode after boot.  Polled mode could be
relegated completely to a legacy role if we could enable interrupts
during boot.  Polled mode can be forced after boot by setting
debug.acpi.ec.polled="1", i.e. if there are timeouts.

- Use polling only during boot, shutdown, or if requested by the user.
  Otherwise, use a generation count of GPEs, incremented atomically.  This
  prevents an old status value from being used if the EC is really slow
  and the same condition (i.e. multiple IBEs for a write transaction) is
  being checked.
- Check for and run the query handler directly if the SCI bit is set in
  the status register during boot.  Previously, the query handler wouldn't
  run until interrupts were finally enabled late in boot.
- During boot and after starting a command, check if the event appears
  to already have occurred before we even start waiting.  If so, it's
  possible the EC is very slow and we might accept an old status value.
  Print a warning in this case.  Once we've booted, interrupt-driven mode
  should work just fine but polled mode could be unreliable.  There's not
  much more we can do about this until interrupts are enabled during boot.
- In the above case, we also do one final check if the interrupt-driven
  mode gets a timeout.  If the status is complete, it will force the
  system back into polled mode since interrupt mode doesn't work.  For
  polled mode during boot, if the status appears to be already complete
  before beginning the check loop, it waits 10 us before actually checking
  the status, just in case the EC is really slow and hasn't gotten to work
  on the new request yet.
- Use upper-case hex for the _Qxx method
- Use device_printf for errors, don't hide them under verbose
- Increase default total timeout to 750 ms and decrease polling interval
  to 5 us.
- Don't pass the status value via the softc.  Just read it directly.
- Remove the mutex. We use the sx lock for transaction serialization
  with the query handler.
- Remove the Intel copyright notice as no code of theirs was ever
  present in this file (verified against rev 1.1)
- Allow KTR module-only builds for ease of testing

Thanks to jkim and Alexey Starikovskiy for helpful discussions and testing.

Approved by: re
MFC after: 2 weeks

16 years agoRevert rev. 1.94. After recent tcp backouts, tcp_close() may return NULL.
kib [Mon, 24 Sep 2007 14:46:27 +0000 (14:46 +0000)]
Revert rev. 1.94. After recent tcp backouts, tcp_close() may return NULL.
Check the return value of tcp_close() being NULL before dereferencing it
in #ifdef TCPDEBUG block.

Reviewed by: rwatson
Approved by: re (gnn)

16 years agoForced commit to note, that the last commit fixed my bug, and was not
pjd [Mon, 24 Sep 2007 06:14:27 +0000 (06:14 +0000)]
Forced commit to note, that the last commit fixed my bug, and was not
because of differences between how tinderbox compile LINT - after this
change I only compiled LINT on i386 and the bug shows up on 64bit platforms.

Requested by: des
Approved by: re (implicitly)

16 years agoTwo changes:
silby [Mon, 24 Sep 2007 05:26:24 +0000 (05:26 +0000)]
Two changes:

- Reintegrate the ANSI C function declaration change
  from tcp_timer.c rev 1.92

- Reorganize the tcpcb structure so that it has a single
  pointer to the "tcp_timer" structure which contains all
  of the tcp timer callouts.  This change means that when
  the single tcp timer change is reintegrated, tcpcb will
  not change in size, and therefore the ABI between
  netstat and the kernel will not change.

Neither of these changes should have any functional
impact.

Reviewed by: bmah, rrs
Approved by: re (bmah)

16 years ago - Bound the interactivity score so that it cannot become negative.
jeff [Mon, 24 Sep 2007 00:28:54 +0000 (00:28 +0000)]
 - Bound the interactivity score so that it cannot become negative.

Approved by: re