]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoUuencode the sample "binary" firmware image file (instead of explicitly
Ed Maste [Fri, 1 Apr 2011 23:47:10 +0000 (23:47 +0000)]
Uuencode the sample "binary" firmware image file (instead of explicitly
adding \0 bytes).  This is a technique that would be used in an actual
driver and is more suitable as an example.

Reviewed by:    mlaier

13 years agoFix the delete-old/check-old targets to work with arbitrarily long
Ulrich Spörlein [Fri, 1 Apr 2011 20:59:23 +0000 (20:59 +0000)]
Fix the delete-old/check-old targets to work with arbitrarily long
OLD_FILES/OLD_DIRS/OLD_LIBS lists.

If you specify enough WITHOUT_FOO flags, the argument list passed to the
shell will be too long. Using .for/.endfor make(1) "loop" will make the
parser of the Makefile explode. Hack around this with good old pipes.

No objections: netchild
Reported by: b.f.

13 years agoFix to an error condition case, when an mbuf chain
Jack F Vogel [Fri, 1 Apr 2011 20:24:51 +0000 (20:24 +0000)]
Fix to an error condition case, when an mbuf chain
get's defragged due to a mapping failure the header
pointers will be invalidated and can result in a
TSO or other failure down the line. So, when the
remapping occurs force a retry thru the offload
calculation code. Thanks to Andrew Boyer for discovering
this and cooking up the fix!!

13 years agoFix mdoc errors.
Konstantin Belousov [Fri, 1 Apr 2011 19:57:27 +0000 (19:57 +0000)]
Fix mdoc errors.

Submitted by: ru
MFC after: 3 days

13 years agoPartially revert r184106. RX buffer ring also needs bus_dmamap_sync().
Pyun YongHyeon [Fri, 1 Apr 2011 18:53:41 +0000 (18:53 +0000)]
Partially revert r184106. RX buffer ring also needs bus_dmamap_sync().

Tested by: Yamagi Burmeister (lists <> yamagi dot org)
MFC after: 1 week

13 years agoChange the refresh_mbuf logic slightly, add an inline
Jack F Vogel [Fri, 1 Apr 2011 18:48:31 +0000 (18:48 +0000)]
Change the refresh_mbuf logic slightly, add an inline
to calculate the outstanding descriptors that need to be
refreshed at any time, and use THAT in rxeof to determine
if refreshing needs to be done. Also change the local_timer
to simply fire off the appropriate interrupt rather than
schedule a tasklet, its simpler.

MFC in two weeks

13 years ago64bit DMA caused data corruption. Unfortunately there is no known
Pyun YongHyeon [Fri, 1 Apr 2011 16:45:26 +0000 (16:45 +0000)]
64bit DMA caused data corruption. Unfortunately there is no known
workaround to use 64bit DMA.
Disable 64bit DMA on Attansic L1 controller.

Tested by: Yamagi Burmeister (lists <> yamagi dot org)
MFC after: 1 week

13 years agoDo not allow recursive RFC3173 IPComp payload.
Bjoern A. Zeeb [Fri, 1 Apr 2011 14:13:49 +0000 (14:13 +0000)]
Do not allow recursive RFC3173 IPComp payload.

Reviewed by: Tavis Ormandy (taviso cmpxchg8b.com)
MFC after: 5 days
Security: CVE-2011-1547

13 years agoAfter the r219999 is merged to stable/8, rename fallocf(9) to falloc(9)
Konstantin Belousov [Fri, 1 Apr 2011 13:28:34 +0000 (13:28 +0000)]
After the r219999 is merged to stable/8, rename fallocf(9) to falloc(9)
and remove the falloc() version that lacks flag argument. This is done
to reduce the KPI bloat.

Requested by: jhb
X-MFC-note: do not

13 years agoMinor tweaks to the man page:
Warner Losh [Fri, 1 Apr 2011 11:39:13 +0000 (11:39 +0000)]
Minor tweaks to the man page:
o Remove bogus ordering info
o 3C1 actually works, so remove that
o Add warning about making sure BIOS is configured properly for PnP
  configured 3c509 cards.

13 years agoRegen
Konstantin Belousov [Fri, 1 Apr 2011 11:16:53 +0000 (11:16 +0000)]
Regen

13 years agoAdd support for executing the FreeBSD 1/i386 a.out binaries on amd64.
Konstantin Belousov [Fri, 1 Apr 2011 11:16:29 +0000 (11:16 +0000)]
Add support for executing the FreeBSD 1/i386 a.out binaries on amd64.

In particular:
- implement compat shims for old stat(2) variants and ogetdirentries(2);
- implement delivery of signals with ancient stack frame layout and
  corresponding sigreturn(2);
- implement old getpagesize(2);
- provide a user-mode trampoline and LDT call gate for lcall $7,$0;
- port a.out image activator and connect it to the build as a module
  on amd64.

The changes are hidden under COMPAT_43.

MFC after:   1 month

13 years agoAdd a missing .El macro.
Lawrence Stewart [Fri, 1 Apr 2011 06:28:21 +0000 (06:28 +0000)]
Add a missing .El macro.

13 years agoAdd 'mos' interface to NOTES
Kevin Lo [Fri, 1 Apr 2011 03:41:41 +0000 (03:41 +0000)]
Add 'mos' interface to NOTES

13 years ago- Minor style(9) cleanup
Kevin Lo [Fri, 1 Apr 2011 03:27:55 +0000 (03:27 +0000)]
- Minor style(9) cleanup
- Make functions static

13 years agoMake bxe(4) build with BXE_DEBUG.
Pyun YongHyeon [Fri, 1 Apr 2011 01:30:21 +0000 (01:30 +0000)]
Make bxe(4) build with BXE_DEBUG.

13 years agoUnbreak installworld after r220205.
Ed Maste [Fri, 1 Apr 2011 01:13:30 +0000 (01:13 +0000)]
Unbreak installworld after r220205.

Noticed by: np
Pointy hat to: emaste

13 years agoUpdate header and related code for firmware 1.3.8
Navdeep Parhar [Fri, 1 Apr 2011 00:40:24 +0000 (00:40 +0000)]
Update header and related code for firmware 1.3.8

MFC after: 3 days

13 years agoAllow multiple modules within sys/modules/cxgbe. The first one is if_cxgbe.
Navdeep Parhar [Fri, 1 Apr 2011 00:25:32 +0000 (00:25 +0000)]
Allow multiple modules within sys/modules/cxgbe.  The first one is if_cxgbe.

MFC after: 3 days

13 years ago- Fixed build problem when not useing BXE_DEBUG.
David Christensen [Thu, 31 Mar 2011 22:50:55 +0000 (22:50 +0000)]
- Fixed build problem when not useing BXE_DEBUG.

MFC after: One week.

13 years ago- Freshened debug support code.
David Christensen [Thu, 31 Mar 2011 22:40:44 +0000 (22:40 +0000)]
- Freshened debug support code.
- Renamed several RX variable for more consistent usage.
- Fixed a potential problem when masking RX CQ producer value.

MFC after: One week.

13 years ago- Fixed DMA engine errors by increasing timeouts to 200ms for reads/writes.
David Christensen [Thu, 31 Mar 2011 22:04:00 +0000 (22:04 +0000)]
- Fixed DMA engine errors by increasing timeouts to 200ms for reads/writes.
- Improved some error reporting calls to include file name/line number.
- Various style(9) fixes.

MFC after: One week.

13 years agoGNU awk does not output escaped newlines in multi-line printc statements. This
Ryan Stone [Thu, 31 Mar 2011 21:33:33 +0000 (21:33 +0000)]
GNU awk does not output escaped newlines in multi-line printc statements. This
leads to compile errors when trying to compile firmware(9) stubs created with
gawk, as multiple #include statements end up on the same line.  Replace the
multi-line printc statement that outputs all of the #includes with one printc
per #include.  This allows modules compatible with firmware(9) to be cross-built
from a Linux machine without requiring the one true awk to be installed.

I've intentionally done the minimal set of changes necessary to make gawk
produce valid (but not pretty) C code, to reduce the churn and keep fw_stubs.awk
as readable as possible.

Approved by: emaste (mentor)
MFC after: 2 weeks

13 years ago- Added debug support to monitor mbuf defrag attempts/failures.
David Christensen [Thu, 31 Mar 2011 21:30:00 +0000 (21:30 +0000)]
- Added debug support to monitor mbuf defrag attempts/failures.

MFC after: One week.

13 years ago- Print number of queues when RSS is enabled.
David Christensen [Thu, 31 Mar 2011 21:01:10 +0000 (21:01 +0000)]
- Print number of queues when RSS is enabled.
- Improve reporting of media type (not always 10GBase-CX4).

MFC after: One week

13 years ago- Fixed a problem where the stack passed a TSO frame larger than the 64K
David Christensen [Thu, 31 Mar 2011 20:46:50 +0000 (20:46 +0000)]
- Fixed a problem where the stack passed a TSO frame larger than the 64K
  size allowed by the DMA descriptor for TSO frames.

MFC after:      One week

13 years agoEnable accounting for RACCT_NPROC and RACCT_NTHR.
Edward Tomasz Napierala [Thu, 31 Mar 2011 19:22:11 +0000 (19:22 +0000)]
Enable accounting for RACCT_NPROC and RACCT_NTHR.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoNotify racct when process credentials change.
Edward Tomasz Napierala [Thu, 31 Mar 2011 18:12:04 +0000 (18:12 +0000)]
Notify racct when process credentials change.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoFill up src_port and dst_port variables for SCTP over IPv4.
Andrey V. Elsukov [Thu, 31 Mar 2011 16:30:14 +0000 (16:30 +0000)]
Fill up src_port and dst_port variables for SCTP over IPv4.

PR: kern/153415
MFC after: 1 week

13 years agoBunch of small bugfixes and cleanups.
Alexander Motin [Thu, 31 Mar 2011 16:19:53 +0000 (16:19 +0000)]
Bunch of small bugfixes and cleanups.

Found with: Clang Static Analyzer

13 years agoBunch of small bugfixes and cleanups.
Alexander Motin [Thu, 31 Mar 2011 16:14:35 +0000 (16:14 +0000)]
Bunch of small bugfixes and cleanups.

Found with:     Coverity Prevent(tm)
CID:            9656, 9658, 9693, 9705, 9706, 9707, 9808, 9809, 9810,
9711, 9712, 9713, 9714

13 years agoOptimisation in IPSEC(4):
Fabien Thomas [Thu, 31 Mar 2011 15:23:32 +0000 (15:23 +0000)]
Optimisation in IPSEC(4):
- Remove contention on ISR during the crypto operation by using rwlock(9).
- Remove a second lookup of the SA in the callback.

Gain on 6 cores CPU with SHA1/AES128 can be up to 30%.

Reviewed by: vanhu
MFC after: 1 month

13 years agoAvoid having a binary file in our source tree and instead create it at
Ed Maste [Thu, 31 Mar 2011 15:12:40 +0000 (15:12 +0000)]
Avoid having a binary file in our source tree and instead create it at
build time, to avoid possible grief maintaining FreeBSD source in
alternative version control tools.

13 years agoFix malloc types.
Andrey V. Elsukov [Thu, 31 Mar 2011 15:11:12 +0000 (15:11 +0000)]
Fix malloc types.

MFC after: 1 week

13 years agoFix a memory leak. Memory that is allocated for schedulers hash table
Andrey V. Elsukov [Thu, 31 Mar 2011 15:10:41 +0000 (15:10 +0000)]
Fix a memory leak. Memory that is allocated for schedulers hash table
was not freed.

PR: kern/156083
MFC after: 1 week

13 years agoRemove $Log$ keyword, which can cause annoyance in diffs in some cases.
Ed Maste [Thu, 31 Mar 2011 14:35:33 +0000 (14:35 +0000)]
Remove $Log$ keyword, which can cause annoyance in diffs in some cases.
Revision control tools have a history command to obtain this information.

13 years agoRemove $Log$ keyword and associated history, which can cause annoyance in
Ed Maste [Thu, 31 Mar 2011 14:33:27 +0000 (14:33 +0000)]
Remove $Log$ keyword and associated history, which can cause annoyance in
diffs in some cases.  Revision control tools have a history command to
obtain this information.

13 years agoClearing the flag when preempting will let the preempted thread run
Fabien Thomas [Thu, 31 Mar 2011 13:59:47 +0000 (13:59 +0000)]
Clearing the flag when preempting will let the preempted thread run
too much time. This can finish in a scheduler deadlock with ping-pong
between two threads.

One sample of this is:
- device lapic (to have a preemption point on critical_exit())
- options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq)
- running a cpu intensive task (that does not enter the kernel)
- only one CPU on SMP or no SMP.

