]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd ARM relocations types used for thread-local storage
gonzo [Tue, 14 Feb 2012 00:12:55 +0000 (00:12 +0000)]
Add ARM relocations types used for thread-local storage

Reviewed by: cognet

12 years agoAdd __aeabi_read_tp function required for thread-local storage
gonzo [Tue, 14 Feb 2012 00:12:15 +0000 (00:12 +0000)]
Add __aeabi_read_tp function required for thread-local storage

Reviewed by: cognet

12 years agoMinor cleanup and added missing svn keywords.
brueffer [Mon, 13 Feb 2012 23:02:51 +0000 (23:02 +0000)]
Minor cleanup and added missing svn keywords.

12 years agoUse if_maddr_*lock() routines to lock the per-interface multicast
jhb [Mon, 13 Feb 2012 19:35:35 +0000 (19:35 +0000)]
Use if_maddr_*lock() routines to lock the per-interface multicast
address list rather than manipulating the lock directly.

12 years ago- use struct ifnet as explicit type of the argument to the
luigi [Mon, 13 Feb 2012 18:56:34 +0000 (18:56 +0000)]
- use struct ifnet as explicit type of the argument to the
  txsync() and rxsync() callbacks, removing some variables made
  useless by this change;

- add generic lock and irq handling routines. These can be useful
  in case there are no driver locks that we can reuse;

- add a few macros to reduce differences with the Linux version.

12 years agoUse the non-sleeping variang of t4_wr_mbox in code that can be called
np [Mon, 13 Feb 2012 18:41:32 +0000 (18:41 +0000)]
Use the non-sleeping variang of t4_wr_mbox in code that can be called
with locks held.

MFC after: 1 day

12 years agoAdd a sysctl to report the firmware build number.
emaste [Mon, 13 Feb 2012 16:48:49 +0000 (16:48 +0000)]
Add a sysctl to report the firmware build number.

Some older firmware versions have issues that can be worked around by
avoiding certain operations.  Add a sysctl dev.aac.#.firmware_build to
make it easy for scripts or userland tools to detect the firmware
version.

12 years agoFix write(1) to support wide characters.
glebius [Mon, 13 Feb 2012 14:40:15 +0000 (14:40 +0000)]
Fix write(1) to support wide characters.

Submitted by: amdmi3
PR: bin/164317

12 years agoNo need to optimise for a node with no hooks, my braino.
glebius [Mon, 13 Feb 2012 13:07:56 +0000 (13:07 +0000)]
No need to optimise for a node with no hooks, my braino.

12 years agoPolish diff against upstream.
ed [Mon, 13 Feb 2012 11:59:59 +0000 (11:59 +0000)]
Polish diff against upstream.

- Revert unneeded whitespace changes.
- Revert modifications to loginrec.c, as the upstream version already
  does the right thing.
- Fix indentation and whitespace of local changes.

Approved by: des
MFC after: 1 month

12 years agoAdd missed EOL when die() was converted to use rtld_fdputstr() instead
kib [Mon, 13 Feb 2012 11:15:29 +0000 (11:15 +0000)]
Add missed EOL when die() was converted to use rtld_fdputstr() instead
of errx().

Reported by: amdmi3
PR: bin/165075
MFC after: 3 days

12 years agoCorrect the 802.11s mesh configuration structure and related tidbits.
adrian [Mon, 13 Feb 2012 07:47:36 +0000 (07:47 +0000)]
Correct the 802.11s mesh configuration structure and related tidbits.

* Change the mesh IE size to be IEEE80211_MESH_CONF_SZ rather than the
  size of the structure;
* conf_cap is now a uint8_t rather than a uint16_t (uint16_t in D3.0,
  uint8_t in the amendment spec);
* Update mesh config capability bits - earlier bits were from draft X,
  current is amendment spec;
* Update the following to be an enum rather than #define and added
  a VENDOR entry too from the amendment spec;
  IEEE80211_MESHCONF_PATH_*
  IEEE80211_MESHCONF_METRIC_*
  IEEE80211_MESHCONF_CC_*
  IEEE80211_MESHCONF_SYNC_*
  IEEE80211_MESHCONF_AUTH_*
* Kept IEEE80211_MESHCONF_FORM_* and IEEE80211_MESHCONF_CAP_* as
  defines because they are defined in a way that we need to mask in/out
  information;
* In IEEE80211_MESHCONF_CAP_* IEEE80211_MESHCONF_CAP_TBTTA is removed
  and 0x80 is made reserved as defined in the amendment spec.

