]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoWhen using flowtable llentrys can outlive the interface with which they're associated
kmacy [Thu, 23 Feb 2012 18:21:37 +0000 (18:21 +0000)]
When using flowtable llentrys can outlive the interface with which they're associated
at which the lle_tbl pointer points to freed memory and the llt_free pointer is no longer
valid.

Move the free pointer in to the llentry itself and update the initalization sites.

MFC after: 2 weeks

12 years agoAdd pt_BR.ISO8859-1 and pt_BR.UTF-8 directories to install.
osa [Thu, 23 Feb 2012 17:47:48 +0000 (17:47 +0000)]
Add pt_BR.ISO8859-1 and pt_BR.UTF-8 directories to install.
It was forgotten in r219937 commit.

Approved by: edwin
MFC after: 1 week

12 years agoCatch up with r195837 (2.5 years ago) which renamed net_add_domain() to domain_add().
brueffer [Thu, 23 Feb 2012 17:47:19 +0000 (17:47 +0000)]
Catch up with r195837 (2.5 years ago) which renamed net_add_domain() to domain_add().

PR: 165424
Submitted by: Lachlan Kang
MFC after: 1 week

12 years agohrs@ reported a panic to freebsd-stable@ under the subject line
rmacklem [Thu, 23 Feb 2012 16:47:05 +0000 (16:47 +0000)]
hrs@ reported a panic to freebsd-stable@ under the subject line
"panic in 8.3-PRERELEASE" on Feb. 22, 2012. This panic was caused
by use of a mix of tsleep() and msleep() calls on the same event
in the new NFS server DRC code. It did "mtx_unlock(); tsleep();"
in two places, which kib@ noted introduced a slight risk that the
wakeup() would occur before the tsleep(), resulting in a 10sec
delay before waking up. This patch fixes the problem by replacing
"mtx_unlock(); tsleep();" with mtx_sleep(..PDROP..). It also
changes a nfsmsleep() call to mtx_sleep() so that the code uses
mtx_sleep() consistently within the file.

Tested by: hrs (in progress)
Reviewed by: jhb
MFC after: 5 days

12 years agoAllow the parent to gather the exit status of the children reparented
kib [Thu, 23 Feb 2012 11:50:23 +0000 (11:50 +0000)]
Allow the parent to gather the exit status of the children reparented
to the debugger.  When reparenting for debugging, keep the child in
the new orphan list of old parent.  When looping over the children in
kern_wait(), iterate over both children list and orphan list to search
for the process by pid.

Submitted by: Dmitry Mikulin <dmitrym juniper.net>
MFC after: 2 weeks

12 years agoUse the passed-in channel rather than ic->ic_curchan.
adrian [Thu, 23 Feb 2012 08:32:54 +0000 (08:32 +0000)]
Use the passed-in channel rather than ic->ic_curchan.

I'm not sure _why_ the ic is NULL here, but I've seen it occasionally do
this after I've been tinkering with things for a while.  It ends up
crashing in a call to ath_chan_set() via the net80211 scan code and scan
task.

12 years agoAdd check for IFF_DRV_RUNNING flag after serving an interrupt and
yongari [Thu, 23 Feb 2012 08:22:44 +0000 (08:22 +0000)]
Add check for IFF_DRV_RUNNING flag after serving an interrupt and
don't give RX path more priority than TX path.
Also remove infinite loop in interrupt handler and limit number of
iteration to 32. This change addresses system load fluctuations
under high network load.

12 years agoAvoid creating PCM devices for MIDI adapters.
hselasky [Thu, 23 Feb 2012 07:56:19 +0000 (07:56 +0000)]
Avoid creating PCM devices for MIDI adapters.

MFC after: 3 days

12 years agoWith r232015, sf(4) gets correct speed/duplex of established link.
yongari [Thu, 23 Feb 2012 06:35:18 +0000 (06:35 +0000)]
With r232015, sf(4) gets correct speed/duplex of established link.
Add more strict speed check in sf_miibus_statchg() and do not touch
MAC config registers when driver lost a link.

12 years agoNow that network interfaces advertise if they support linkstate notifications
thompsa [Thu, 23 Feb 2012 06:26:16 +0000 (06:26 +0000)]
Now that network interfaces advertise if they support linkstate notifications
we do not need to perform a media ioctl every 15 seconds.