As requested by jhb@ 4BSD have received the same type of fix instead of
propagating the flag to the new thread.

Reviewed by: jhb, jeff
MFC after: 1 month

13 years agoExplicitly track the state of all known BARs for each PCI device. The PCI
John Baldwin [Thu, 31 Mar 2011 13:22:12 +0000 (13:22 +0000)]
Explicitly track the state of all known BARs for each PCI device.  The PCI
bus driver will now remember the size of a BAR obtained during the initial
bus scan and use that size when doing lazy resource allocation rather than
resizing the BAR.  The bus driver will now also report unallocated BARs to
userland for display by 'pciconf -lb'.  Psuedo-resources that are not BARs
(such as the implicit I/O port resources for master/slave ATA controllers)
will no longer be listed as BARs in 'pciconf -lb'.  During resume, BARs are
restored from their new saved state instead of having the raw registers
saved and restored across resume.  This also fixes restoring BARs at
unusual loactions if said BAR has been allocated by a driver.

Add a constant for the offset of the ROM BIOS BAR in PCI-PCI bridges and
properly handle ROM BIOS BARs in PCI-PCI bridges.  The PCI bus now also
properly handles the lack of a ROM BIOS BAR in a PCI-Cardbus bridge.

Tested by: jkim

13 years agoFix two SA refcount:
Fabien Thomas [Thu, 31 Mar 2011 13:14:24 +0000 (13:14 +0000)]
Fix two SA refcount:
- AH does not release the SA like in ESP/IPCOMP when handling EAGAIN
- ipsec_process_done incorrectly release the SA.