Submitted by: monthadar@gmail.com
Reviewed by: rpaulo

12 years agoRe-generate /etc/devd/usb.conf
hselasky [Mon, 13 Feb 2012 07:47:16 +0000 (07:47 +0000)]
Re-generate /etc/devd/usb.conf

MFC after: 1 day

12 years agoFix panic after "WARNING - ATA_IDENTIFY taskqueue timeout"
emaste [Mon, 13 Feb 2012 01:44:12 +0000 (01:44 +0000)]
Fix panic after "WARNING - ATA_IDENTIFY taskqueue timeout"

When performing a firmware upgrade via atacontrol[1] the subsequent
command may time out producing the error message above.  When this
happens the callout could still be active, and the system would then
panic due to a destroyed semaphore.

Instead, ensure that the callout is done first, via callout_drain.

Note that this fix applies to the "old" ata(4) and so isn't applicable
to the default configuration in HEAD.  It is still applicable to
stable/8.

[1] http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031122.html

Submitted by:   Nima Misaghian
Reviewed by:    rstone, attilio, mav
Obtained from:  SVOS
MFC after:      3 days

12 years agoMissing conditions in checking whether an inode has been written.
mckusick [Mon, 13 Feb 2012 01:33:39 +0000 (01:33 +0000)]
Missing conditions in checking whether an inode has been written.

Found and tested by: Peter Holm
MFC after:           2 weeks (to 9 only)

12 years agoAttempt to address some potential vap->iv_bss race conditions.
adrian [Mon, 13 Feb 2012 00:28:41 +0000 (00:28 +0000)]
Attempt to address some potential vap->iv_bss race conditions.

There are unfortunately a number of situations where vap->iv_bss is changed
or freed by some code in net80211.  Because multiple threads can concurrently
be doing work (and the vap->iv_bss access isn't at all done behind any kind
of lock), it's quite possible that:

* a change will occur in one thread - eg, by a call through
  ieee80211_sta_join1();
* a state change occurs in another thread - eg an RX is scheduled
  in the ath tasklet and it calls ieee80211_input_mimo_all(), which
  does dereference vap->iv_bss;
* these two executing concurrently, causing things to explode.

