]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoUpgrade of base gcc and libstdc++ to the last GPLv2-licensed revision
mm [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 [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.
trasz [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.
trasz [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
trasz [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
trasz [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 [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
jhb [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.
ae [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'
emax [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.
kib [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
yongari [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 [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
yongari [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.
kib [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().
kib [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
kib [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.
kib [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 [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.
mav [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 [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
martymac [Mon, 28 Mar 2011 09:05:43 +0000 (09:05 +0000)]
Add myself to committers-ports.dot

13 years agoAdd myself
martymac [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.
mr [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
alc [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
nwhitehorn [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.
nwhitehorn [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.
nwhitehorn [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
nwhitehorn [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
nwhitehorn [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
trociny [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.
jpaetzel [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.
alc [Sun, 27 Mar 2011 16:18:51 +0000 (16:18 +0000)]
Amd64 doesn't have a lazypmap ipi.

13 years agoIncrease size of boot partition to give breathing room in the future.
jpaetzel [Sun, 27 Mar 2011 14:20:47 +0000 (14:20 +0000)]
Increase size of boot partition to give breathing room in the future.

Approved by: kib (mentor)

13 years agoRefactor out the ar71xx mac address code into something that's
adrian [Sun, 27 Mar 2011 13:55:35 +0000 (13:55 +0000)]
Refactor out the ar71xx mac address code into something that's
just for Redboot.

At some point we're going to need to build options for different
boot environments - for example, the UBoot setups I've seen simply
have the MAC address hard-coded at a fixed location in flash.
The OpenWRT support simply yanks the if_arge MAC directly from that
in code, rather than trying to find a uboot environment to pull it
from.

13 years agogetpwnam(3) may return NULL.
ume [Sun, 27 Mar 2011 12:53:20 +0000 (12:53 +0000)]
getpwnam(3) may return NULL.

Requested by:   nork
Reviewed by:    Takeharu KATO <takeharu1219__at__ybb.ne.jp>, nork
MFC after:      1 week

13 years agoFix typo.
adrian [Sun, 27 Mar 2011 10:35:39 +0000 (10:35 +0000)]
Fix typo.

13 years agoRename AH_ENABLE_11N to ATH_ENABLE_11 - the HAL supports 11n by
adrian [Sun, 27 Mar 2011 08:47:55 +0000 (08:47 +0000)]
Rename AH_ENABLE_11N to ATH_ENABLE_11 - the HAL supports 11n by
default but the ath driver doesn't. This is a much more consistent
name.

13 years agoAdd an option - AR71XX_REALMEM - which overrides the amount of
adrian [Sun, 27 Mar 2011 08:44:27 +0000 (08:44 +0000)]
Add an option - AR71XX_REALMEM - which overrides the amount of
memory detected from Redboot, or overrides the "otherwise" case
if no Redboot information was found.

Some AR71XX platforms don't use Redboot (eg TP-LINK devices using
UBoot; some later Ubiquiti devices which apparently also use
UBoot) and at least one plain out lies - the Ubiquiti LS-SR71A
Redboot says there's 16mb of RAM when in fact there's 32mb.

A more "clean" solution will be needed at a later date.

13 years agoAdd some missing flags needed for AR913x/AR724x USB to correctly operate.
adrian [Sun, 27 Mar 2011 08:32:47 +0000 (08:32 +0000)]
Add some missing flags needed for AR913x/AR724x USB to correctly operate.

The AR913x/AR724x USB lives at a different offset to the AR71xx
USB, so this needs to be either adjusted for in a subsequent
commit, or updated in hints for kernels compiled for those
platforms.

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

13 years agoHook the 220.backup-pkgdb script I added to the build unconditionally
dougb [Sun, 27 Mar 2011 03:06:58 +0000 (03:06 +0000)]
Hook the 220.backup-pkgdb script I added to the build unconditionally

Hook up 610.ipf6denied based on MK_IPFILTER as 510.ipfdenied is now

Poked by: Andrzej Tobola <ato@iem.pw.edu.pl>

13 years agoAdd svn:executable property on remaining period scripts without it
dougb [Sun, 27 Mar 2011 03:03:29 +0000 (03:03 +0000)]
Add svn:executable property on remaining period scripts without it

13 years agoWait until the DMA engine is stopped before unmapping buffers and
marius [Sat, 26 Mar 2011 22:39:23 +0000 (22:39 +0000)]
Wait until the DMA engine is stopped before unmapping buffers and
descriptors, which fixes DMA errors seen on sparc64.

Obtained from: OpenBSD
MFC after: 1 week

13 years agoPrint the raw value of si_code, that is esp. useful for undecoded values.
kib [Sat, 26 Mar 2011 21:12:53 +0000 (21:12 +0000)]
Print the raw value of si_code, that is esp. useful for undecoded values.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

13 years agoEliminate an unused definition.
alc [Sat, 26 Mar 2011 20:40:33 +0000 (20:40 +0000)]
Eliminate an unused definition.

Reviewed by: marcel

13 years agoFixed sockets display somewhat (-L, -T, -x, -Lx, with and without -A).
ru [Sat, 26 Mar 2011 19:09:28 +0000 (19:09 +0000)]
Fixed sockets display somewhat (-L, -T, -x, -Lx, with and without -A).
(I didn't try to fix negative TCP timers with -x.)

MFC after: 3 days

13 years agoFix some style issues in r219925.
jh [Sat, 26 Mar 2011 17:17:24 +0000 (17:17 +0000)]
Fix some style issues in r219925.

Reported by: bde
MFC after: 1 month

13 years ago- A closer inspection of the OpenSolaris code indicates that the DMA
marius [Sat, 26 Mar 2011 16:52:31 +0000 (16:52 +0000)]
- A closer inspection of the OpenSolaris code indicates that the DMA
  syncing for Hummingbird and Sabre bridges should be applied with every
  BUS_DMASYNC_POSTREAD instead of in a wrapper around interrupt handlers
  for devices behind PCI-PCI bridges only as suggested by the documentation
  (code for the latter actually exists in OpenSolaris but is disabled by
  default), which also makes more sense.
- Take advantage of the ofw_pci_setup_device method introduced in r220038
  for disabling bus parking for certain EBus bridges in order to
- Mark some unused parameters as such.

13 years ago- Merge the *_SET macros from fire(4) which generally print out the
marius [Sat, 26 Mar 2011 16:49:12 +0000 (16:49 +0000)]
- Merge the *_SET macros from fire(4) which generally print out the
  register changes when compiled with SCHIZO_DEBUG and take advantage
  of them.
- Add support for the XMITS Fireplane/Safari to PCI-X bridges. I tought
  I'd need this for a Sun Fire 3800, which then turned out to not being
  equipped with such a bridge though. The support for these should be
  complete but given that it hasn't actually been tested probing is
  disabled for now.
  This required a way to alter the XMITS configuration in case a PCI-X
  device is found further down the device tree so the sparc64 specific
  ofw_pci kobj was revived with a ofw_pci_setup_device method, which is
  called by the ofw_pcibus code for every device added.
- A closer inspection of the OpenSolaris code indicates that consistent
  DMA flushing/syncing as well as the block store workaround should be
  applied with every BUS_DMASYNC_POSTREAD instead of in a wrapper around
  interrupt handlers for devices behind PCI-PCI bridges only as suggested
  by the documentation (code for the latter actually exists in OpenSolaris
  but is disabled by default), which also makes more sense.
- Add a workaround for Casinni/Skyhawk combinations. Chances are that
  this solves the crashes seen when using the the on-board Casinni NICs
  of Sun Fire V480 equipped with centerplanes other than 501-6780 or
  501-6790. This also takes advantage of the ofw_pci_setup_device method.
- Mark some unused parameters as such.

13 years agoCause the release target to set up its object directory. It is designed
nwhitehorn [Sat, 26 Mar 2011 13:58:44 +0000 (13:58 +0000)]
Cause the release target to set up its object directory. It is designed
to be a meta-target, and having it do this avoids it spewing files all
over the source tree by default (and possible recursive tarring if
distributing a src tarball).

13 years ago.. And another missed commit - add the PSPOLL capability.
adrian [Sat, 26 Mar 2011 13:06:43 +0000 (13:06 +0000)]
.. And another missed commit - add the PSPOLL capability.

13 years agoThis was missing from the previous HAL commit - it fixes a typo and
adrian [Sat, 26 Mar 2011 11:59:18 +0000 (11:59 +0000)]
This was missing from the previous HAL commit - it fixes a typo and
introduces the PS-POLL hardware support.

13 years agoIf 802.11n is enabled, bump the number of buffers used up to a larger
adrian [Sat, 26 Mar 2011 11:58:29 +0000 (11:58 +0000)]
If 802.11n is enabled, bump the number of buffers used up to a larger
level.

This is important for AMPDU RX as each burst is multiple packets in a row.

13 years agolinux compat: add SO_PASSCRED option with basic handling
avg [Sat, 26 Mar 2011 11:25:36 +0000 (11:25 +0000)]
linux compat: add SO_PASSCRED option with basic handling

This seems to have been a part of a bigger patch by dchagin that either
haven't been committed or committed partially.

Submitted by: dchagin, nox
MFC after: 2 weeks

13 years agolinux compat: improve and fix sendmsg/recvmsg compatibility
avg [Sat, 26 Mar 2011 11:05:53 +0000 (11:05 +0000)]
linux compat: improve and fix sendmsg/recvmsg compatibility

- implement baseic stubs for capget, capset, prctl PR_GET_KEEPCAPS
  and prctl PR_SET_KEEPCAPS.
- add SCM_CREDS support to sendmsg and recvmsg
- modify sendmsg to ignore control messages if not using UNIX
  domain sockets

This should allow linux pulse audio daemon and client work on FreeBSD
and interoperate with native counter-parts modulo the differences in
pulseaudio versions.

PR: kern/149168
Submitted by: John Wehle <john@feith.com>
Reviewed by: netchild
MFC after: 2 weeks

13 years agolinux compat: add non-dummy capget and capset system calls, regenerate
avg [Sat, 26 Mar 2011 10:59:24 +0000 (10:59 +0000)]
linux compat: add non-dummy capget and capset system calls, regenerate

And drop dummy definitions for those system calls.
This may transiently break the build.

PR: kern/149168
Submitted by: John Wehle <john@feith.com>
Reviewed by: netchild
MFC after: 2 weeks

13 years agoAdd in the hardware PS-POLL frame reception setting, but leave it disabled
adrian [Sat, 26 Mar 2011 10:52:37 +0000 (10:52 +0000)]
Add in the hardware PS-POLL frame reception setting, but leave it disabled
by default.

Adventourous souls with an AR9220/AR9280 or later and who have a device
that sends PS-POLL frames may wish to try tinkering with this option and
get back to me.

13 years agolinux compat: add non-dummy capget and capset system calls
avg [Sat, 26 Mar 2011 10:51:56 +0000 (10:51 +0000)]
linux compat: add non-dummy capget and capset system calls

PR: kern/149168
Submitted by: John Wehle <john@feith.com>
Reviewed by: netchild
MFC after: 2 weeks

13 years agoIntroduce hardware PS-POLL support in the HAL.
adrian [Sat, 26 Mar 2011 10:47:17 +0000 (10:47 +0000)]
Introduce hardware PS-POLL support in the HAL.

Linux ath9k only enables this for AR9280 and later NICs; so
create a capability for it so it isn't enabled for earlier
NICs.

Enabling hardware PS-POLL support will come in a later commit
and will be disabled by default.

13 years agoExport the correct AT_PLATFORM value.
dchagin [Sat, 26 Mar 2011 09:25:35 +0000 (09:25 +0000)]
Export the correct AT_PLATFORM value.
Since signal trampolines are copied to the shared page do not need to
leave place on the stack for it. Forgotten in the previous commit.

MFC after: 1 Week

13 years agoPut these two back to mirror what ath9k does.
adrian [Sat, 26 Mar 2011 07:29:48 +0000 (07:29 +0000)]
Put these two back to mirror what ath9k does.

Even though they map to setting the error filter register,
ath9k also writes them untouched to AR_RX_FILTER.

The Force-BSSID match bit can stay high, as it maps to a
misc mode register setting rather than an RX filter bit.

13 years agoDon't calculate len too early.
pjd [Sat, 26 Mar 2011 07:17:24 +0000 (07:17 +0000)]
Don't calculate len too early.

13 years agoFollow style(9) in example code and handle opendir(3) error.
pjd [Sat, 26 Mar 2011 07:15:57 +0000 (07:15 +0000)]
Follow style(9) in example code and handle opendir(3) error.

13 years agoShuffle around the HAL_RX_FILTER bits to be slightly more sensible.
adrian [Sat, 26 Mar 2011 07:15:35 +0000 (07:15 +0000)]
Shuffle around the HAL_RX_FILTER bits to be slightly more sensible.

The phyerr, radar and bssid-match bits aren't real bits, they map
to enabling bits in other registers. Move those out of the way of
valid RX filter bits.

Add a few new fields from ath9k - compba, ps-poll, mcast-bcast-all.

13 years agoMove an external declaration to the appropriate header file.
alc [Sat, 26 Mar 2011 06:21:05 +0000 (06:21 +0000)]
Move an external declaration to the appropriate header file.

13 years agoAdd a daily period script to back up /var/db/pkg
dougb [Sat, 26 Mar 2011 03:01:48 +0000 (03:01 +0000)]
Add a daily period script to back up /var/db/pkg

The final product contains work from the originator, and
Florent Thoumie <florent.thoumie@gmail.com>. The final
product contains considerable re-working by me, so all
responsibility for bugs rests under my pointy hat.

PR: ports/145957
Submitted by: Eitan Adler <EitanAdlerList@gmail.com>

13 years agoUpdate ath_hal.4 to include the latest chipset support.
adrian [Sat, 26 Mar 2011 02:52:04 +0000 (02:52 +0000)]
Update ath_hal.4 to include the latest chipset support.

ath_hal needs a lot more work to encompass the list of supported
cards, as the AR5416/AR9160/AR9280/AR9285 list is quite long
and extensive. In addition, there's a lot of AR5212/AR5213 based
cards that aren't on this list.

13 years agoImprove CPU identifications of various IDT/Centaur/VIA, Rise and Transmeta
jkim [Sat, 26 Mar 2011 02:02:07 +0000 (02:02 +0000)]
Improve CPU identifications of various IDT/Centaur/VIA, Rise and Transmeta
CPUs.  These CPUs need explicit MSR configuration to expose ceratin CPU
capabilities (e.g., CMPXCHG8B) to work around compatibility issues with
ancient software.  Unfortunately, Rise mP6 does not set the CX8 bit in CPUID
and there is no MSR to expose the feature although all mP6 processors are
capable of CMPXCHG8B according to datasheets I found from the Net.  Clean up
and simplify VIA PadLock detection while I am in the neighborhood.

13 years agoAdd the svn:executable property to the scripts that are missing it
dougb [Sat, 26 Mar 2011 01:24:55 +0000 (01:24 +0000)]
Add the svn:executable property to the scripts that are missing it

13 years ago - Implement wake-on-lan support in mlxen.
jeff [Sat, 26 Mar 2011 00:54:01 +0000 (00:54 +0000)]
 - Implement wake-on-lan support in mlxen.

13 years agoAdd an example for the use of the <include> entry to help others
dougb [Sat, 26 Mar 2011 00:34:35 +0000 (00:34 +0000)]
Add an example for the use of the <include> entry to help others
who are as slow as I am.

Discussed with: gordon

13 years agoReport EBUSY instead of EROFS for attempt of deleting or renaming the
kib [Fri, 25 Mar 2011 22:31:28 +0000 (22:31 +0000)]
Report EBUSY instead of EROFS for attempt of deleting or renaming the
root directory of msdosfs mount. The VFS code would handle deletion
case itself too, assuming VV_ROOT flag is not lost. The msdosfs_rename()
should also note attempt to rename root via doscheckpath() or different
mount point check leading to EXDEV. Nonetheless, keep the checks for now.

The change is inspired by NetBSD change referenced in PR, but return
EBUSY like kern_unlinkat() does.

PR: kern/152079
MFC after: 1 week

13 years agoUpdate T3 firmware to 7.11.0
np [Fri, 25 Mar 2011 20:53:02 +0000 (20:53 +0000)]
Update T3 firmware to 7.11.0

Changes since 7.8.0 (from the official changelog):

- Fixed sporadic interrupt generation for associated CQ when processing
  a local invalidate work request
- Changes to core scheduling to avoid starving requests from the host
  under heavy RDMA Read Request load (e.g. packets to the wire)

- Programmed the tp tx resource limiter in function of the traffic (only
  affects iWarp)

- Increased the egress NIC gather list length from 36 to 46 entries

MFC after: 1 week

13 years agoAdd mapsize to the header just before sending the packet.
pjd [Fri, 25 Mar 2011 20:19:15 +0000 (20:19 +0000)]
Add mapsize to the header just before sending the packet.
Before it could change later and we were sending invalid mapsize.
Some time ago I added optimization where when nodes are connected for the
first time and there were no writes to them yet, there is no initial full
synchronization. This bug prevented it from working.

MFC after: 1 week

13 years agoUse timeout from configuration file not only when sending and receiving,
pjd [Fri, 25 Mar 2011 20:15:16 +0000 (20:15 +0000)]
Use timeout from configuration file not only when sending and receiving,
but also when establishing connection.

MFC after: 1 week

13 years agoUse role2str() when setting process title.
pjd [Fri, 25 Mar 2011 20:13:38 +0000 (20:13 +0000)]
Use role2str() when setting process title.

MFC after: 1 week

13 years agortld: eliminate double call to close(2) that may occur in load_object
avg [Fri, 25 Mar 2011 18:23:10 +0000 (18:23 +0000)]
rtld: eliminate double call to close(2) that may occur in load_object

The second close(2) call resulted in heisenbugs in some multi-threaded
applications where e.g. dlopen(3) call in one thread could close a file
descriptor for a file having been opened in other thread concurrently.

My litmus test for this issue was an openoffice.org build.

Reviewed by: jhb
MFC after: 2 weeks

13 years agoHandle the corner case in vm_fault_quick_hold_pages().
kib [Fri, 25 Mar 2011 16:38:10 +0000 (16:38 +0000)]
Handle the corner case in vm_fault_quick_hold_pages().

If supplied length is zero, and user address is invalid, function
might return -1, due to the truncation and rounding of the address.
The callers interpret the situation as EFAULT. Instead of handling
the zero length in caller, filter it in vm_fault_quick_hold_pages().

Sponsored by: The FreeBSD Foundation
Reviewed by: alc

13 years agoDocument O_CLOEXEC.
kib [Fri, 25 Mar 2011 14:01:18 +0000 (14:01 +0000)]
Document O_CLOEXEC.

Reviewed by: jhb
MFC after: 1 week

13 years agoAdd O_CLOEXEC flag to open(2) and fhopen(2).
kib [Fri, 25 Mar 2011 14:00:36 +0000 (14:00 +0000)]
Add O_CLOEXEC flag to open(2) and fhopen(2).
The new function fallocf(9), that is renamed falloc(9) with added
flag argument, is provided to facilitate the merge to stable branch.

Reviewed by: jhb
MFC after: 1 week

13 years agoImplement compat32 MEMRANGE_GET and MEMRANGE_SET. This is needed to
kib [Fri, 25 Mar 2011 11:52:31 +0000 (11:52 +0000)]
Implement compat32 MEMRANGE_GET and MEMRANGE_SET. This is needed to
run 32bit Xorg server with VESA driver.

Submitted by: John Wehle <john feith com>
MFC after: 1 week

13 years agoFully emulate MDIOCLIST for compat32.
kib [Fri, 25 Mar 2011 11:43:49 +0000 (11:43 +0000)]
Fully emulate MDIOCLIST for compat32.

MFC after: 1 week

13 years agoRemove unneccessary panics, that can be easily triggered by user.
kib [Fri, 25 Mar 2011 11:05:28 +0000 (11:05 +0000)]
Remove unneccessary panics, that can be easily triggered by user.
The copyin() function handles NULL as well as any other pointer.

MFC after: 3 days

13 years agoFix file leakage in the freebsd32_ioctl routines.
kib [Fri, 25 Mar 2011 10:57:57 +0000 (10:57 +0000)]
Fix file leakage in the freebsd32_ioctl routines.

Code inspection shows freebsd32_ioctl calls fget for a fd and calls
a subroutine to handle each specific ioctl.  It is expected that the
subroutine will call fdrop when done.  However many of the subroutines
will exit out early if copyin encounters an error resulting in fdrop
never being called.

Submitted by: John Wehle <john feith com>
MFC after: 3 days

13 years agoAfter discussing with Bernhard, the "right" way in net80211 to check
adrian [Fri, 25 Mar 2011 10:55:25 +0000 (10:55 +0000)]
After discussing with Bernhard, the "right" way in net80211 to check
the channel width is ni->ni_chw, which is set to the negotiated channel
width. ni->ni_htflags is the capability, rather than the negotiated
value.

Teach both the TX path and the sample rate module about this.

13 years agoI broke periodic adc calibrations - so restore them to working order.
adrian [Fri, 25 Mar 2011 10:53:13 +0000 (10:53 +0000)]
I broke periodic adc calibrations - so restore them to working order.

13 years agoFix initialisation order with regard to debug prints.
hselasky [Fri, 25 Mar 2011 10:11:21 +0000 (10:11 +0000)]
Fix initialisation order with regard to debug prints.

Reported by: Luiz Otavio O Souza
MFC after: 14 days
Approved by: thompsa (mentor)

13 years agoFix panic while associating access point.
kevlo [Fri, 25 Mar 2011 05:01:13 +0000 (05:01 +0000)]
Fix panic while associating access point.
While here, add the SMC SMCWUSB-G

13 years agoRe-disable the setting of 2040/shortgi bits for now.
adrian [Fri, 25 Mar 2011 04:15:30 +0000 (04:15 +0000)]
Re-disable the setting of 2040/shortgi bits for now.

This seems to work fine for STA but not HT/20 AP mode.

Further discussion with net80211 people will need to take place
to ensure that the right flags are set based on the negotiated
capabilities of the remote peer, rather than whatever the local
parameters are.

Sending short-gi frames in 20mhz may work on some chips but
it certainly isn't supported on anything currently supported
by the HAL; and sending HT40 frames in HT20 mode just plain
won't work.

13 years agoAfter discussion with Felix Fietkau (nbd) about the ath9k Merlin LNA bit
adrian [Fri, 25 Mar 2011 00:45:24 +0000 (00:45 +0000)]
After discussion with Felix Fietkau (nbd) about the ath9k Merlin LNA bit
settings, it seems that our defines are backwards and don't match what
is in the EEPROM documentation or internal driver.

The ath9k code used to have a bitfield here, rather than a uint8_t, and
there were #defines used to swap the order based on the endian of the
platform - this wasn't because of nybble or bit ordering of the
underlying host but because of what the compiler was doing.

This may be the reason for the backwards field numbers, as ath9k had
similar issues.

13 years agoFlip ANI on for the AR5416 and later chips. I haven't verified it on
adrian [Fri, 25 Mar 2011 00:40:08 +0000 (00:40 +0000)]
Flip ANI on for the AR5416 and later chips. I haven't verified it on
the AR9285 so I'll leave it off for that.

Ath9k sources indiciate that one of the ANI modes interferes with
RIFS detection, so match ath9k and disable that.

13 years agoThe right commit - add a couple more AR_PCU_MISC_MODE2 register bits -
adrian [Fri, 25 Mar 2011 00:06:58 +0000 (00:06 +0000)]
The right commit - add a couple more AR_PCU_MISC_MODE2 register bits -
SOWL specific.

13 years agooops, commited the wrong file change.
adrian [Fri, 25 Mar 2011 00:06:19 +0000 (00:06 +0000)]
oops, commited the wrong file change.

13 years agoAdd some more AR_PCU_MISC_MODE2 register settings - these are SOWL or later.
adrian [Fri, 25 Mar 2011 00:05:26 +0000 (00:05 +0000)]
Add some more AR_PCU_MISC_MODE2 register settings - these are SOWL or later.

13 years agoBring over interrupt mitigation changes from ath9k.
adrian [Fri, 25 Mar 2011 00:03:21 +0000 (00:03 +0000)]
Bring over interrupt mitigation changes from ath9k.

* The existing interrupt mitigation code didn't mitigate anything - the
  per-packet TX/RX interrupts are still occuring. It's possible this
  worked for the AR5416 but not any later chipsets; I'll investigate and
  update as needed.

* Set both the RX and TX threshold registers whilst I'm at it.

This is verified to work on the AR9220 and AR9160. I'm leaving it off
by default in case it's truely broken, but I need to have it enabled
when doing 11n testing or interrupt loads exceed 10,000 interrupts/sec.

13 years agoMFgraid/head:
mav [Thu, 24 Mar 2011 21:31:32 +0000 (21:31 +0000)]
MFgraid/head:
Add new RAID GEOM class, that is going to replace ataraid(4) in supporting
various BIOS-based software RAIDs. Unlike ataraid(4) this implementation
does not depend on legacy ata(4) subsystem and can be used with any disk
drivers, including new CAM-based ones (ahci(4), siis(4), mvs(4), ata(4)
with `options ATA_CAM`). To make code more readable and extensible, this
implementation follows modular design, including core part and two sets
of modules, implementing support for different metadata formats and RAID
levels.

Support for such popular metadata formats is now implemented:
Intel, JMicron, NVIDIA, Promise (also used by AMD/ATI) and SiliconImage.

Such RAID levels are now supported:
RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT.

For any all of these RAID levels and metadata formats this class supports
full cycle of volume operations: reading, writing, creation, deletion,
disk removal and insertion, rebuilding, dirty shutdown detection
and resynchronization, bad sector recovery, faulty disks tracking,
hot-spare disks. For Intel and Promise formats there is support multiple
volumes per disk set.

Look graid(8) manual page for additional details.

Co-authored by: imp
Sponsored by: Cisco Systems, Inc. and iXsystems, Inc.

13 years agoChecking file access on size change is bogus. The checks are done earlier by
pjd [Thu, 24 Mar 2011 20:28:09 +0000 (20:28 +0000)]
Checking file access on size change is bogus. The checks are done earlier by
VFS where we know if this is truncate(2) or ftruncate(2). If this is the
latter we should depend on the mode the file was opened and not on the current
permission.

PR: standards/154873
Reported by: Mark Martinec <Mark.Martinec@ijs.si>
Discussed with: Eric Schrock <eric.schrock@delphix.com>
Discussed with: Mark Maybee <Mark.Maybee@Oracle.COM>
MFC after: 1 month

13 years agoAdd proper width calculation for time fields (time, cputime and usertime).
trasz [Thu, 24 Mar 2011 20:15:42 +0000 (20:15 +0000)]
Add proper width calculation for time fields (time, cputime and usertime).
This fixes the ugly overflow in "ps aux" output for "[idle]".

13 years agoMFgraid/head r218212, r218257:
mav [Thu, 24 Mar 2011 19:23:42 +0000 (19:23 +0000)]
MFgraid/head r218212, r218257:
Introduce new type of BIO_GETATTR -- GEOM::setstate, used to inform lower
GEOM about state of it's providers from the point of upper layers.
Make geom_disk use led(4) subsystem to illuminate states in such fashion:
FAILED - "1" (on), REBUILD - "f5" (slow blink), RESYNC - "f1" (fast blink),
ACTIVE - "0" (off).
LED name should be set for each disk via kern.geom.disk.%s.led sysctl.
Later disk API could be extended to allow disk driver to report this info
in custom way via it's own facilities.

13 years agoMFgraid/head r217014:
mav [Thu, 24 Mar 2011 19:11:05 +0000 (19:11 +0000)]
MFgraid/head r217014:
Make `geom XXX list` and `geom XXX status` outputs more consistent:
Add -a options to print all geoms, not only ones with providers.
Add -g option for `status` to report geom's names, not provider's.
Make `status` by default report provider's status (if present), not geom's.
Make `status` report consumer's statuses, not only "synchronized" field.