Reviewed by: vanhu
MFC after: 1 week

13 years agoath_ahb shouldn't be compiled normally; it is atheros chip specific.
Adrian Chadd [Thu, 31 Mar 2011 12:03:30 +0000 (12:03 +0000)]
ath_ahb shouldn't be compiled normally; it is atheros chip specific.
Remove it from here; users can compile it manually if needed.

13 years agoIntroduce AH_AR5416_INTERRUPT_MITIGATION which enables interrupt mitigation for
Adrian Chadd [Thu, 31 Mar 2011 08:48:05 +0000 (08:48 +0000)]
Introduce AH_AR5416_INTERRUPT_MITIGATION which enables interrupt mitigation for
the AR5416 and later. Rename the older HAL option to use this.

13 years agoDocument the ath glue changes.
Adrian Chadd [Thu, 31 Mar 2011 08:32:53 +0000 (08:32 +0000)]
Document the ath glue changes.

13 years agoRevert r220032:linux compat: add SO_PASSCRED option with basic handling
Andriy Gapon [Thu, 31 Mar 2011 08:14:51 +0000 (08:14 +0000)]
Revert r220032:linux compat: add SO_PASSCRED option with basic handling

I have not properly thought through the commit.  After r220031 (linux
compat: improve and fix sendmsg/recvmsg compatibility) the basic
handling for SO_PASSCRED is not sufficient as it breaks recvmsg
functionality for SCM_CREDS messages because now we would need to handle
sockcred data in addition to cmsgcred.  And that is not implemented yet.

