]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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 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

12 years agoFix 'make depend'.
uqs [Thu, 16 Feb 2012 21:57:50 +0000 (21:57 +0000)]
Fix 'make depend'.

12 years agoFix typo in a printf string: "specificed" -> "specified".
gibbs [Thu, 16 Feb 2012 21:49:28 +0000 (21:49 +0000)]
Fix typo in a printf string: "specificed" -> "specified".

MFC after: 1 day

12 years agoFix "_" vs. "-" typo in a comment. No functional changes.
gibbs [Thu, 16 Feb 2012 21:47:17 +0000 (21:47 +0000)]
Fix "_" vs. "-" typo in a comment.  No functional changes.

12 years agoAdd support for filtering USB devices and USB endpoints to the usbdump utility
hselasky [Thu, 16 Feb 2012 21:18:36 +0000 (21:18 +0000)]
Add support for filtering USB devices and USB endpoints to the usbdump utility
when making software USB traces.

MFC after: 1 week

12 years agoFix comma splice, can't ambiguity and quoting.
imp [Thu, 16 Feb 2012 21:04:47 +0000 (21:04 +0000)]
Fix comma splice, can't ambiguity and quoting.

Submitted by: bde@
MFC after: 2 weeks

12 years agoRefactor the name hash and the ID hash, that are used to address nodes:
glebius [Thu, 16 Feb 2012 19:10:01 +0000 (19:10 +0000)]
Refactor the name hash and the ID hash, that are used to address nodes:

- Make hash sizes growable, to satisfy users running large mpd
  installations, having thousands of nodes.
- NG_NAMEHASH() proved to give a very bad distribution in real life
  name sets, while generic hash32_str(name, HASHINIT) proved to give
  an even one, so you the latter for name hash.
- Do not store unnamed nodes in slot 0 of name hash, no reason for that.
- Use the ID hash in cases when we need to run through all nodes: the
  NGM_LISTNODES command and in the vnet_netgraph_uninit().
- Implement NGM_LISTNODES and NGM_LISTNAMES as separate code, the former
  iterates through the ID hash, and the latter through the name hash.
- Keep count of all nodes and of named nodes, so that we don't need
  to count nodes in NGM_LISTNODES and NGM_LISTNAMES. The counters are
  also used to estimate whether we need to grow hashes.
- Close a race between two threads running ng_name_node() assigning same
  name to different nodes.

12 years agoSpecify correct loading order for core of netgraph(4).
glebius [Thu, 16 Feb 2012 18:54:44 +0000 (18:54 +0000)]
Specify correct loading order for core of netgraph(4).

12 years agoSupply correct "how" argument to the uma_zcreate().
glebius [Thu, 16 Feb 2012 18:51:12 +0000 (18:51 +0000)]
Supply correct "how" argument to the uma_zcreate().

12 years agoAdd a module dependency on wlan.
adrian [Thu, 16 Feb 2012 16:48:12 +0000 (16:48 +0000)]
Add a module dependency on wlan.

Submitted by: monthadar@gmail.com

12 years agoIn ng_getsockaddr() allocate memory prior to obtaining lock.
glebius [Thu, 16 Feb 2012 14:44:52 +0000 (14:44 +0000)]
In ng_getsockaddr() allocate memory prior to obtaining lock.

Reported & tested by: Mykola Dzham <i levsha.me>

12 years agodelete-old does not have delete-old-libs dependency.
pluknet [Thu, 16 Feb 2012 14:08:14 +0000 (14:08 +0000)]
delete-old does not have delete-old-libs dependency.
Reflect this in the comment.

PR: conf/163993
Submitted by: Eugen Konkov <kes-kes at yandex ru>
MFC after: 3 days

12 years agoWhen vm_mmap() is used to map a vm object into a kernel vm_map, it
alc [Thu, 16 Feb 2012 06:45:51 +0000 (06:45 +0000)]
When vm_mmap() is used to map a vm object into a kernel vm_map, it
makes no sense to check the size of the kernel vm_map against the
user-level resource limits for the calling process.

Reviewed by: kib

12 years agoFix warning when compiling with gcc46
eadler [Thu, 16 Feb 2012 05:17:06 +0000 (05:17 +0000)]
Fix warning when compiling with gcc46

Approved by: cperciva
MFC after: 3 days

12 years agoRemoved unused code: fixes compiler warning with CC=gcc46
eadler [Thu, 16 Feb 2012 05:17:01 +0000 (05:17 +0000)]
Removed unused code: fixes compiler warning with CC=gcc46
error: parameter 'fd' set but not used

