]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoFix a stupid typo.
Jung-uk Kim [Thu, 16 Feb 2012 23:05:09 +0000 (23:05 +0000)]
Fix a stupid typo.

12 years agoMerge ACPICA 20120215.
Jung-uk Kim [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.
Jung-uk Kim [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.
Jung-uk Kim [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.
Jung-uk Kim [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.
Jung-uk Kim [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.
Justin T. 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'.
Ulrich Spörlein [Thu, 16 Feb 2012 21:57:50 +0000 (21:57 +0000)]
Fix 'make depend'.

12 years agoFix typo in a printf string: "specificed" -> "specified".
Justin T. 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.
Justin T. 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
Hans Petter Selasky [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.
Warner Losh [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:
Gleb Smirnoff [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).
Gleb Smirnoff [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().
Gleb Smirnoff [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 Chadd [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.
Gleb Smirnoff [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.
Sergey Kandaurov [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
Alan Cox [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
Eitan Adler [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
Eitan Adler [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
Eitan Adler [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
Eitan Adler [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
Eitan Adler [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
Nathan Whitehorn [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
Rick Macklem [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.
Jung-uk Kim [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
Jung-uk Kim [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 Rizzo [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
Jung-uk Kim [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.
Jung-uk Kim [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.
Jung-uk Kim [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
Warner Losh [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 Rizzo [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.
Xin LI [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).
Nathan Whitehorn [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
Bjoern A. Zeeb [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.
Gleb Smirnoff [Wed, 15 Feb 2012 15:54:57 +0000 (15:54 +0000)]
Fix includes list.

Submitted by: bde

12 years agoTrim double empty lines.
Gleb Smirnoff [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.
Gleb Smirnoff [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
Gleb Smirnoff [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.
Gleb Smirnoff [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:
Andrey V. Elsukov [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.
Andrey V. Elsukov [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
Justin T. 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
Justin T. 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
David Xu [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.
Kevin Lo [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.
Kenneth D. Merry [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
Dimitry Andric [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.
Hans Petter Selasky [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,
Robert Watson [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 Chadd [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 Chadd [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 Chadd [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
George V. Neville-Neil [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
George V. Neville-Neil [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.

12 years agoUpdate HISTORY for isci.4 man page.
Jim Harris [Tue, 14 Feb 2012 17:11:34 +0000 (17:11 +0000)]
Update HISTORY for isci.4 man page.

Sponsored by: Intel
Approved by: scottl

12 years agoFix a misplaced __NO_TLS locations, and change a GNUism to a C11ism for
David Chisnall [Tue, 14 Feb 2012 14:24:37 +0000 (14:24 +0000)]
Fix a misplaced __NO_TLS locations, and change a GNUism to a C11ism for
consistency.

Approved by: brooks (mentor)

12 years agoChange some headers such that lang/gcc* ports no longer patch them.
Tijl Coosemans [Tue, 14 Feb 2012 12:50:20 +0000 (12:50 +0000)]
Change some headers such that lang/gcc* ports no longer patch them.

The lang/gcc* ports patch headers where they think something is
non-standard. These patched headers override the system headers which means
you have to rebuild these ports whenever you do installworld to make sure
they contain the latest changes.

12 years agoCleanup of xlocale:
David Chisnall [Tue, 14 Feb 2012 12:03:23 +0000 (12:03 +0000)]
Cleanup of xlocale:

- Address performance regressions encountered by das@ by caching per-thread
  data in TLS where available.
- Add a __NO_TLS flag to cdefs.h to indicate where not available.
- Reorganise the xlocale.h definitions into xlocale/*.h so that they can be
  included from multiple places.
- Export the POSIX2008 subset of xlocale when POSIX2008 says it should be
  exported, independently of whether xlocale.h is included.
- Fix the bug where programs using ctype functions always assumed ASCII unless
  recompiled.
- Fix some style(9) violations.

Reviewed by: brooks (mentor)
Approved by: dim (mentor)

12 years agoFix a bug where the wrong protocol overhead was used. This can lead
Michael Tuexen [Tue, 14 Feb 2012 12:00:34 +0000 (12:00 +0000)]
Fix a bug where the wrong protocol overhead was used. This can lead
to a deadlock of an association when an IPv6 socket was used to
communcate with IPv4 and an ICMPv4 fragmentation needed message
was received.
While there, simplify the code a bit.

MFC after: 3 days.

12 years agoReplace PRIdMAX with "jd" in a printf call. Cast the corresponding value to
Tijl Coosemans [Tue, 14 Feb 2012 11:24:24 +0000 (11:24 +0000)]
Replace PRIdMAX with "jd" in a printf call. Cast the corresponding value to
intmax_t instead of uintmax_t, because the original type is off_t.

12 years agoFix various issues with the NFS and RPC related scripts:
Doug Barton [Tue, 14 Feb 2012 10:51:24 +0000 (10:51 +0000)]
Fix various issues with the NFS and RPC related scripts:

1. Add new functionality to the force_depend method to incorporate the
   tests for whether the service is enabled and/or already running.
2. Add a new option to bypass checking only that the service is enabled
   at boot time, and always check if it is running.
3. Use this new functionality to greatly simplify the rc.d scripts that
   use force_depend.
4. Add a force_depend for statd in lockd
5. Remove the check that either nfs_server or nfs_client is _enable'd
   from statd and lockd. This was always overkill, and prevented using
   the {one|force}start options, as well as stop'ing on the command line.
6. The yp* scripts had some of their arguments in various weird orders.
   Bring them into line with the model.
7. If mountd fails to create /var/db/mountdtab, err out.

Ideas, suggestions, and/or review from delphij and jilles.
Pointy hats are completely my responsibility however.

12 years agoreadlink len-1
Kevin Lo [Tue, 14 Feb 2012 10:17:03 +0000 (10:17 +0000)]
readlink len-1

12 years agoproperly sort dev/oce entries
Luigi Rizzo [Tue, 14 Feb 2012 10:11:53 +0000 (10:11 +0000)]
properly sort dev/oce entries

12 years agoRemove unnecessary cast
Kevin Lo [Tue, 14 Feb 2012 10:11:45 +0000 (10:11 +0000)]
Remove unnecessary cast

12 years agoRestore message in man page on VFS timestamp precision.
Ed Schouten [Tue, 14 Feb 2012 09:29:37 +0000 (09:29 +0000)]
Restore message in man page on VFS timestamp precision.

Requested by: bde, jhb

12 years agoDo not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
Alexander Motin [Tue, 14 Feb 2012 09:19:30 +0000 (09:19 +0000)]
Do not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
MOD_SHUTDOWN is not an end of existence, and there is a life after it.
In particular, code previously called on MOD_SHUTDOWN grabbed lock and
deallocated unit numbering. That caused infinite wait loop if snd_uaudio
tried to destroy its PCM device after that point.

MFC after: 3 days

12 years agoDisable jail support in ifconfig when either building a rescue
Robert Millan [Tue, 14 Feb 2012 07:14:42 +0000 (07:14 +0000)]
Disable jail support in ifconfig when either building a rescue
image or MK_JAIL knob has been set to "no".

Reviewed by: bz
Approved by: adrian (mentor)

12 years agoAdd a rudimentary test to run through all the available counters on a
George V. Neville-Neil [Tue, 14 Feb 2012 04:18:59 +0000 (04:18 +0000)]
Add a rudimentary test to run through all the available counters on a
system and then execute a program with pmcstat in counting mode.

The program will verify that all counters fire and that the code neither
panics the system nor locks it up.  This should be considered a first pass
conformance test for new sets of counters being added to hwpmc(4).

12 years agowctob() returns EOF and not WEOF.
Xin LI [Tue, 14 Feb 2012 02:03:17 +0000 (02:03 +0000)]
wctob() returns EOF and not WEOF.

Noticed by: Zhihao Yuan <lichray gmail com>
MFC after: 1 week

12 years agoFor RTL8168/8111D controller, make sure to wake PHY from power down
Pyun YongHyeon [Tue, 14 Feb 2012 00:54:40 +0000 (00:54 +0000)]
For RTL8168/8111D controller, make sure to wake PHY from power down
mode.  Otherwise, PHY access times out under certain conditions.

12 years ago- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed
Marius Strobl [Tue, 14 Feb 2012 00:18:35 +0000 (00:18 +0000)]
- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed
  through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here.
  Note that besides currently there not being a quirk type that disables
  MSI-X only and there's no evidence that MSI doesn't work with the VMware
  pass-through, it's really questionable whether MSI generally works in
  that setup as VMware only mention three know working devices [1, p. 4].
  Also not that this quirk entry currently doesn't affect the devices
  emulated by VMware in any way as these don't claim support MSI/MSI-X to
  begin with. [2]
  While at it, make the PCI quirk table const and static.
- Remove some duplicated empty lines.
- Use DEVMETHOD_END.

PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2]
Reviewed by: jhb
MFC after: 3 days

12 years agoEnable TLS support for ARM toolchain
Oleksandr Tymoshenko [Tue, 14 Feb 2012 00:18:18 +0000 (00:18 +0000)]
Enable TLS support for ARM toolchain

Reviewed by: cognet

12 years agoAdd thread-local storage support for arm:
Oleksandr Tymoshenko [Tue, 14 Feb 2012 00:17:43 +0000 (00:17 +0000)]
Add thread-local storage support for arm:

- Switch to Variant I TCB layout
- Use function from rtld for TCB allocation/deallocation

12 years agoAdd thread-local storage support for ARM to rtld-elf
Oleksandr Tymoshenko [Tue, 14 Feb 2012 00:16:34 +0000 (00:16 +0000)]
Add thread-local storage support for ARM to rtld-elf

Reviewed by:    cognet
Obtained from:  NetBSD

12 years agoAdd ARM relocations types used for thread-local storage
Oleksandr Tymoshenko [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
Oleksandr Tymoshenko [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.
Christian 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
John Baldwin [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 Rizzo [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
Navdeep Parhar [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.
Ed Maste [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.
Gleb Smirnoff [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.
Gleb Smirnoff [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 Schouten [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
Konstantin Belousov [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 Chadd [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
Hans Petter Selasky [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"
Ed Maste [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.
Kirk 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 Chadd [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 Davis [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.
Robert Millan [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 Schouten [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
Andriy Gapon [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"
Robert Millan [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
Andriy Gapon [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 Schouten [Sun, 12 Feb 2012 07:45:48 +0000 (07:45 +0000)]
Avoid using BEFORE in the utx rc script.

Requested by: dougb