Pointyhat to: avg

13 years agoBreak out the ath PCI logic into a separate device/module.
Adrian Chadd [Thu, 31 Mar 2011 08:07:13 +0000 (08:07 +0000)]
Break out the ath PCI logic into a separate device/module.

Introduce the AHB glue for Atheros embedded systems. Right now it's
hard-coded for the AR9130 chip whose support isn't yet in this HAL;
it'll be added in a subsequent commit.

Kernel configuration files now need both 'ath' and 'ath_pci' devices; both
modules need to be loaded for the ath device to work.

13 years agoRemove unneeded checks, g_new_xxx functions can not return NULL.
Andrey V. Elsukov [Thu, 31 Mar 2011 06:30:59 +0000 (06:30 +0000)]
Remove unneeded checks, g_new_xxx functions can not return NULL.

Reviewed by: pjd
MFC after: 1 week

13 years agoAdd relation to my mentor (ehaupt)
Ganael LAPLANCHE [Thu, 31 Mar 2011 06:11:49 +0000 (06:11 +0000)]
Add relation to my mentor (ehaupt)

13 years agoImplement AR724x USB initialisation code.
Adrian Chadd [Thu, 31 Mar 2011 02:36:22 +0000 (02:36 +0000)]
Implement AR724x USB initialisation code.

This (again) still requires an offset for the AR913x/AR724x before USB will
function.

Submitted by: Luiz Otavio O Souzau <loos.br@gmail.com>

13 years agoIncrease debug level on g_gate device destruction and add message on
Mikolaj Golub [Wed, 30 Mar 2011 21:40:14 +0000 (21:40 +0000)]
Increase debug level on g_gate device destruction and add message on
device creation.

Suggested by: danger
Approved by: pjd (mentor)
MFC after: 3 days

13 years agoAdd a menu entry for UTC in the main menu.
Edwin Groothuis [Wed, 30 Mar 2011 21:33:23 +0000 (21:33 +0000)]
Add a menu entry for UTC in the main menu.