12 years agoRemove taskqueue based MII stat change handler.
yongari [Thu, 23 Feb 2012 06:13:12 +0000 (06:13 +0000)]
Remove taskqueue based MII stat change handler.
Driver does not need deferred link state change processing.
While I'm here, do not report current link status if interface is
not UP.

12 years agoNo need to reprogram hardware RX filter when driver is not running.
yongari [Thu, 23 Feb 2012 05:25:14 +0000 (05:25 +0000)]
No need to reprogram hardware RX filter when driver is not running.

12 years agoIntroduce sf_ifmedia_upd_locked() and have driver reset PHY before
yongari [Thu, 23 Feb 2012 05:23:21 +0000 (05:23 +0000)]
Introduce sf_ifmedia_upd_locked() and have driver reset PHY before
switching to selected media.  While here, set if_drv_flags before
switching to selected media.

12 years agoIf there are not enough RX buffers, release partially allocated RX
yongari [Thu, 23 Feb 2012 05:14:11 +0000 (05:14 +0000)]
If there are not enough RX buffers, release partially allocated RX
buffers.

12 years agoGive hardware chance to drain active DMA cycles.
yongari [Thu, 23 Feb 2012 05:10:00 +0000 (05:10 +0000)]
Give hardware chance to drain active DMA cycles.

12 years agoConnect smcphy(4) to mii module build.
yongari [Thu, 23 Feb 2012 01:22:40 +0000 (01:22 +0000)]
Connect smcphy(4) to mii module build.

12 years agoAdd Seeq Technology 80220 PHY support to smcphy(4). This PHY is
yongari [Thu, 23 Feb 2012 01:20:21 +0000 (01:20 +0000)]
Add Seeq Technology 80220 PHY support to smcphy(4).  This PHY is
found on Adaptec AIC-6915 Starfire ethernet controller.
While here, use status register to know resolved speed/duplex.
With this change, sf(4) correctly reports speed/duplex of
established link.

Reviewed by: marius

12 years agobstp_input() always consumes the packet so remove the mbuf handling dance
thompsa [Thu, 23 Feb 2012 00:59:21 +0000 (00:59 +0000)]
bstp_input() always consumes the packet so remove the mbuf handling dance
around it.

Obtained from: OpenBSD (r1.37)

12 years agoXref the following in wlan(4):
gjb [Wed, 22 Feb 2012 22:40:20 +0000 (22:40 +0000)]
Xref the following in wlan(4):

- bwn(4)
- mwl(4)
- run(4)

MFC after: 3 days

12 years agoDocument the net.link.lagg.X.use_flowid sysctl from r232008.
thompsa [Wed, 22 Feb 2012 22:29:23 +0000 (22:29 +0000)]
Document the net.link.lagg.X.use_flowid sysctl from r232008.

12 years agoMake it clear that fec is just an alias
thompsa [Wed, 22 Feb 2012 22:09:17 +0000 (22:09 +0000)]
Make it clear that fec is just an alias

12 years agoUsing the flowid in the mbuf assumes the network card is giving a good hash for
thompsa [Wed, 22 Feb 2012 22:01:30 +0000 (22:01 +0000)]
Using the flowid in the mbuf assumes the network card is giving a good hash for
the traffic flow, this may not be the case giving poor traffic distribution.
Add a sysctl which allows us to fall back to our own flow hash code.

PR: kern/164901
Submitted by: Eugene Grosbein
MFC after: 1 week

12 years agolibc: Eliminate some relative relocations in fmtmsg().
jilles [Wed, 22 Feb 2012 21:47:50 +0000 (21:47 +0000)]
libc: Eliminate some relative relocations in fmtmsg().

12 years agoo Use ISO 3166 county code for Sweden.
maxim [Wed, 22 Feb 2012 21:08:58 +0000 (21:08 +0000)]
o Use ISO 3166 county code for Sweden.

PR: standards/165400
Submitted by: Carsten Hey
MFC after: 1 week

12 years agoProperly lock DQREF() with dqhlock. Missed locking caused counter
kib [Wed, 22 Feb 2012 20:03:51 +0000 (20:03 +0000)]
Properly lock DQREF() with dqhlock. Missed locking caused counter
corruption.

Assert that the dq reference value is sane before decrementing it.

Reported and tested by: pho
MFC after: 1 week

12 years agoRemove wrong comment.
kib [Wed, 22 Feb 2012 20:01:38 +0000 (20:01 +0000)]
Remove wrong comment.

Discussed with: alc
MFC after: 3 days