Another instance is ath_beacon_alloc() which takes an ieee80211_node *.
It's called with the vap->iv_bss node from ath_newstate(). If the node has
changed in the meantime (say it's been freed elsewhere) the reference
that it grabbed _before_ refcounting it may be stale.

I would _prefer_ that these sorts of things were serialised somewhere but
that may be a bit much to ask.  Instead, the best we can (currently) hope
is that the underlying bss node is still (somewhat) valid.

There is a related PR (kern/164382) described by the first case above.
That should be fixed by properly serialising the RX path and reset path
so an RX can't occur at the same time as the vap free/shutdown path.

This is inspired by some related fixes in r212127.

PR: kern/165060

12 years agoPrevent periodic scripts that run longer than the expected period from
brooks [Sun, 12 Feb 2012 23:18:05 +0000 (23:18 +0000)]
Prevent periodic scripts that run longer than the expected period from
starting up before the previous script finishes.  This prevents an
infinite number of them from piling up and slowing a system down.

Since all the refactoring to make this happen required churning the
indenting of most of this file, make the indentation more consistent.

Reviewed by: simon
MFC after: 1 week

12 years agoFix a typo.
rmh [Sun, 12 Feb 2012 19:29:34 +0000 (19:29 +0000)]
Fix a typo.

Approved by: kib (mentor)
Reported by: lwhsu, Niclas Zeising <zeising@daemonic.se>
MFC after: 5 days

12 years agoGlobally replace u_int*_t from (non-contributed) man pages.
ed [Sun, 12 Feb 2012 18:29:56 +0000 (18:29 +0000)]
Globally replace u_int*_t from (non-contributed) man pages.

The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after: 1 month

12 years agostart watchdogd before most of other daemons/servers
avg [Sun, 12 Feb 2012 14:58:50 +0000 (14:58 +0000)]
start watchdogd before most of other daemons/servers

The main benefit is that watchdogd would shutdown after most of other
daemons/servers and thus, for example, would remedy a system hang caused
by unlucky X server shutdown.

Reviewed by: dougb (earlier version)
MFC after: 2 weeks

12 years agoMove WITHOUT_SOURCELESS_* files to sys/conf/ in order to avoid "universe"
rmh [Sun, 12 Feb 2012 14:55:27 +0000 (14:55 +0000)]
Move WITHOUT_SOURCELESS_* files to sys/conf/ in order to avoid "universe"
target processing them as if they were standalone kernel config files.

Approved by: kib (mentor)
MFC after: 5 days

12 years agonewvers.sh: unbreak git/git-svn support
avg [Sun, 12 Feb 2012 14:54:19 +0000 (14:54 +0000)]
newvers.sh: unbreak git/git-svn support

MFC after: 2 weeks

12 years agoAvoid using BEFORE in the utx rc script.
ed [Sun, 12 Feb 2012 07:45:48 +0000 (07:45 +0000)]
Avoid using BEFORE in the utx rc script.

Requested by: dougb

12 years agoInclude target names in diagnostic output.
fjoe [Sun, 12 Feb 2012 05:34:01 +0000 (05:34 +0000)]
Include target names in diagnostic output.

Submitted by: Garrett Cooper

12 years ago- Use fixed-width integer types.
fjoe [Sun, 12 Feb 2012 05:14:12 +0000 (05:14 +0000)]
- Use fixed-width integer types.
- Prefer to use C99 stdint types.

This fixes ng_cisco on 64-bit architectures.

MFC after: 1 week

12 years agoAnd of course, I forgot to add -a to the usage.
ed [Sat, 11 Feb 2012 21:50:44 +0000 (21:50 +0000)]
And of course, I forgot to add -a to the usage.

12 years agoAttempt to implement who -a.
ed [Sat, 11 Feb 2012 21:49:23 +0000 (21:49 +0000)]
Attempt to implement who -a.

According to POSIX, -a is equal to -bdlprtTu.  It seems this is not true
in practice, as -b normally restricts the output to BOOT_TIME entries
and all implementations that I know of don't.

12 years agosh: Make 'hash' return 1 if at least one utility is not found.
jilles [Sat, 11 Feb 2012 21:06:45 +0000 (21:06 +0000)]
sh: Make 'hash' return 1 if at least one utility is not found.

Reported by: lme

12 years agoMove utmpx handling out of init(8).
ed [Sat, 11 Feb 2012 20:47:16 +0000 (20:47 +0000)]
Move utmpx handling out of init(8).

This has the following advantages:

- During boot, the BOOT_TIME record is now written right after the file
  systems become writable, but before users are allowed to log in. This
  means that they can't cause `hidden logins' by logging in right before
  init(8) kicks in.

- The pututxline(3) function may potentially block on file locking,
  though this is very rare to occur. By placing it in an rc script, the
  user can still kill it with ^C if needed.

- Most importantly: jails don't use init(8). This means that a force
  reboot of a system running jails will leave stale entries in the
  accounting database of the jails individually.

12 years agoMFp4 204292:
bz [Sat, 11 Feb 2012 20:43:01 +0000 (20:43 +0000)]
MFp4 204292:

Ignore the NAT_T extension types so we can at least dump the SADB from
the in-base libipsec/setkey without error when NAT_T support is present
in the kernel, though not printing the additional information yet.
However in case there is no NAT_T support in kernel still consider them
to be an error.

MFC after: 8 weeks

12 years agoReplace utxrm(8) by utx(8).
ed [Sat, 11 Feb 2012 20:28:42 +0000 (20:28 +0000)]
Replace utxrm(8) by utx(8).

At first, I added a utility called utxrm(8) to remove stale entries from
the user accounting database. It seems there are cases in which we need
to perform different operations on the database as well. Simply rename
utxrm(8) to utx(8) and place the old code under the "rm" command.

In addition to "rm", this tool supports "boot" and "shutdown", which are
going to be used by an rc-script which I am going to commit separately.

12 years agoClose a race due to dropping of the map lock between creating map entry
kib [Sat, 11 Feb 2012 17:29:07 +0000 (17:29 +0000)]
Close a race due to dropping of the map lock between creating map entry
for a shared mapping and marking the entry for inheritance.
Other thread might execute vmspace_fork() in between (e.g. by fork(2)),
resulting in the mapping becoming private.

Noted and reviewed by: alc
MFC after: 1 week

12 years agoNice range comparison.
pjd [Sat, 11 Feb 2012 16:41:52 +0000 (16:41 +0000)]
Nice range comparison.

MFC after: 3 days

12 years agoReverting last change r231449 (fix bin/164947) due to concerns voiced
cracauer [Sat, 11 Feb 2012 16:34:03 +0000 (16:34 +0000)]
Reverting last change r231449 (fix bin/164947) due to concerns voiced
on src-committers and the fact that I can only take care of this in a
week.

12 years agoThe PTRACESTOP() macro is used only once. Inline the only use and remove
kib [Sat, 11 Feb 2012 14:49:25 +0000 (14:49 +0000)]
The PTRACESTOP() macro is used only once. Inline the only use and remove
the macro.

MFC after: 1 week

12 years agoProperly name the sysctl to "iflistl" rather than "iflist2", which had been
bz [Sat, 11 Feb 2012 13:41:38 +0000 (13:41 +0000)]
Properly name the sysctl to "iflistl" rather than "iflist2", which had been
the prototype name and slipped in in r231505.

Spotted in a reply from: bde
MFC after: 3 days

12 years agoFlesh out support for SAS1078 and SAS1078DE (which are said to actually
marius [Sat, 11 Feb 2012 12:03:44 +0000 (12:03 +0000)]
Flesh out support for SAS1078 and SAS1078DE (which are said to actually
be the same chip):
- The I/O port resource may not be available with these. However, given
  that we actually only need this resource for some controllers that
  require their firmware to be up- and downloaded (which excludes the
  SAS1078{,DE}) just handle failure to allocate this resource gracefully
  when possible. While at it, generally put non-fatal resource allocation
  failures under bootverbose.
- SAS1078{,DE} use a different hard reset protocol.
- Add workarounds for the 36GB physical address limitation of scatter/
  gather elements of these controllers.

Tested by: Slawa Olhovchenkov

PR: 149220 (remaining part)

12 years agoAdd myself to calendar.
dmarion [Sat, 11 Feb 2012 11:24:30 +0000 (11:24 +0000)]
Add myself to calendar.

Approved by:     cognet (mentor)

12 years agoUse the correct constant (with same value) for comparying the SA type.
bz [Sat, 11 Feb 2012 11:11:43 +0000 (11:11 +0000)]
Use the correct constant (with same value) for comparying the SA type.

PR: kern/142741
Submitted by: Matthijs Kooiman (matthijs stdin.nl)
MFC after: 3 days

12 years agoSet read buffer size to multiple of sizeof(struct futx).
ed [Sat, 11 Feb 2012 11:11:13 +0000 (11:11 +0000)]
Set read buffer size to multiple of sizeof(struct futx).

If the utmpx database gets updated while an application is reading it,
there is a chance the reading application processes partially
overwritten entries. To solve this, make sure we always read a multiple
of sizeof(struct futx) at a time.

MFC after: 2 weeks

12 years agoDepend on the relevant header files.
bz [Sat, 11 Feb 2012 08:34:33 +0000 (08:34 +0000)]
Depend on the relevant header files.

12 years agoStart to try to hide LRO (and some TSO) bits behind #ifdefs as especially
bz [Sat, 11 Feb 2012 08:33:52 +0000 (08:33 +0000)]
Start to try to hide LRO (and some TSO) bits behind #ifdefs as especially
the symbols are not there when compiling a kernel without IP support and
we do have users doing so.

12 years agoRemove unused variable mii
kevlo [Sat, 11 Feb 2012 08:12:52 +0000 (08:12 +0000)]
Remove unused variable mii

12 years agoUse the more common macro to set the if_baudrate to 10Gbit/s. Just use
bz [Sat, 11 Feb 2012 07:47:06 +0000 (07:47 +0000)]
Use the more common macro to set the if_baudrate to 10Gbit/s.  Just use
UL not ULL, which should make 32bit archs more happy.

12 years agoMake use of the read-only variant of the IF_ADDR_*LOCK() macros introduced
bz [Sat, 11 Feb 2012 07:43:33 +0000 (07:43 +0000)]
Make use of the read-only variant of the IF_ADDR_*LOCK() macros introduced
in r229614 rather than the compat one.

12 years agoIn the days before r208307 addswap was running early in the second stage
dougb [Sat, 11 Feb 2012 06:21:16 +0000 (06:21 +0000)]
In the days before r208307 addswap was running early in the second stage
of rcorder. Somehow in the intervening period addswap got moved to the
very end, which is almost certainly not what we want.

This change moves it to right after kld so that for users who need it,
they'll get it ASAP.

12 years agoSwitch getifaddrs(3) to the new API introduced in r231505. Also remove
bz [Sat, 11 Feb 2012 06:05:40 +0000 (06:05 +0000)]
Switch getifaddrs(3) to the new API introduced in r231505.  Also remove
conditional code parts not used by or applicable to FreeBSD.

The new implementation is supposed to be able to cope with changes to
the 'l' versions of the msghdr structs now used as well as to if_data
allowing future changes without breaking things.

This restores carp(4) config support in HEAD after r231504.

Reviewed by: glebius, brooks
MFC After: 3 months

12 years agoIntroduce a new NET_RT_IFLISTL API to query the address list. It works
bz [Sat, 11 Feb 2012 06:02:16 +0000 (06:02 +0000)]
Introduce a new NET_RT_IFLISTL API to query the address list.  It works
on extended and extensible structs if_msghdrl and ifa_msghdrl.  This
will allow us to extend both the msghdrl structs and eventually if_data
in the future without breaking the ABI.

Bump __FreeBSD_version to allow ports to more easily detect the new API.

Reviewed by: glebius, brooks
MFC after: 3 days

12 years agoBackout changes from r228571. Remove if_data from struct ifa_msghdr again.
bz [Sat, 11 Feb 2012 05:59:54 +0000 (05:59 +0000)]
Backout changes from r228571.  Remove if_data from struct ifa_msghdr again.
While this breaks carp on HEAD temporary, it restores the upgrade path from
stable, and head before 20111215.

Reviewed by: glebius, brooks

12 years agoMake code more stable by checking NULL pointers.
davidxu [Sat, 11 Feb 2012 04:12:12 +0000 (04:12 +0000)]
Make code more stable by checking NULL pointers.

12 years agoAdd handlers for TLS-related relocation entries
gonzo [Sat, 11 Feb 2012 00:54:57 +0000 (00:54 +0000)]
Add handlers for TLS-related relocation entries

12 years agoReturn BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR from the mps driver
ken [Sat, 11 Feb 2012 00:28:30 +0000 (00:28 +0000)]
Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR from the mps driver
probe routine.

This will allow LSI to ship drivers that return BUS_PROBE_VENDOR to
override the in-tree version of the driver.

MFC after: 3 days

12 years agoDe-obfuscate acpi_acquire_global_lock(). It seems the function was directly
jkim [Fri, 10 Feb 2012 23:30:29 +0000 (23:30 +0000)]
De-obfuscate acpi_acquire_global_lock().  It seems the function was directly
translated from i386 assembly version.

12 years ago- Reverse logic so base tls is fixed up with correct number
gonzo [Fri, 10 Feb 2012 23:24:33 +0000 (23:24 +0000)]
- Reverse logic so base tls is fixed up with correct number

12 years agoFix bin/164947: tee looses data when writing to non-blocking file descriptors
cracauer [Fri, 10 Feb 2012 22:16:17 +0000 (22:16 +0000)]
Fix bin/164947: tee looses data when writing to non-blocking file descriptors

tee was not handling EAGAIN

patch submitted by Diomidis Spinellis <dds@aueb.gr>. Thanks so much

reproduced and re-tested locally

12 years agoAdd a test program for recently added ptrace(2) interfaces.
kib [Fri, 10 Feb 2012 21:33:12 +0000 (21:33 +0000)]
Add a test program for recently added ptrace(2) interfaces.

MFC after: 1 week

12 years agoIn cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for
kib [Fri, 10 Feb 2012 21:26:25 +0000 (21:26 +0000)]
In cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for
both 64bit and 32bit binaries, not for 64bit only.

The set of the flag is not neccessary there, because the only current
user of the cpu_set_user_tls() is create_thread(), which calls
cpu_set_upcall() before and cpu_set_upcall() itself sets PCB_FULL_IRET.
Change the function for consistency and preserve existing KPI for now.

MFC after: 1 week

12 years agoAdd a driver for Emulex OneConnect ethernet cards (10 Gbit PCIe)
luigi [Fri, 10 Feb 2012 21:03:04 +0000 (21:03 +0000)]
Add a driver for Emulex OneConnect ethernet cards (10 Gbit PCIe)
A manpage will come in a future commit.

Submitted by:   Naresh Raju Gottumukkala (emulex)

12 years agoRemove debug output
gonzo [Fri, 10 Feb 2012 19:58:04 +0000 (19:58 +0000)]
Remove debug output

12 years ago- Fix spelling of R_MIPS_RELGOT
gonzo [Fri, 10 Feb 2012 19:17:14 +0000 (19:17 +0000)]
- Fix spelling of R_MIPS_RELGOT
- Add R_MIPS_JALR relocation
- Add TLS relocation types

Obtained from: NetBSD

12 years agoReduce diffs against i386.
nyan [Fri, 10 Feb 2012 15:34:36 +0000 (15:34 +0000)]
Reduce diffs against i386.

MFC after: 1 week

12 years agoRemove unneeded newline. It fits in 80 columns now.
ed [Fri, 10 Feb 2012 14:55:47 +0000 (14:55 +0000)]
Remove unneeded newline. It fits in 80 columns now.

Pointed out by: jh

12 years agoCorrect date. It seems to be 2012.
ed [Fri, 10 Feb 2012 13:51:02 +0000 (13:51 +0000)]
Correct date. It seems to be 2012.

12 years agoUnbreak build.
ed [Fri, 10 Feb 2012 13:47:40 +0000 (13:47 +0000)]
Unbreak build.

libprocstat still uses __si_namebuf.

12 years agoDetect file modification properly by using tv_nsec.
ed [Fri, 10 Feb 2012 13:40:32 +0000 (13:40 +0000)]
Detect file modification properly by using tv_nsec.

POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond
precision to detect file modification.

MFC after: 2 weeks

12 years agoMerge si_name and __si_namebuf.
ed [Fri, 10 Feb 2012 12:40:50 +0000 (12:40 +0000)]
Merge si_name and __si_namebuf.

The si_name pointer always points to the __si_namebuf member inside the
same object. Remove it and rename __si_namebuf to si_name.

12 years agoRemove direct access to si_name.
ed [Fri, 10 Feb 2012 12:35:57 +0000 (12:35 +0000)]
Remove direct access to si_name.

Code should just use the devtoname() function to obtain the name of a
character device. Also add const keywords to pieces of code that need it
to build properly.

MFC after: 2 weeks

12 years agoBe more helpful about alternate superblocks.
trasz [Fri, 10 Feb 2012 12:01:19 +0000 (12:01 +0000)]
Be more helpful about alternate superblocks.

12 years agoRemove outdated piece of information.
ed [Fri, 10 Feb 2012 11:20:13 +0000 (11:20 +0000)]
Remove outdated piece of information.

devtoname() always returns a pathname to the device. It will never
return a #major/minor string.

MFC after: 2 weeks

12 years agoEnforce the hardware chainmask when allowing the user to override the
adrian [Fri, 10 Feb 2012 10:10:41 +0000 (10:10 +0000)]
Enforce the hardware chainmask when allowing the user to override the
chainmask.

This way a disabled radio chain can't be enabled by a user.

12 years ago.. oops, use the right chainmask.
adrian [Fri, 10 Feb 2012 10:09:16 +0000 (10:09 +0000)]
.. oops, use the right chainmask.

12 years agoAdd in a new driver feature to allow the TX and RX chainmask to be
adrian [Fri, 10 Feb 2012 10:01:09 +0000 (10:01 +0000)]
Add in a new driver feature to allow the TX and RX chainmask to be
overridden at attach time.

Some 802.11n NICs may only have one physical antenna connected.
The radios will be very upset if you try enabling radios which aren't
connected to antennas.

This allows hints to override the TX and RX chainmask.

These hints are:

hint.ath.X.rx_chainmask
hint.ath.X.tx_chainmask

They can be set at either boot time or in kenv before the module is loaded.

This and the previous HAL commit were sponsored in late 2011 by Hobnob, Inc.

Sponsored by: Hobnob, Inc.

12 years agoExtend the HAL code to allow the RX and TX chainmask to be overridden
adrian [Fri, 10 Feb 2012 09:58:20 +0000 (09:58 +0000)]
Extend the HAL code to allow the RX and TX chainmask to be overridden
by capabilities.

Add an ar5416SetCapability() function, which contains logic to override
the chainmask and update the relevant stream.

This is designed to be called after the attach function, which presets
the TX/RX chainmask and stream.

TODO: check the chainmask against the hardware chainmask so non-existing
chains aren't enabled.

12 years agoAdd alias for the partition with type 0x42 to the MBR scheme.
ae [Fri, 10 Feb 2012 09:55:18 +0000 (09:55 +0000)]
Add alias for the partition with type 0x42 to the MBR scheme.

MFC after: 1 week

12 years agoFix-up value passed by thr_new syscall to make it compatible
gonzo [Fri, 10 Feb 2012 07:03:45 +0000 (07:03 +0000)]
Fix-up value passed by thr_new syscall to make it compatible
with MIPS_TLS_GET/MIPS_TLS_SET sysarch API.

12 years agoSwitch MIPS TLS implementation to Variant I:
gonzo [Fri, 10 Feb 2012 06:53:25 +0000 (06:53 +0000)]
Switch MIPS TLS implementation to Variant I:

Save pointer to the TLS structure taking into account TP_OFFSET
and TCB structure size.

12 years agoLet's be more realistic and limit maximum number of partition to 4k.
ae [Fri, 10 Feb 2012 06:44:30 +0000 (06:44 +0000)]
Let's be more realistic and limit maximum number of partition to 4k.

MFC after: 1 week

12 years agoSwitch MIPS TLS implementation to Variant I
gonzo [Fri, 10 Feb 2012 06:42:50 +0000 (06:42 +0000)]
Switch MIPS TLS implementation to Variant I

12 years agoAdd a missing break. This bug was introduced in r228856.
kevlo [Fri, 10 Feb 2012 06:30:52 +0000 (06:30 +0000)]
Add a missing break. This bug was introduced in r228856.

12 years agoImplement -print-file-name=include (which is undocumented
kientzle [Fri, 10 Feb 2012 05:05:42 +0000 (05:05 +0000)]
Implement -print-file-name=include (which is undocumented
but used by some Linux boot loaders).  This option prints
out the directory holding the include files needed by
a freestanding program.  The default implementation of
this doesn't work on FreeBSD because of the different
include file layout.  But it's easy to implement:
just return /usr/include (or the cross-compiling equivalent).

Reviewed by: kan
MFC after: 1 week

12 years agoFix date from r231111.
gjb [Fri, 10 Feb 2012 03:34:32 +0000 (03:34 +0000)]
Fix date from r231111.

Pointy-hat to: gjb (myself, approver of r231111)

12 years agoFix debug output for MIPS part of rtld
gonzo [Fri, 10 Feb 2012 03:30:57 +0000 (03:30 +0000)]
Fix debug output for MIPS part of rtld

12 years agoFix r231300: Use correct test so we only bail out on error instead of on non-error.
eadler [Fri, 10 Feb 2012 00:53:39 +0000 (00:53 +0000)]
Fix r231300: Use correct test so we only bail out on error instead of on non-error.
Also, fix a style bug.

Submitted by: ache
Approved by: cperciva
MFC after: 1 month

12 years agoMark the automatically attached child with PL_FLAG_CHILD in struct
kib [Fri, 10 Feb 2012 00:02:13 +0000 (00:02 +0000)]
Mark the automatically attached child with PL_FLAG_CHILD in struct
lwpinfo flags, for PT_FOLLOWFORK auto-attachment.

In collaboration with: Dmitry Mikulin <dmitrym juniper net>
MFC after:  1 week

12 years agoAdd IPv6 TSO (including TSO+VLAN) support to cxgb(4).
np [Thu, 9 Feb 2012 23:19:09 +0000 (23:19 +0000)]
Add IPv6 TSO (including TSO+VLAN) support to cxgb(4).

If an IPv6 packet has extension headers the kernel needs to deal with it
itself.  For the rest it can set various CSUM_XXX flags and the driver
will act on them.

12 years agoFix n32 build breakage
gonzo [Thu, 9 Feb 2012 22:48:35 +0000 (22:48 +0000)]
Fix n32 build breakage

12 years agoHistorically when an application wrote an entire block of a file,
mckusick [Thu, 9 Feb 2012 22:34:16 +0000 (22:34 +0000)]
Historically when an application wrote an entire block of a file,
the kernel allocated a buffer but did not zero it as it was about
to be completely filled by a uiomove() from the user's buffer.
However, if the uiomove() failed, the old contents of the buffer
could be exposed especially if the file was being mmap'ed. The
fix was to always zero the buffer when it was allocated.

This change first attempts the uiomove() to the newly allocated
(and dirty) buffer and only zeros it if the uiomove() fails. The
effect is to eliminate the gratuitous zeroing of the buffer in
the usual case where the uiomove() successfully fills it.

Reviewed by:    kib
Tested by:      scottl
MFC after:      2 weeks (to 9 only)

12 years ago- Emulate RDHWR instruction for TLS support
gonzo [Thu, 9 Feb 2012 22:17:13 +0000 (22:17 +0000)]
- Emulate RDHWR instruction for TLS support

Reading register $29 with RDHWR is becoming the de-facto standard to
implement TLS.  According to linux-mips wiki, MIPS Technologies has
reserved hardware register $29 for ABI use.  Furthermore current GCC
makes the following assumptions:
- RDHWR is natively available or otherwise emulated by the kernel
- Register $29 holds the TLS pointer

Submitted by: Robert Millan <rmh@debian.org>

12 years agoFix NULL ptr dereference in setusercontext if pwd is null,
eadler [Thu, 9 Feb 2012 21:06:47 +0000 (21:06 +0000)]
Fix NULL ptr dereference in setusercontext if pwd is null,
LOGIN_SETPRIORITY is set, and setting the priority (rtprio or
setpriority) fails.

PR: kern/164238
Submitted by: Alexander Wittig <alexander@wittig.name>
Reviewed by: des
Approved by: cperciva
MFC after: 1 month

12 years agoPermit the use of relative paths for the prefix argument.
eadler [Thu, 9 Feb 2012 20:51:03 +0000 (20:51 +0000)]
Permit the use of relative paths for the prefix argument.
Remove an unnecessary cwd from created plists when -p is specified

PR: bin/145000
Submitted by: gcooper
Approved by: portmgr (flo)
MFC after: 1 month

12 years agoMore accurately document what happens on error.
eadler [Thu, 9 Feb 2012 20:49:03 +0000 (20:49 +0000)]
More accurately document what happens on error.

PR: docs/127908
Submitted by: Matthew D. Fuller <fullermd@over-yonder.net>
Approved by: cperciva
MFC after: 1 week

12 years agoMake etc/Makefile more conflict resistant
eadler [Thu, 9 Feb 2012 20:44:20 +0000 (20:44 +0000)]
Make etc/Makefile more conflict resistant

PR: conf/163789
Submitted by: gcooper (iXsystems)
Approved by: cperciva
MFC after: 3 days

12 years agoRemove explicit CC assignment in isci(4) Makefile to allow for building
jimharris [Thu, 9 Feb 2012 17:50:24 +0000 (17:50 +0000)]
Remove explicit CC assignment in isci(4) Makefile to allow for building
with clang.  Also fix a number of warnings uncovered when building with
clang around some implicit enum conversions.

Sponsored by: Intel
Approved by: scottl

12 years agoRefine r231226. Swap timecounters before suspending any device drivers.
jkim [Thu, 9 Feb 2012 17:38:08 +0000 (17:38 +0000)]
Refine r231226.  Swap timecounters before suspending any device drivers.

12 years agoRemove full debugger options and enable KDB_TRACE option instead to decrease
nyan [Thu, 9 Feb 2012 14:15:56 +0000 (14:15 +0000)]
Remove full debugger options and enable KDB_TRACE option instead to decrease
kernel size and increase performance.

12 years agoAdding myself as a new committer
matthew [Thu, 9 Feb 2012 14:15:20 +0000 (14:15 +0000)]
Adding myself as a new committer

Approved by: shaun (mentor)

12 years agoAdd myself as a new committer
matthew [Thu, 9 Feb 2012 14:13:56 +0000 (14:13 +0000)]
Add myself as a new committer

Approved by: shaun (mentor)

12 years ago- Disable the olpt driver. Because it conflicts with the ppc/lpt driver.
nyan [Thu, 9 Feb 2012 14:00:49 +0000 (14:00 +0000)]
- Disable the olpt driver.   Because it conflicts with the ppc/lpt driver.
- Remove obsolete comment.

MFC after: 3 days

12 years agoAllow mounting nullfs(5) inside jails.
mm [Thu, 9 Feb 2012 10:39:01 +0000 (10:39 +0000)]
Allow mounting nullfs(5) inside jails.

This is now possible thanks to r230129.

MFC after: 1 month

12 years agoAdd support for mounting devfs inside jails.
mm [Thu, 9 Feb 2012 10:22:08 +0000 (10:22 +0000)]
Add support for mounting devfs inside jails.

A new jail(8) option "devfs_ruleset" defines the ruleset enforcement for
mounting devfs inside jails. A value of -1 disables mounting devfs in
jails, a value of zero means no restrictions. Nested jails can only
have mounting devfs disabled or inherit parent's enforcement as jails are
not allowed to view or manipulate devfs(8) rules.

Utilizes new functions introduced in r231265.

Reviewed by: jamie
MFC after: 1 month