PR: bin/156019
Submitted by: Daniel O'Conner
Reviewed by: Garrett Cooper <gcooper@FreeBSD.org>
MFC after: 1 week

13 years agoFix grammar and bump date.
Edward Tomasz Napierala [Wed, 30 Mar 2011 20:13:55 +0000 (20:13 +0000)]
Fix grammar and bump date.

Submitted by: trociny

13 years agoAdd example devd.conf entry.
Edward Tomasz Napierala [Wed, 30 Mar 2011 18:35:02 +0000 (18:35 +0000)]
Add example devd.conf entry.

13 years agoAdd startup script, to load rules from /etc/rctl.conf.
Edward Tomasz Napierala [Wed, 30 Mar 2011 18:32:45 +0000 (18:32 +0000)]
Add startup script, to load rules from /etc/rctl.conf.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (ealier version)

13 years agoAdd rctl(8), the utility to manage rctl rules.
Edward Tomasz Napierala [Wed, 30 Mar 2011 18:27:52 +0000 (18:27 +0000)]
Add rctl(8), the utility to manage rctl rules.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoExpose the rctl(2) API in libc.
Edward Tomasz Napierala [Wed, 30 Mar 2011 18:08:31 +0000 (18:08 +0000)]
Expose the rctl(2) API in libc.

13 years agoRegenerate.
Edward Tomasz Napierala [Wed, 30 Mar 2011 17:59:54 +0000 (17:59 +0000)]
Regenerate.

13 years agoAdd rctl. It's used by racct to take user-configurable actions based
Edward Tomasz Napierala [Wed, 30 Mar 2011 17:48:15 +0000 (17:48 +0000)]
Add rctl.  It's used by racct to take user-configurable actions based
on the set of rules it maintains and the current resource usage.  It also
privides userland API to manage that ruleset.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoCheck in two missing files missed in cleanup.
Josh Paetzel [Wed, 30 Mar 2011 17:37:04 +0000 (17:37 +0000)]
Check in two missing files missed in cleanup.
Change expr to $(())
Switch test from "$?" = "0" to $? -eq 0

Approved by: kib (mentor)

13 years agoFix syntax error from previous commit.
Josh Paetzel [Wed, 30 Mar 2011 17:33:52 +0000 (17:33 +0000)]
Fix syntax error from previous commit.

Approved by: kib (mentor)

13 years agoRegen.
Konstantin Belousov [Wed, 30 Mar 2011 14:46:55 +0000 (14:46 +0000)]
Regen.

13 years agoProvide compat32 shims for kldstat(2).
Konstantin Belousov [Wed, 30 Mar 2011 14:46:12 +0000 (14:46 +0000)]
Provide compat32 shims for kldstat(2).

Requested and tested by: jpaetzel
MFC after: 1 week

13 years agoUse FD_CLOEXEC explicitly.
Sergey Kandaurov [Wed, 30 Mar 2011 14:15:18 +0000 (14:15 +0000)]
Use FD_CLOEXEC explicitly.

MFC after: 3 days

13 years agoClamp the initial advertised receive window when responding to a SYN/ACK
John Baldwin [Wed, 30 Mar 2011 12:35:39 +0000 (12:35 +0000)]
Clamp the initial advertised receive window when responding to a SYN/ACK
to the maximum allowed window.  Growing the window too large would cause
an underflow in the calculations in tcp_output() to decide if a window
update should be sent which would prevent the persist timer from being
started if data was pending and the other end of the connection advertised
an initial window size of 0.

PR: kern/154006
Submitted by: Stefan `Sec` Zehl  sec 42 org
Reviewed by: bz
MFC after: 1 week

13 years agoRemove duplicate sentence.
Andrey V. Elsukov [Wed, 30 Mar 2011 11:34:40 +0000 (11:34 +0000)]
Remove duplicate sentence.

13 years agoRemove the reference to pseudo-terminals from the description.
Ed Schouten [Wed, 30 Mar 2011 08:22:29 +0000 (08:22 +0000)]
Remove the reference to pseudo-terminals from the description.

Pseudo-terminals are no longer listed in this file, since the utmpx
implementation doesn't depend on ttyslot().

13 years agoReplace ${SYSCTL_W} with ${SYSCTL} in rc.d scripts, as they are identical.
Ed Maste [Wed, 30 Mar 2011 01:19:00 +0000 (01:19 +0000)]
Replace ${SYSCTL_W} with ${SYSCTL} in rc.d scripts, as they are identical.
This is a further clean up after r202988.

SYSCTL_W is still initialized in rc.subr as some ports may still use it.