12 years agoDragonFly 3.0.1 added.
maxim [Wed, 22 Feb 2012 17:52:53 +0000 (17:52 +0000)]
DragonFly 3.0.1 added.

12 years agoFix various typos and normalize spelling.
jpaetzel [Wed, 22 Feb 2012 15:05:19 +0000 (15:05 +0000)]
Fix various typos and normalize spelling.

Approved by: kib (mentor)

12 years agoUse DOINGASYNC() to test for async allowance, to honor VFS syncing requests.
kib [Wed, 22 Feb 2012 13:01:17 +0000 (13:01 +0000)]
Use DOINGASYNC() to test for async allowance, to honor VFS syncing requests.

Noted by: bde
MFC after: 1 week

12 years agoRevert r231829, that was my braino.
glebius [Wed, 22 Feb 2012 09:08:51 +0000 (09:08 +0000)]
Revert r231829, that was my braino.

12 years agoFix typo.
davidxu [Wed, 22 Feb 2012 07:34:23 +0000 (07:34 +0000)]
Fix typo.

12 years agoHandle NULL return from crypt(3). Mostly from DragonFly
kevlo [Wed, 22 Feb 2012 06:27:20 +0000 (06:27 +0000)]
Handle NULL return from crypt(3). Mostly from DragonFly

12 years agoRemove reference to gsched_as module, which doesn't
eadler [Wed, 22 Feb 2012 04:51:17 +0000 (04:51 +0000)]
Remove reference to gsched_as module, which doesn't
actually exist.

PR: docs/163043
Submitted by: olgeni
Approved by: brd
MFC after: 3 days

12 years agoDon't use `m' after m_megapullup.
ae [Wed, 22 Feb 2012 04:19:33 +0000 (04:19 +0000)]
Don't use `m' after m_megapullup.

PR: kern/165373
MFC after: 3 days

12 years agoUpdate to tcsh 6.18.01.
mp [Wed, 22 Feb 2012 03:36:15 +0000 (03:36 +0000)]
Update to tcsh 6.18.01.

12 years agoUse unused fourth argument of umtx_op to pass flags to kernel for operation
davidxu [Wed, 22 Feb 2012 03:22:49 +0000 (03:22 +0000)]
Use unused fourth argument of umtx_op to pass flags to kernel for operation
UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower
16bits is used to pass flags. The change saves a clock_gettime() syscall
from libthr.

12 years agoRefctor address assignment for Octeon's ethernet ports:
gonzo [Wed, 22 Feb 2012 01:30:25 +0000 (01:30 +0000)]
Refctor address assignment for Octeon's ethernet ports:

- Centralize address assignment
- Make sure managment ports get first MAC address in pool
- Properly propagate fail if address allocation failed

Submitted by: Andrew Duane <aduane@juniper.net>

12 years agoReturn NULL on error rather than ":", per the crypt(3) man page.
kevlo [Wed, 22 Feb 2012 01:23:14 +0000 (01:23 +0000)]
Return NULL on error rather than ":", per the crypt(3) man page.
Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15/3

12 years agoFix memset sizeof
kevlo [Wed, 22 Feb 2012 01:08:59 +0000 (01:08 +0000)]
Fix memset sizeof

12 years agolibc: Add some tests for fmtmsg().
jilles [Tue, 21 Feb 2012 23:46:41 +0000 (23:46 +0000)]
libc: Add some tests for fmtmsg().

12 years agoWhen building with clang, disable -Wformat-security for
dim [Tue, 21 Feb 2012 21:20:52 +0000 (21:20 +0000)]
When building with clang, disable -Wformat-security for
sys/dev/hpt27xx/osm_bsd.c, since it gets the following warnings:

sys/dev/hpt27xx/osm_bsd.c:1180:25: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
            S_IRUSR | S_IWUSR, driver_name);
                               ^~~~~~~~~~~
@/dev/hpt27xx/hpt27xx_config.h:46:21: note: expanded from:
#define driver_name hpt27xx_driver_name
                    ^~~~~~~~~~~~~~~~~~~

Since 'hpt27xx_driver_name' is a constant string symbol (coming from the
proprietary hpt27xx_lib.o file), there is no security problem.

Because this driver is provided by the vendor, and applying changes
requires re-certification and other bureaucratic exercises, just disable
the warning for now.

MFC after: 1 week

12 years agoWhen building with clang, disable -Wunneeded-internal-declaration for
dim [Tue, 21 Feb 2012 20:55:43 +0000 (20:55 +0000)]
When building with clang, disable -Wunneeded-internal-declaration for
several sys/cam/ctl files, since these get the following warnings:

In file included from sys/cam/ctl/ctl_backend.c:60:
sys/cam/ctl/ctl_private.h:300:30: error: variable 'page_index_template' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static struct ctl_page_index page_index_template[] = {
                             ^

These warnings are tricky to fix without a lot of overhaul, and they are
harmless, so disable them for now.

MFC after: 1 week

12 years agounp_connect() may use a shared lock on the vnode to fetch the socket.
trociny [Tue, 21 Feb 2012 19:40:13 +0000 (19:40 +0000)]
unp_connect() may use a shared lock on the vnode to fetch the socket.

Suggested by: jhb
Reviewed by: jhb, kib, rwatson
MFC after: 2 weeks

12 years agoMake vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR.
trociny [Tue, 21 Feb 2012 19:35:59 +0000 (19:35 +0000)]
Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR.

Reviewed by: kib
MFC after: 1 week

12 years agoAvoid error log for transfer stop w/o error code.
emaste [Tue, 21 Feb 2012 14:59:07 +0000 (14:59 +0000)]
Avoid error log for transfer stop w/o error code.

A number of tftp clients, including the one in Intel's pxe boot loader,
may intentionally stop a transfer using error code 0 (i.e., EUNDEF).
These are not real errors.  Avoid spamming log files with these by
logging them at level LOG_DEBUG instead.

Discussed on -hackers with an initial patch proposal; this change is an
improved approach suggested by kan@.

12 years agoFix found places where uio_resid is truncated to int.
kib [Tue, 21 Feb 2012 01:05:12 +0000 (01:05 +0000)]
Fix found places where uio_resid is truncated to int.

Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the
sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from
the usermode.

Discussed with: bde, das (previous versions)
MFC after: 1 month

12 years agoDocument the fact that getgrouplist(3) returns 0 on success.
pjd [Mon, 20 Feb 2012 20:46:27 +0000 (20:46 +0000)]
Document the fact that getgrouplist(3) returns 0 on success.

MFC after: 3 days

12 years agoAdd oce(4) to the hardware notes.
brueffer [Mon, 20 Feb 2012 19:35:54 +0000 (19:35 +0000)]
Add oce(4) to the hardware notes.

MFC after: 3 days

12 years agoRemove redundant forward declaration of struct ieee80211com.
ray [Mon, 20 Feb 2012 15:05:21 +0000 (15:05 +0000)]
Remove redundant forward declaration of struct ieee80211com.

Approved by: bschmidt

12 years agoSet the O_CLOEXEC flag when opening the pidfile to avoid leaking the
ghelmer [Mon, 20 Feb 2012 13:59:24 +0000 (13:59 +0000)]
Set the O_CLOEXEC flag when opening the pidfile to avoid leaking the
file descriptor via exec(3).

Now that daemon(8) has been fixed to resolve the issue noted by trociny,
the consensus is that this change should be OK.

12 years agoMore improvements, the biggest one using list environments for enumerations.
brueffer [Mon, 20 Feb 2012 13:22:00 +0000 (13:22 +0000)]
More improvements, the biggest one using list environments for enumerations.

12 years agoRemove an unnecessary cast.
kevlo [Mon, 20 Feb 2012 09:56:14 +0000 (09:56 +0000)]
Remove an unnecessary cast.

12 years agoRevert r231923 for now. Further work is needed to make sure that the
delphij [Mon, 20 Feb 2012 09:32:32 +0000 (09:32 +0000)]
Revert r231923 for now.  Further work is needed to make sure that the
behavior is consistent.

12 years agoIf nested scheme allows dump kernel to its partition, we may allow
ae [Mon, 20 Feb 2012 06:35:52 +0000 (06:35 +0000)]
If nested scheme allows dump kernel to its partition, we may allow
dump for the parent partition too.

MFC after: 2 weeks

12 years agoAdd alias for the partition type 0x0f. Now "ebr" name is used for both
ae [Mon, 20 Feb 2012 05:48:57 +0000 (05:48 +0000)]
Add alias for the partition type 0x0f. Now "ebr" name is used for both
types 0x05 and 0x0f, but 0x05 is preferred and used when partition is
created with "gpart add -t ebr ...".
This should keep EBR partitions accessible after r231754 for those,
who have EBR on the partition with type 0x0f.

12 years agoBreak out the radar code into a separate source file.
adrian [Mon, 20 Feb 2012 03:07:07 +0000 (03:07 +0000)]
Break out the radar code into a separate source file.

This mirrors the internal HAL organisation and reduces the differences
between the HAL codebases slightly.

Obtained from: Atheros

12 years agoReturn BUS_PROBE_DEFAULT instead of 0 because this is an in-tree driver.
delphij [Mon, 20 Feb 2012 01:18:32 +0000 (01:18 +0000)]
Return BUS_PROBE_DEFAULT instead of 0 because this is an in-tree driver.

MFC after: 1 month

12 years agoUse uprintf instead of printf for the reason why a kernel module can not
delphij [Mon, 20 Feb 2012 01:05:17 +0000 (01:05 +0000)]
Use uprintf instead of printf for the reason why a kernel module can not
be loaded.  This way, the administrator can get response immediately from
the shell session rather than relying on dmesg.

MFC after: 1 month

12 years agoImport of tcsh-6.18.01
mp [Mon, 20 Feb 2012 00:53:59 +0000 (00:53 +0000)]
Import of tcsh-6.18.01

12 years ago- Trim empty lines resulting in bad rendering, EOL whitespaces
pluknet [Sun, 19 Feb 2012 18:16:42 +0000 (18:16 +0000)]
- Trim empty lines resulting in bad rendering, EOL whitespaces
- Convert to our standard SYNOPSIS language
- Consistently use "The .Nm driver"
- Rewrite .nf .fi block with mdoc
- Add pci dependency to SYNOPSIS
- Start .Bl list with new paragraph

Approved by: luigi

12 years agoProbe the National DP83849, which is a dual-port version of the PHYTER.
marius [Sun, 19 Feb 2012 12:25:58 +0000 (12:25 +0000)]
Probe the National DP83849, which is a dual-port version of the PHYTER.

Obtained from: NetBSD

12 years ago- Probe BCM57780.
marius [Sun, 19 Feb 2012 12:09:17 +0000 (12:09 +0000)]
- Probe BCM57780.
- In case the parent is bge(4), don't set the Jumbo frame settings unless
  the MAC actually is Jumbo capable as otherwise the PHY might not have the
  corresponding registers implemented. This is also in line with what the
  Linux tg3 driver does.

PR: 165032
Submitted by: Alexander Milanov
Obtained from: OpenBSD
MFC after: 3 days

12 years agoIf permitted protect the supervisor against pageout kill.
trociny [Sun, 19 Feb 2012 10:38:55 +0000 (10:38 +0000)]
If permitted protect the supervisor against pageout kill.

Suggested by: Andrey Zonov <andrey zonov org>
MFC after: 2 weeks

12 years agoAdd -r option to restart the program if it has been terminated.
trociny [Sun, 19 Feb 2012 10:36:29 +0000 (10:36 +0000)]
Add -r option to restart the program if it has been terminated.

Suggested by: Andrey Zonov <andrey zonov org>
MFC after: 2 weeks

12 years agoIf the supervising process receives SIGTERM, forward it to the spawned
trociny [Sun, 19 Feb 2012 10:23:51 +0000 (10:23 +0000)]
If the supervising process receives SIGTERM, forward it to the spawned
process.  Normally it will cause the child to exit followed by the
termination of the supervisor after removing the pidfile.

This looks like desirable behavior, because termination of a
supervisor usually supposes termination of its charge. Also it will
fix the issue with stale pid files after reboot due to init kills a
supervisor before its child exits.

MFC after: 2 weeks

12 years agoThe pidfile_open(3) is going to be fixed to set close-on-exec in order
trociny [Sun, 19 Feb 2012 10:20:37 +0000 (10:20 +0000)]
The pidfile_open(3) is going to be fixed to set close-on-exec in order
not to leak the descriptor after exec(3). This raises the issue for
daemon(3) of the pidfile lock to be lost when the child process
executes.

To solve this and also to have the pidfile cleaned up when the program
exits, if a pidfile is specified, spawn a child to exec the command
and wait in the parent keeping the pidfile locked until the child
process exits and remove the file.

Reported by: Andrey Zonov <andrey zonov org>
Suggested by: pjd
Reviewed by: pjd
MFC after: 2 weeks

12 years agoEnable the new PCI-PCI bridge driver by default.
andreast [Sun, 19 Feb 2012 10:10:12 +0000 (10:10 +0000)]
Enable the new PCI-PCI bridge driver by default.
Tested on 32- and 64-bit PowerMac.

12 years agoCheck both seconds and nanoseconds are zero, only checking nanoseconds
davidxu [Sun, 19 Feb 2012 08:17:14 +0000 (08:17 +0000)]
Check both seconds and nanoseconds are zero, only checking nanoseconds
is zero may trigger timeout too early. It seems a copy&paste bug.

12 years agoClose a race due to dropping of the map lock between creating a map entry
alc [Sun, 19 Feb 2012 00:28:49 +0000 (00:28 +0000)]
Close a race due to dropping of the map lock between creating a map entry
for a shared mapping and marking the entry for inheritance.

Reviewed by: kib
X-MFC after: r231526

12 years agoDocument PL_FLAG_CHILD.
kib [Sat, 18 Feb 2012 22:26:32 +0000 (22:26 +0000)]
Document PL_FLAG_CHILD.

MFC after: 3 days

12 years agoRemove two clang warnings.
tuexen [Sat, 18 Feb 2012 16:06:15 +0000 (16:06 +0000)]
Remove two clang warnings.

MFC after: 1 month.

12 years agoTry to ensure that ieee80211_newstate() and the vap_newstate methods
adrian [Sat, 18 Feb 2012 09:18:06 +0000 (09:18 +0000)]
Try to ensure that ieee80211_newstate() and the vap_newstate methods
hold the lock.

This is part of my series of work to try and capture when net80211
locking isn't.

ObNote: it'd be nice to be able to mark a lock as "assert if the lock
is dropped", so I could capture functions which decide that dropping
and reacquiring the lock is a good idea (without re-checking the
sanity of the state protected by the lock.)

12 years agoUse ANSI prototypes.
delphij [Sat, 18 Feb 2012 00:55:54 +0000 (00:55 +0000)]
Use ANSI prototypes.

12 years agoPut the signal trap output to standard error instead of standard output.
delphij [Sat, 18 Feb 2012 00:46:18 +0000 (00:46 +0000)]
Put the signal trap output to standard error instead of standard output.
Without this change, pressing ^T could result in rc.d script putting
junk strings like:

Script <filename> running

in configuration files when redirecting standard output to these files.

MFC after: 2 weeks

12 years agoFix misuse of the kernel map in miscellaneous image activators.
kib [Fri, 17 Feb 2012 23:47:16 +0000 (23:47 +0000)]
Fix misuse of the kernel map in miscellaneous image activators.
Vnode-backed mappings cannot be put into the kernel map, since it is a
system map.

Use exec_map for transient mappings, and remove the mappings with
kmem_free_wakeup() to notify the waiters on available map space.

Do not map the whole executable into KVA at all to copy it out into
usermode.  Directly use vn_rdwr() for the case of not page aligned
binary.

There is one place left where the potentially unbounded amount of data
is mapped into exec_map, namely, in the COFF image activator
enumeration of the needed shared libraries.

Reviewed by:   alc
MFC after:     2 weeks

12 years agoFix regression in the handling of blkback close events for
gibbs [Fri, 17 Feb 2012 22:33:46 +0000 (22:33 +0000)]
Fix regression in the handling of blkback close events for
devices that are unplugged via QEMU.

sys/dev/xen/blkback/blkback.c:
Toolstack initiated closures change the frontend's state
to Closing.  The backend must change to Closing as well,
even if we can't actually close yet, in order for the
frontend to notice and start the closing process.

MFC after: 3 days

12 years agoVarious cleanups for readability (no functional changes)
luigi [Fri, 17 Feb 2012 14:09:04 +0000 (14:09 +0000)]
Various cleanups for readability (no functional changes)

- remove the KEVENT code, which was incomplete and not compiled anyways;
- change some while() loops into for()
- adjust indentation
- remove extra whitespace

MFC after: 1 week

12 years agoadd manpage for the "oce" driver
luigi [Fri, 17 Feb 2012 14:02:44 +0000 (14:02 +0000)]
add manpage for the "oce" driver

Submitted by: Naresh Raju Gottumukkala (Emulex)
MFC after: 3 days

12 years agoPatches from Naresh Raju Gottumukkala
luigi [Fri, 17 Feb 2012 13:55:17 +0000 (13:55 +0000)]
Patches from Naresh Raju Gottumukkala

- Feature: UMC - Universal Multi Channel support
- Bugfix: BE3 Firmware Flashing bug.
- Code improvements:
  - Removed duplicate switch cases in the oce_ioctl routine.
  - Made changes to mcc_async notifications routine(oce_mq_handler)

MFC after: 1 week

12 years agoFix cross-references.
kib [Fri, 17 Feb 2012 12:40:27 +0000 (12:40 +0000)]
Fix cross-references.

Submitted by: pluknet
MFC after:  2 weeks

12 years agoSwitch the license boilerplates to our standard one.
brueffer [Fri, 17 Feb 2012 11:09:51 +0000 (11:09 +0000)]
Switch the license boilerplates to our standard one.

Advantages:
- Reduces the number of different license versions in the tree
- Eliminates a typo
- Removes some incorrect author attributions due to c/p
- Removes c/p error potential for future pmc manpages

Approved by: jkoshy, gnn, rpaulo, fabient (copyright holders)
MFC after: 1 week

12 years agoDocument dl_iterate_phdr(3).
kib [Fri, 17 Feb 2012 10:51:40 +0000 (10:51 +0000)]
Document dl_iterate_phdr(3).

Man page is based on the OpenBSD version, extended and corrected for
the FreeBSD implementation.

MFC after:  2 weeks

12 years agoFetch the aux vector for the static libc, and use the entries to
kib [Fri, 17 Feb 2012 10:49:29 +0000 (10:49 +0000)]
Fetch the aux vector for the static libc, and use the entries to
initialize the cache of the system information as it was done for the
dynamic libc. This removes several sysctls from the static binary
startup.

Use the aux vector to fill the single struct dl_phdr_info describing
the static binary itself, to implement dl_iterate_phdr(3) for the
static binaries. [1]

Based on the submission by: John Marino <draco marino st> [1]
Tested by:   flo (sparc64)
MFC after: 2 weeks

12 years agoFix the return type.
adrian [Fri, 17 Feb 2012 08:45:08 +0000 (08:45 +0000)]
Fix the return type.

Submitted by: arundel
Found by: clang/llvm

12 years agoFix up this local copy of statfoo to support > 128 statistics.
adrian [Fri, 17 Feb 2012 08:24:58 +0000 (08:24 +0000)]
Fix up this local copy of statfoo to support > 128 statistics.

This allows all of the athstats statistics to work again.

Specifics:

* The previous code used chars < 0x80 as printable, and chars >= 0x80
  as "statistics"
* .. which meant any statistic above 127 would wrap around to 0;
* .. so once I added the 802.11n TX/RX statistics to athstats, the tail
  end of the statistics list weren't accessible.

This patch:

* adds a define which represents the magic character, rather than a hard
  coded one
* the statistic in question is little endian encoded after the magic
  character.

Notes:

* statfoo is useful enough to possibly warrant turning into a library API.

12 years agoIncrease the default shutdown timer to 90 seconds. This will allow
dougb [Fri, 17 Feb 2012 07:59:37 +0000 (07:59 +0000)]
Increase the default shutdown timer to 90 seconds. This will allow
certain systems that take a long time to shut down, without adversely
affecting things that shut down quickly. It's also 30 seconds less than
the default hard limit of 120 seconds in kern.init_shutdown_timeout.

PR: conf/109272
Submitted by: Radim Kolar SF.NET <hsn@sendmail.cz>

12 years agoDuring work to port isci(4) to stable/7 I noted that the maxio portion of
sbruno [Fri, 17 Feb 2012 06:47:16 +0000 (06:47 +0000)]
During work to port isci(4) to stable/7 I noted that the maxio portion of
struct ccb_pathinq from sys/cam/cam_ccb.h wasn't added to stable/7 at all
and didn't appear in stable/8 until svn R195534.  Since __FreeBSD_version
did not get bumped until svn R195634, assume that maxio is valid at 800102
or higher.

Obtained from: Yahoo! Inc.
MFC after: 0 days

12 years agoAdd regression tests scripts for multi-IP FIBs exercising the send,
bz [Fri, 17 Feb 2012 04:26:24 +0000 (04:26 +0000)]
Add regression tests scripts for multi-IP FIBs exercising the send,
receive and forward path tagging packets with both the ifconfig fib
option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and
testing both setfib(2) as well as the SO_SETFIB socket option.

At 16 FIBs a total of over 64k return codes/replies/stati are checked,
sometimes multiple times (in different ways, e.g. the reflected request
as well as ipfw counter values).

The scripts need two or three machines to run and are thus not added
to the tools/regression framework but only to tools/test.

Sponsored by: Cisco Systems, Inc.

12 years agoEnforce some consistent ordering and handling of interrupt disable/enable
adrian [Fri, 17 Feb 2012 03:46:38 +0000 (03:46 +0000)]
Enforce some consistent ordering and handling of interrupt disable/enable
with RX/TX halting.

* Always disable/enable interrupts during a channel change, just to simply
  things.

* Ensure that the ath taskqueue has completed and is paused before
  continuing.

This dramatically reduces the instances of overlapping RX and reset
conditions.

PR: kern/165220

12 years agoAdd regression tests for the setsockopt(2) SO_SETFIB socket option.
bz [Fri, 17 Feb 2012 03:25:26 +0000 (03:25 +0000)]
Add regression tests for the setsockopt(2) SO_SETFIB socket option.

Check that the expected domain(9) families all handle the socket option
correctly and do proper bounds checks.  This would catch bugs as fixed
in (r230938,)r230981.

Sponsored by: Cisco Systems, Inc.

12 years agoBegin breaking out the txrx stop code into a locked and unlocked variant.
adrian [Fri, 17 Feb 2012 03:23:01 +0000 (03:23 +0000)]
Begin breaking out the txrx stop code into a locked and unlocked variant.

PR: kern/165220

12 years agoMerge multi-FIB IPv6 support from projects/multi-fibv6/head/:
bz [Fri, 17 Feb 2012 02:39:58 +0000 (02:39 +0000)]
Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:

Extend the so far IPv4-only support for multiple routing tables (FIBs)
introduced in r178888 to IPv6 providing feature parity.

This includes an extended rtalloc(9) KPI for IPv6, the necessary
adjustments to the network stack, and user land support as in netstat.

Sponsored by: Cisco Systems, Inc.
Reviewed by: melifaro (basically)
MFC after: 10 days

12 years agoStyle: prefer the use of line continuations to +=
eadler [Fri, 17 Feb 2012 01:21:08 +0000 (01:21 +0000)]
Style: prefer the use of line continuations to +=

Requested by: marcel, dougb, bde
Approved by: cperciva
MFC after: 3 days

12 years agoFix a stupid typo.
jkim [Thu, 16 Feb 2012 23:05:09 +0000 (23:05 +0000)]
Fix a stupid typo.

12 years agoMerge ACPICA 20120215.
jkim [Thu, 16 Feb 2012 22:59:29 +0000 (22:59 +0000)]
Merge ACPICA 20120215.

12 years agoSet the initial mode for the adapter after executing VESA BIOS POST.
jkim [Thu, 16 Feb 2012 22:51:44 +0000 (22:51 +0000)]
Set the initial mode for the adapter after executing VESA BIOS POST.
There is no need to set initial mode for BIOS.

12 years agoMake sure the VESA mode number is between 256 and 511 inclusive.
jkim [Thu, 16 Feb 2012 22:46:00 +0000 (22:46 +0000)]
Make sure the VESA mode number is between 256 and 511 inclusive.

12 years agoProperly check VESA video mode number.
jkim [Thu, 16 Feb 2012 22:33:53 +0000 (22:33 +0000)]
Properly check VESA video mode number.

12 years agoRefine r231791. Install the resume event handler unconditionally.
jkim [Thu, 16 Feb 2012 22:28:17 +0000 (22:28 +0000)]
Refine r231791.  Install the resume event handler unconditionally.

12 years agoFix a bug in the calculation of the maximum I/O request size.
gibbs [Thu, 16 Feb 2012 21:58:47 +0000 (21:58 +0000)]
Fix a bug in the calculation of the maximum I/O request size.
The previous code did not limit the I/O request size based on
the maximum number of segments supported by the back-end.  In
current practice, since the only back-end supporting chained
requests is the FreeBSD implementation, this limit was never
exceeded.

sys/dev/xen/blkfront/block.h:
Add two macros, XBF_SEGS_TO_SIZE() and XBF_SIZE_TO_SEGS(),
to centralize the logic of reserving a segment to deal with
non-page-aligned I/Os.

sys/dev/xen/blkfront/blkfront.c:
o When negotiating transfer parameters, limit the
  max_request_size we use and publish, if it is greater
  than the maximum, unaligned, I/O we can support with
  the number of segments advertised by the backend.
o Don't unilaterally reduce the I/O size published to
  the disk layer by a single page.  max_request_size
  is already properly limited in the transfer parameter
  negotiation code.
o Fix typos in printf strings:
"max_requests_segments" -> "max_request_segments"
"specificed" -> "specified"

MFC after: 1 day