Approved by: cperciva
MFC after: 1 week

12 years agoDon't extract the n_type value from the elf header, since it is never used
eadler [Thu, 16 Feb 2012 05:16:55 +0000 (05:16 +0000)]
Don't extract the n_type value from the elf header, since it is never used

Fix warning when compiling with gcc46:
variable 'type' set but not used

Approved by: cperciva
MFC after: 3 days

12 years agoAdd a timestamp to the msgbuf output in order to determine when when
eadler [Thu, 16 Feb 2012 05:11:35 +0000 (05:11 +0000)]
Add a timestamp to the msgbuf output in order to determine when when
messages were printed.

This can be enabled with the kern.msgbuf_show_timestamp sysctl

PR: kern/161553
Reviewed by: avg
Submitted by: Arnaud Lacombe <lacombar@gmail.com>
Approved by: cperciva
MFC after: 1 month

12 years agoAdd err(3) to strerror(3) SEE ALSO section
eadler [Thu, 16 Feb 2012 05:06:07 +0000 (05:06 +0000)]
Add err(3) to strerror(3) SEE ALSO section

PR: docs/164940
Submitted by: Niclas Zeising <zeising@daemonic.se>
Approved by: cperciva
MFC after: 3 days

12 years agoMake sure to synchronize icache for the newly loaded loader. Not an issue
nwhitehorn [Thu, 16 Feb 2012 03:27:38 +0000 (03:27 +0000)]
Make sure to synchronize icache for the newly loaded loader. Not an issue
on most systems, when the relevant icache lines are not full.

MFC after: 2 weeks

12 years agoDelete a couple of out of date comments that are no longer true in
rmacklem [Thu, 16 Feb 2012 02:19:53 +0000 (02:19 +0000)]
Delete a couple of out of date comments that are no longer true in
the new NFS client.

Requested by: bde
MFC after: 1 week

12 years agoImport ACPICA 20120215.
jkim [Thu, 16 Feb 2012 00:24:10 +0000 (00:24 +0000)]
Import ACPICA 20120215.

12 years agoClean up RFLAG and CR3 register handling and nearby comments. For BSP, use
jkim [Wed, 15 Feb 2012 23:33:22 +0000 (23:33 +0000)]
Clean up RFLAG and CR3 register handling and nearby comments.  For BSP, use
spinlock_enter()/spinlock_exit() to save/restore RFLAGS.  We know interrupt
is disabled when returning from S3.  For AP, we do not have to save/restore
it because IRET will do it for us any way.  Do not save CR3 locally because
savectx() does it and BSP does not have to switch to kernel map for amd64.
Change contigmalloc(9) flag while I am in the neighborhood.

12 years ago(This commit only touches code within the DEV_NETMAP blocks)
luigi [Wed, 15 Feb 2012 23:13:29 +0000 (23:13 +0000)]
(This commit only touches code within the DEV_NETMAP blocks)

Introduce some functions to map NIC ring indexes into netmap ring
indexes and vice versa. This way we can implement the bound
checks only in one place (and hopefully in a correct way).

On passing, make the code and comments more uniform across the
various drivers.

12 years agoSet up an event handler to turn off speaker if user requested it. Speaker
jkim [Wed, 15 Feb 2012 22:49:25 +0000 (22:49 +0000)]
Set up an event handler to turn off speaker if user requested it.  Speaker
will stop beeping after all device drivers are resumed.  Use proper API to
"acquire" and "release" PIC timer2 for consistency and correctness.

12 years agoMake ACPI resume beeper less cryptic. Set PIC timer2 mode properly.
jkim [Wed, 15 Feb 2012 22:10:33 +0000 (22:10 +0000)]
Make ACPI resume beeper less cryptic.  Set PIC timer2 mode properly.

12 years agoSome BIOSes are known for corrupting low 64KB between suspend and resume.
jkim [Wed, 15 Feb 2012 21:32:05 +0000 (21:32 +0000)]
Some BIOSes are known for corrupting low 64KB between suspend and resume.
Mask off the first 16 pages unless we appear to be running in a VM.  This
address may be overridden by 'hw.physmem.start' tunable from loader.
Note Linux used to have a BIOS quirk table for this issue but it seems they
made it default recently.

12 years agoWordsmith the can't find kernel error message, and suggest which
imp [Wed, 15 Feb 2012 21:20:58 +0000 (21:20 +0000)]
Wordsmith the can't find kernel error message, and suggest which
variable to set to override.