13 years agoThis patch fixes the Experimental NFS client to properly deal with 32 bit or 64
Zack Kirsch [Wed, 30 Mar 2011 01:10:11 +0000 (01:10 +0000)]
This patch fixes the Experimental NFS client to properly deal with 32 bit or 64
bit fileid's in NFSv2 and NFSv3. Without this fix, invalid casting (and sign
extension) was creating problems for any fileid greater than 2^31.

We discovered this because we have test clusters with more than 2 billion
allocated files and 64-bit ino_t's (and friend structures).

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoUpgrade of base gcc and libstdc++ to the last GPLv2-licensed revision
Martin Matuska [Tue, 29 Mar 2011 20:53:51 +0000 (20:53 +0000)]
Upgrade of base gcc and libstdc++ to the last GPLv2-licensed revision
(rev. 127959 of gcc-4_2-branch).

Resolved GCC bugs:
c++: 17763, 29365, 30535, 30917, 31337, 31941, 32108, 32112, 32346,
     32898, 32992
debug: 32610, 32914
libstdc++: 33084, 33128
middle-end: 32563
rtl-optimization: 33148
tree-optimization: 25413, 32723
target: 32218

Tested by: pointyhat (miwi)
Obtained from: gcc (gcc-4_2-branch up to rev. 127959)
PR: gnu/153298, gnu/153959, gnu/154385
MFC after: 1 month

13 years agoAllocate memory for a DMA method table only in case we need to override
Marius Strobl [Tue, 29 Mar 2011 19:48:03 +0000 (19:48 +0000)]
Allocate memory for a DMA method table only in case we need to override
the iommu(4) provided one, i.e. in case of Hummingbird and Sabre bridges,
otherwise just use the iommu(4) one. This also fixes a bug introduced in
r220039 which caused an empty DMA method table to be used for the second
of a pair of Psycho bridges.

13 years agoRemove pointless (always true) KASSERTs.
Edward Tomasz Napierala [Tue, 29 Mar 2011 19:19:10 +0000 (19:19 +0000)]
Remove pointless (always true) KASSERTs.

Submitted by: pjd

13 years agoRevert file added in a wrong place by mistake. D'oh.
Edward Tomasz Napierala [Tue, 29 Mar 2011 18:44:07 +0000 (18:44 +0000)]
Revert file added in a wrong place by mistake.  D'oh.

13 years agoRevert part of r220137, committed by mistake - RACCT is _not_ supposed
Edward Tomasz Napierala [Tue, 29 Mar 2011 18:16:49 +0000 (18:16 +0000)]
Revert part of r220137, committed by mistake - RACCT is _not_ supposed
to be enabled in GENERIC.

13 years agoAdd racct. It's an API to keep per-process, per-jail, per-loginclass
Edward Tomasz Napierala [Tue, 29 Mar 2011 17:47:25 +0000 (17:47 +0000)]
Add racct.  It's an API to keep per-process, per-jail, per-loginclass
and per-loginclass resource accounting information, to be used by the new
resource limits code.  It's connected to the build, but the code that
actually calls the new functions will come later.

Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)

13 years agoAccording to ath9k recv.c, one shouldn't be doing self-linked descriptors
Adrian Chadd [Tue, 29 Mar 2011 15:59:07 +0000 (15:59 +0000)]
According to ath9k recv.c, one shouldn't be doing self-linked descriptors
in the RX path when doing 11n and block-ack'ed frames. Apparently, the MAC
will loop over that self-linked descriptor and treat it as "good enough"
for (incorrectly!) ACKing the frames in the block-ack.

Until I figure out how to work around this issue in the future, this counter
will tell me if packet RX processing ever gets to the point where it's
touching the self-linked descriptor. If there's ever enough packets to get
to that point, BA's will be invalid and likely very unhappy.

13 years ago- Enable an extra debugging bootverbose printf when probing ISA PNP cards
John Baldwin [Tue, 29 Mar 2011 12:38:13 +0000 (12:38 +0000)]
- Enable an extra debugging bootverbose printf when probing ISA PNP cards
  listing   each card as it is found on non-PC98 (PC98 already had this).
- Increase the length of the DELAY() used before timing out while reading
  PNP resource data.

Tested by: Steven Nikkel  steven_nikkel ertyu org
MFC after: 1 week

13 years agoDo not build ip_fw_nat.c for ipfw.ko. It can be build as separate module.
Andrey V. Elsukov [Tue, 29 Mar 2011 06:42:52 +0000 (06:42 +0000)]
Do not build ip_fw_nat.c for ipfw.ko. It can be build as separate module.

MFC after: 1 week

13 years agoDo not use word 'flood' as it not entirely correct. Use better 'no delay'
Maksim Yevmenkin [Mon, 28 Mar 2011 23:08:18 +0000 (23:08 +0000)]
Do not use word 'flood' as it not entirely correct. Use better 'no delay'
description. While here, replace atoi(3) with strtol(3).

Submitted by: arundel
MFC after: 1 week

13 years agoFix the check for vm_map_remove() error.
Konstantin Belousov [Mon, 28 Mar 2011 19:44:54 +0000 (19:44 +0000)]
Fix the check for vm_map_remove() error.

Pointed out by: alc
MFC after: 2 weeks

13 years agoRevise r220046 by introducing dc_netcfg_wait() which waits the end
Pyun YongHyeon [Mon, 28 Mar 2011 19:08:53 +0000 (19:08 +0000)]
Revise r220046 by introducing dc_netcfg_wait() which waits the end
of active DMA cycle. dc_setcfg() also has to wait until the DMA
engine is stopped so using a common function to handle the job is
better than duplicating the code.

No objection from: marius

13 years agoCovers values if (BYTES_THIS_ACK(tp, th) / tp->t_maxseg) value is from
Weongyo Jeong [Mon, 28 Mar 2011 19:03:56 +0000 (19:03 +0000)]
Covers values if (BYTES_THIS_ACK(tp, th) / tp->t_maxseg) value is from
2.0 to 3.0.

Reviewed by: lstewart

13 years agoNormally fxp(4) does not receive bad frames but promiscuous mode
Pyun YongHyeon [Mon, 28 Mar 2011 16:58:48 +0000 (16:58 +0000)]
Normally fxp(4) does not receive bad frames but promiscuous mode
makes controller to receive bad frames and i82557 will also receive
bad frames since fxp(4) have to receive VLAN oversized frames. If
fxp(4) encounter DMA overrun error, the received frame size would
be 0 so the actual frame size after checksum field extraction the
length would be negative(-2). Due to signed/unsigned comparison
used in driver, frame length check did not work for DMA overrun
frames. Correct this by casting it to int.
While I'm here explicitly check DMA overrun error and discard the
frame regardless of result of received frame length check.

Reported by: n_hibma
Tested by: n_hibma
MFC after: 1 week

13 years agoTrim white spaces, adjust style.
Konstantin Belousov [Mon, 28 Mar 2011 13:28:23 +0000 (13:28 +0000)]
Trim white spaces, adjust style.

MFC after: 2 weeks

13 years agoHandle zero length in copyout_unmap().
Konstantin Belousov [Mon, 28 Mar 2011 13:21:26 +0000 (13:21 +0000)]
Handle zero length in copyout_unmap().

Submitted by: John Wehle <john feith com>
MFC after: 2 weeks

13 years agoPromote ksyms_map() and ksyms_unmap() to general facility
Konstantin Belousov [Mon, 28 Mar 2011 12:48:33 +0000 (12:48 +0000)]
Promote ksyms_map() and ksyms_unmap() to general facility
copyout_map() and copyout_unmap() interfaces.

Submitted by: John Wehle <john feith com>, nox
MFC after: 2 weeks

13 years agoFix the softdep_request_cleanup() function definition for !SOFTUPDATES case.
Konstantin Belousov [Mon, 28 Mar 2011 12:39:48 +0000 (12:39 +0000)]
Fix the softdep_request_cleanup() function definition for !SOFTUPDATES case.

Submitted by: Aleksandr Rybalko <ray dlink ua>

13 years agoAdd in HT protection but disable it by default.
Adrian Chadd [Mon, 28 Mar 2011 11:48:49 +0000 (11:48 +0000)]
Add in HT protection but disable it by default.

I'll clear how it's supposed to work with Bernhard and then look
at enabling this in the correct situations.

But this -does- enable HT RTS protection (using the appropriate legacy
rates) if this bit of code is enabled.

13 years agoUpdate mvs(4) driver to work over FDT's simplebus(4) bus.
Alexander Motin [Mon, 28 Mar 2011 11:08:58 +0000 (11:08 +0000)]
Update mvs(4) driver to work over FDT's simplebus(4) bus.

13 years agoThe previous commit didn't completely rename this to what it should be.
Adrian Chadd [Mon, 28 Mar 2011 09:10:59 +0000 (09:10 +0000)]
The previous commit didn't completely rename this to what it should be.