12 years agoreduce the differences between these three files.
luigi [Wed, 15 Feb 2012 18:59:26 +0000 (18:59 +0000)]
reduce the differences between these three files.
The three drivers (em, lem and igb) are extremely similar, too bad
that the structures use different names and we cannot share the code.

12 years agoBump .Dd date for previous revision.
delphij [Wed, 15 Feb 2012 18:34:57 +0000 (18:34 +0000)]
Bump .Dd date for previous revision.

12 years agoImprove error handling in smusat(4).
nwhitehorn [Wed, 15 Feb 2012 16:59:24 +0000 (16:59 +0000)]
Improve error handling in smusat(4).

MFC after: 4 days

12 years agoFix PAWS (Protect Against Wrapped Sequence numbers) in cases when
bz [Wed, 15 Feb 2012 16:09:56 +0000 (16:09 +0000)]
Fix PAWS (Protect Against Wrapped Sequence numbers) in cases when
hz >> 1000 and thus getting outside the timestamp clock frequenceny of
1ms < x < 1s per tick as mandated by RFC1323, leading to connection
resets on idle connections.

Always use a granularity of 1ms using getmicrouptime() making all but
relevant callouts independent of hz.

Use getmicrouptime(), not getmicrotime() as the latter may make a jump
possibly breaking TCP nfsroot mounts having our timestamps move forward
for more than 24.8 days in a second without having been idle for that
long.

PR: kern/61404
Reviewed by: jhb, mav, rrs
Discussed with: silby, lstewart
Sponsored by: Sandvine Incorporated (originally in 2011)
MFC after: 6 weeks

12 years agoFix includes list.
glebius [Wed, 15 Feb 2012 15:54:57 +0000 (15:54 +0000)]
Fix includes list.

Submitted by: bde

12 years agoTrim double empty lines.
glebius [Wed, 15 Feb 2012 15:06:03 +0000 (15:06 +0000)]
Trim double empty lines.

12 years agoRemove testing stuff, reducing kernel memory footprint by 1 Kb.
glebius [Wed, 15 Feb 2012 14:56:18 +0000 (14:56 +0000)]
Remove testing stuff, reducing kernel memory footprint by 1 Kb.

Anyway, when we are building a LINT kernel, all these macros
are tested via nodes.

12 years agoIn ng_bypass() add more protection against potential race
glebius [Wed, 15 Feb 2012 14:29:23 +0000 (14:29 +0000)]
In ng_bypass() add more protection against potential race
with ng_rmnode() and its followers.

12 years agostyle(9): sort includes.
glebius [Wed, 15 Feb 2012 14:26:50 +0000 (14:26 +0000)]
style(9): sort includes.

12 years agoAdd additional check to EBR probe and create methods:
ae [Wed, 15 Feb 2012 10:33:29 +0000 (10:33 +0000)]
Add additional check to EBR probe and create methods:
don't try probe and create  EBR scheme when parent partition type
is not "ebr". This fixes error messages about corrupted EBR for
some partitions where is actually another partition scheme.

NOTE: if you have EBR on the partition with different than "ebr"
(0x05) type, then you will lost access to partitions until it will be
changed.

MFC after: 2 weeks

12 years agoAdd PART::type attribute handler. It returns partition type as string.
ae [Wed, 15 Feb 2012 10:02:19 +0000 (10:02 +0000)]
Add PART::type attribute handler. It returns partition type as string.

MFC after: 2 weeks

12 years agoLimit the ST3146855LW U320 drive to 55 tags to avoid command timeouts
gibbs [Wed, 15 Feb 2012 07:30:23 +0000 (07:30 +0000)]
Limit the ST3146855LW U320 drive to 55 tags to avoid command timeouts
under load.

Submitted by: Gelson Borsoi
MFC after: 1 day

12 years agoEnhance documentation, improve interoperability, and fix defects in
gibbs [Wed, 15 Feb 2012 06:45:49 +0000 (06:45 +0000)]
Enhance documentation, improve interoperability, and fix defects in
FreeBSD's front and back Xen blkif interface drivers.

sys/dev/xen/blkfront/block.h:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
Replace FreeBSD specific multi-page ring impelementation with
support for both the Citrix and Amazon/RedHat versions of this
extension.

sys/dev/xen/blkfront/blkfront.c:
o Add a per-instance sysctl tree that exposes all negotiated
  transport parameters (ring pages, max number of requests,
  max request size, max number of segments).
o In blkfront_vdevice_to_unit() add a missing return statement
  so that we properly identify the unit number for high numbered
  xvd devices.