13 years agoAdd myself to committers-ports.dot
Ganael LAPLANCHE [Mon, 28 Mar 2011 09:05:43 +0000 (09:05 +0000)]
Add myself to committers-ports.dot

13 years agoAdd myself
Ganael LAPLANCHE [Mon, 28 Mar 2011 08:37:48 +0000 (08:37 +0000)]
Add myself

13 years agoUse ${NANO_WORLDDIR}/var/empty as copy source since it has no schg flag set.
Michael Reifenberger [Mon, 28 Mar 2011 07:00:41 +0000 (07:00 +0000)]
Use ${NANO_WORLDDIR}/var/empty as copy source since it has no schg flag set.
Copying over /var/empty's schg flag had unpleasant side effects (schg flag on /etc and /cfg)
during nanobsd boot before.

13 years agoThe new binutils has correctly redefined MAXPAGESIZE on amd64 as 0x200000
Alan Cox [Mon, 28 Mar 2011 06:35:17 +0000 (06:35 +0000)]
The new binutils has correctly redefined MAXPAGESIZE on amd64 as 0x200000
instead of 0x100000.  As a side effect, an amd64 kernel now loads at
physical address 0x200000 instead of 0x100000.  This is probably for the
best because it avoids the use of a 2MB page mapping for the first 1MB of
the kernel that also spans the fixed MTRRs.  However, getmemsize() still
thinks that the kernel loads at 0x100000, and so the physical memory between
0x100000 and 0x200000 is lost.  Fix this problem by replacing the hard-wired
constant in getmemsize() by a symbol "kernphys" that is defined by the
linker script.

In collaboration with: kib

13 years agoCommitting while tired is never a good idea. Remove an unconditional error
Nathan Whitehorn [Mon, 28 Mar 2011 04:29:50 +0000 (04:29 +0000)]
Committing while tired is never a good idea. Remove an unconditional error
exit left over from debugging.

13 years agoImprove error handling.
Nathan Whitehorn [Mon, 28 Mar 2011 02:37:05 +0000 (02:37 +0000)]
Improve error handling.

13 years agoCopy all generated ISO images into the release area.
Nathan Whitehorn [Sun, 27 Mar 2011 23:46:52 +0000 (23:46 +0000)]
Copy all generated ISO images into the release area.

13 years agoAdd infrastructure for generation of boot-only ISO images. These have a
Nathan Whitehorn [Sun, 27 Mar 2011 23:46:12 +0000 (23:46 +0000)]
Add infrastructure for generation of boot-only ISO images. These have a
reduced world, though still reasonably complete for fixit purposes.

13 years agoAdd mirror selection for FTP installs. To support TBEMD installs
Nathan Whitehorn [Sun, 27 Mar 2011 23:43:32 +0000 (23:43 +0000)]
Add mirror selection for FTP installs. To support TBEMD installs
(e.g. powerpc64), this looks in a slightly different default path than now,
specifying both $MACHINE and $MACHINE_ARCH:
MIRROR/pub/FreeBSD/releases/`uname -p`/`uname -m`/`uname -r`

How to handle TBEMD properly probably merits some more discussion, but,
since no such 9.0-CURRENT distfiles exist at the moment, all existing
mirrors presently fail anyway.

13 years agoIn g_gate_create() there is a window between when g_gate_softc is
Mikolaj Golub [Sun, 27 Mar 2011 19:56:55 +0000 (19:56 +0000)]
In g_gate_create() there is a window between when g_gate_softc is
registered in g_gate_units array and when its sc_provider field is
filled. If during this period g_gate_units is accessed by another
thread that is checking for provider name collision the crash is
possible.

Fix this by adding sc_name field to struct g_gate_softc. In
g_gate_create() when g_gate_softc is created but sc_provider is still
not sc_name points to provider name stored in the local array.

Approved by: pjd (mentor)
Reported by: Freddie Cash <fjwcash@gmail.com>
MFC after: 1 week

13 years agoFix a syntax error in a little-used function.
Josh Paetzel [Sun, 27 Mar 2011 16:57:54 +0000 (16:57 +0000)]
Fix a syntax error in a little-used function.
Replace expr with $(())
Replace grep > /dev/null with grep -q
Replace "$?" = "0" with $? -eq 0 in tests
Consolidate export statements with variable assignment
Replace tests for ! -z with -n

Approved by: kib (mentor)

13 years agoAmd64 doesn't have a lazypmap ipi.
Alan Cox [Sun, 27 Mar 2011 16:18:51 +0000 (16:18 +0000)]
Amd64 doesn't have a lazypmap ipi.