sys/dev/xen/blkback/blkback.c:
o Add static dtrace probes for several events in this driver.
o Defer connection shutdown processing until the front-end
  enters the closed state.  This avoids prematurely tearing
  down the connection when buggy front-ends transition to the
  closing state, even though the device is open and they
  veto the close request from the tool stack.
o Add nodes for maximum request size and the number of active
  ring pages to the exising, per-instance, sysctl tree.
o Miscelaneous style cleanup.

sys/xen/interface/io/blkif.h:
o Add extensive documentation of the XenStore nodes used to
  implement the blkif interface.
o Document the startup sequence between a front and back driver.
o Add structures and documenatation for the "discard" feature
  (AKA Trim).
o Cleanup some definitions related to FreeBSD's request
  number/size/segment-limit extension.

sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkback/blkback.c:
sys/xen/xenbus/xenbusvar.h:
Add the convenience function xenbus_get_otherend_state() and
use it to simplify some logic in both block-front and block-back.

MFC after: 1 day

12 years agoAdd notes about sigev_notify_kevent_flags introduced in revision 230857
davidxu [Wed, 15 Feb 2012 02:59:17 +0000 (02:59 +0000)]
Add notes about sigev_notify_kevent_flags introduced in revision 230857
which enables thread-friendly polling on same fd for AIO events.

Reviewed by: delphij

12 years ago- Remove some unnecessary cast when assigning NULL to a handle.
kevlo [Wed, 15 Feb 2012 02:01:24 +0000 (02:01 +0000)]
- Remove some unnecessary cast when assigning NULL to a handle.
- Silent a warning

12 years agoSet the max_lun field of the path inquiry CCB to 8.
ken [Tue, 14 Feb 2012 22:27:43 +0000 (22:27 +0000)]
Set the max_lun field of the path inquiry CCB to 8.

This allows LUNs greater than 0 to be probed.  It can be increased later if
need be.

This brings back SVN rev 224973, which was inadvertently removed with the
import of the LSI driver.

Reported by: dwhite
MFC after: 3 days

12 years agoRevert r231673 and r231682 for now, until we can run a full make
dim [Tue, 14 Feb 2012 21:48:46 +0000 (21:48 +0000)]
Revert r231673 and r231682 for now, until we can run a full make
universe with them.  Sorry for the breakage.

Pointy hat to:      me and brooks

12 years agoAdd new USB device ID.
hselasky [Tue, 14 Feb 2012 21:36:55 +0000 (21:36 +0000)]
Add new USB device ID.

MFC after: 3 days
PR: usb/165154

12 years agoWhen initialising the CP0 status register during boot on 64-bit MIPS,
rwatson [Tue, 14 Feb 2012 20:34:25 +0000 (20:34 +0000)]
When initialising the CP0 status register during boot on 64-bit MIPS,
set all three of the kernel, supervisor, and user-mode 64-bit mode
flags.  While FreeBSD does not currently use the supervisor ring (and
hence this is effectively a NOP on most systems), doing this avoids
triggering an exception on 64-bit MIPS CPUs that don't support 32-bit
compatibility mode, and therefore don't allow clearing the SX bit.

Reviewed by: gonzo
MFC after: 3 days
Sponsored by: DARPA, SRI International

12 years agoAdd some missing radar config parameters.
adrian [Tue, 14 Feb 2012 20:08:50 +0000 (20:08 +0000)]
Add some missing radar config parameters.

12 years agoFix the usefir128 config bit flipping.
adrian [Tue, 14 Feb 2012 20:06:28 +0000 (20:06 +0000)]
Fix the usefir128 config bit flipping.

12 years agoImprove the radar register config API.
adrian [Tue, 14 Feb 2012 20:05:28 +0000 (20:05 +0000)]
Improve the radar register config API.

* Fix the "enabled" flag to actually reflect whether radar detection is
  enabled or not.
* Add flags for the relstep/relpwr checks.

12 years agoRemove UCP from the list of counters
gnn [Tue, 14 Feb 2012 18:57:10 +0000 (18:57 +0000)]
Remove UCP from the list of counters

12 years agoAdd options for program (-p) and to turn off waiting (-w) which is now
gnn [Tue, 14 Feb 2012 18:51:21 +0000 (18:51 +0000)]
Add options for program (-p) and to turn off waiting (-w) which is now
on by default.

The default is to wait after each counter is tested.  Since the prompt
would go to stdout you won't see it if you're redirecting the output
of the executed sub-program to /dev/null, so just press return to
continue or Ctrl-D to stop.