]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoFix a crash when trying to duplicate a locale that contains some implicit C locale...
theraven [Tue, 22 Nov 2011 14:11:42 +0000 (14:11 +0000)]
Fix a crash when trying to duplicate a locale that contains some implicit C locale components.

Reported by: Michael Butler
Approved by: dim (mentor)

12 years agoPut all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.
kib [Tue, 22 Nov 2011 13:30:36 +0000 (13:30 +0000)]
Put all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.
They are confusing to user, and not informative for general consumption.

MFC after: 1 week

12 years agoRemove the wrong comment about ufs not being loadable.
kib [Tue, 22 Nov 2011 13:27:53 +0000 (13:27 +0000)]
Remove the wrong comment about ufs not being loadable.
Note that only root filesystem module needs to be available
before root is mounted.

MFC after: 1 week

12 years ago- Use ppb_assert_locked() rather than using explicit mtx_assert call
attilio [Tue, 22 Nov 2011 11:35:24 +0000 (11:35 +0000)]
- Use ppb_assert_locked() rather than using explicit mtx_assert call
- Make ppbus code agnostic in regard of INVARIANTS option

MFC after: 2 weeks

12 years ago- fix some style(9) nits with my last commit
eadler [Tue, 22 Nov 2011 02:50:24 +0000 (02:50 +0000)]
- fix some style(9) nits with my last commit
- add a comment explaining why I used '|' instead of '||'

Submitted by: danfe@
Approved by: emaste@

12 years agoThis patch enables the new/default NFS server's use of shared
rmacklem [Tue, 22 Nov 2011 00:35:30 +0000 (00:35 +0000)]
This patch enables the new/default NFS server's use of shared
vnode locking for read, readdir, readlink, getattr and access.
It is hoped that this will improve server performance for these
operations, since they will no longer be serialized for a given
file/vnode.

12 years ago- add check for pointer equality prior to performing the O(n) pass
eadler [Tue, 22 Nov 2011 00:07:53 +0000 (00:07 +0000)]
- add check for pointer equality prior to performing the O(n) pass
- while here change 's' to 's1' in strcoll

Submitted by: eadler@
Reviewed by: theraven@
Approved by: brooks@
MFC after: 2 weeks

12 years ago(Hopefully) Fix the build with clang by removing a typedef that's no longer needed.
theraven [Mon, 21 Nov 2011 23:32:14 +0000 (23:32 +0000)]
(Hopefully) Fix the build with clang by removing a typedef that's no longer needed.

Approved by: brooks (mentor)

12 years agoUse the correct lock when calling msleep().
adrian [Mon, 21 Nov 2011 22:57:28 +0000 (22:57 +0000)]
Use the correct lock when calling msleep().

This fixes panics that users have been seeing when operating in station mode,
where the interface undergoes a lot more resets then in hostap mode (ie whilst
doing channel scanning.)

Reported by: arundel, wblock@wonkity.com
Sponsored by: Hobnob, Inc.

12 years agoThe DC calibration result obtained during initialization can't be
bschmidt [Mon, 21 Nov 2011 22:19:12 +0000 (22:19 +0000)]
The DC calibration result obtained during initialization can't be
passed over to the runtime firmware on 6050 devices. Instead let
the runtime firmware do the calibration itself. This fixes support
for the 6050 series devices.

Obtained from: OpenBSD
Submitted by: kevlo
Tested by: lx, Tz-Huan Huang(earlier version)

12 years agoFix some whitespace pollution.
adrian [Mon, 21 Nov 2011 21:59:01 +0000 (21:59 +0000)]
Fix some whitespace pollution.

12 years agoRevert back to revision 227649 because of license uncertainity.
mm [Mon, 21 Nov 2011 20:33:18 +0000 (20:33 +0000)]
Revert back to revision 227649 because of license uncertainity.

Manual pages from OpenSolaris svn_134 are still properly CDDL licensed
but I have been informed that the parts from s11ex are uncertain even
if they contain a CDDL header.

12 years agoImprove the way to calculate available pages in tmpfs:
delphij [Mon, 21 Nov 2011 20:26:22 +0000 (20:26 +0000)]
Improve the way to calculate available pages in tmpfs:

 - Don't deduct wired pages from total usable counts because it does not
   make any sense.  To make things worse, on systems where swap size is
   smaller than physical memory and use a lot of wired pages (e.g. ZFS),
   tmpfs can suddenly have free space of 0 because of this;
 - Count cached pages as available; [1]
 - Don't count inactive pages as available, technically we could but that
   might be too aggressive; [1]

[1] Suggested by kib@

MFC after: 1 week

12 years agoThis check isn't needed now, sanity checking done in the beginning.
glebius [Mon, 21 Nov 2011 20:07:12 +0000 (20:07 +0000)]
This check isn't needed now, sanity checking done in the beginning.
Missed it in last commit.

12 years agoCorrect and expand BSD partitioning scheme description.
wblock [Mon, 21 Nov 2011 18:04:37 +0000 (18:04 +0000)]
Correct and expand BSD partitioning scheme description.
Correct GUID to GPT in RECOVERING section.

Reviewed by: ae
Approved by: gjb (mentor)
MFC after: 1 week

12 years agoDo dcache flush on CPU core before enabling threads.
jchandra [Mon, 21 Nov 2011 16:43:24 +0000 (16:43 +0000)]
Do dcache flush on CPU core before enabling threads.

The dcache flush has to be done using the core control registers before
splitting the L1D cache by enabling the hardware threads.

Also replace .word calls for mfcr/mtcr with a C macro.

In collaboration with: prabhath at netlogicmicro com

12 years agoSimplify the libpam build by removing the shared modules' dependency
des [Mon, 21 Nov 2011 16:40:39 +0000 (16:40 +0000)]
Simplify the libpam build by removing the shared modules' dependency
on the shared library.  The modules are loaded by the library, so we
know it'll be there when we need it.

MFC after: 3 weeks

12 years agoAs threatened on -arch, add {SHARED,STATIC}_{C,CXX}FLAGS, which allow a
des [Mon, 21 Nov 2011 16:35:57 +0000 (16:35 +0000)]
As threatened on -arch, add {SHARED,STATIC}_{C,CXX}FLAGS, which allow a
Makefile to specify different CFLAGS for shared and static libraries.

MFC after: 3 weeks

12 years agoClean up some cruft in the NFSv4 client left over from the
rmacklem [Mon, 21 Nov 2011 16:06:23 +0000 (16:06 +0000)]
Clean up some cruft in the NFSv4 client left over from the
OpenBSD port, so that it is more readable. No logic change
is made by this commit.

MFC after: 2 weeks

12 years agoFix mismerge in copyright of zpool(8).
mm [Mon, 21 Nov 2011 15:33:37 +0000 (15:33 +0000)]
Fix mismerge in copyright of zpool(8).

MFC after: 4 days

12 years agoUpdate zfs(8) and zpool(8) manpages from CDDL-licensed sources [1].
mm [Mon, 21 Nov 2011 15:26:20 +0000 (15:26 +0000)]
Update zfs(8) and zpool(8) manpages from CDDL-licensed sources [1].
Improved alignment for a maximum width of 80 characters.
Mark unsupported parts as such.

Reported to vendor: Illumos issue #1801

References:
https://www.illumos.org/issues/1801

Obtained from: OpenSolaris CDDL manual pages (snv_134, s11express) [1]
MFC after: 4 days

12 years agoFor now, remove MANFILTER from ZFS manpages (bad effect on html output).
mm [Mon, 21 Nov 2011 14:50:17 +0000 (14:50 +0000)]
For now, remove MANFILTER from ZFS manpages (bad effect on html output).

MFC after: 4 days

12 years agoAdd history for setsockopt(2).
pluknet [Mon, 21 Nov 2011 14:36:19 +0000 (14:36 +0000)]
Add history for setsockopt(2).

PR: docs/162719
Submitted by: Niclas Zeising <niclas at zeising gmail>
MFC after: 1 week

12 years agoHistorically in_control() did not check sockaddrs supplied with
glebius [Mon, 21 Nov 2011 14:10:13 +0000 (14:10 +0000)]
Historically in_control() did not check sockaddrs supplied with
structs ifreq/in_aliasreq and there've been several panics due
to that problem. All these panics were fixed just a couple of
lines above the panicing code.

Take a more general approach: sanity check sockaddrs supplied
with SIOCAIFADDR and SIOCSIF*ADDR at the beggining of the
function and drop all checks below.

One check is now disabled due to strange code in ifconfig(8)
that I've removed recently. I'm going to enable it with next
__FreeBSD_version bump.

Historically in_ifinit() was able to recover from an error
and restore old address. Nowadays this feature isn't working
for all error cases, but for some of them. I suppose no software
relies on this behavior, so I'd like to remove it, since this
simplifies code a lot.

Also, move if_scrub() earlier in the in_ifinit(). It is more
correct to wipe routes before removing address from local
address list, and interface address list.

Silence from: bz, brooks, andre, rwatson, 3 weeks

12 years agoBe more informative for "unknown hardware address format" message.
glebius [Mon, 21 Nov 2011 13:40:35 +0000 (13:40 +0000)]
Be more informative for "unknown hardware address format" message.

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

12 years ago- Add Pulse-Per-Second timestamping using raw ffcounter and corresponding
lstewart [Mon, 21 Nov 2011 13:34:29 +0000 (13:34 +0000)]
- Add Pulse-Per-Second timestamping using raw ffcounter and corresponding
  ffclock time in seconds.

- Add IOCTL to retrieve ffclock timestamps from userland.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoIntroduce the same mutex-wise fix in r227758 for sx locks.
attilio [Mon, 21 Nov 2011 12:59:52 +0000 (12:59 +0000)]
Introduce the same mutex-wise fix in r227758 for sx locks.

The functions that offer file and line specifications are:
- sx_assert_
- sx_downgrade_
- sx_slock_
- sx_slock_sig_
- sx_sunlock_
- sx_try_slock_
- sx_try_xlock_
- sx_try_upgrade_
- sx_unlock_
- sx_xlock_
- sx_xlock_sig_
- sx_xunlock_

Now vm_map locking is fully converted and can avoid to know specifics
about locking procedures.
Reviewed by: kib
MFC after: 1 month

12 years agoBetter use pkill(1) in last commit.
glebius [Mon, 21 Nov 2011 12:23:22 +0000 (12:23 +0000)]
Better use pkill(1) in last commit.

Submitted by: pjd

12 years agoRemove no more relevant XXXRW comments since accessing the vmspace is now
pluknet [Mon, 21 Nov 2011 12:21:00 +0000 (12:21 +0000)]
Remove no more relevant XXXRW comments since accessing the vmspace is now
properly done with the acquired vmspace reference.

Pointed out by: kib

12 years ago- Reduce severity for all ARP events, that can be triggered from remote
glebius [Mon, 21 Nov 2011 12:07:18 +0000 (12:07 +0000)]
- Reduce severity for all ARP events, that can be triggered from remote
  machine to LOG_NOTICE. Exception left to "using my IP address".
- Fix multicast ARP warning: add newline and also log the bad MAC address.

Tested by: Alexander Wittig <wittigal msu.edu>

12 years agoUse the acquired reference to the vmspace instead of direct dereferencing
pluknet [Mon, 21 Nov 2011 10:36:57 +0000 (10:36 +0000)]
Use the acquired reference to the vmspace instead of direct dereferencing
of p->p_vmspace like it is done in sysctl_kern_proc_vmmap().

12 years agoMerge XLP 3XX updates and related rework.
jchandra [Mon, 21 Nov 2011 08:12:36 +0000 (08:12 +0000)]
Merge XLP 3XX updates and related rework.

* Update message station (CMS) code, read queue ids from PCI header.
* Use interrupts to wakeup message handling threads on 3XX
* Update PIC code, read interrupt information from PCI header instead
  of using fixed values.
* Update PCI interrupt handling for the PIC change.
* Update code for getting chip frequency, new code support XLP 3XX
* Misc style(9) fixes

In collaboration with: prabhath at netlogicmicro com (CMS/PIC)
                       venkatesh at netlogicmicro.com (PCI)

12 years agoXLP processors have the release 2 pagegrain register
jchandra [Mon, 21 Nov 2011 07:55:37 +0000 (07:55 +0000)]
XLP processors have the release 2 pagegrain register

Add accessors to cpufunc.h

Obtained from: prabhath at netlogicmicro com

12 years agoAdd new USB IDs to RUN driver.
hselasky [Mon, 21 Nov 2011 07:50:29 +0000 (07:50 +0000)]
Add new USB IDs to RUN driver.

PR: usb/162712
MFC after: 1 week

12 years agoAlways leave the -current kernel debugging options on.
adrian [Mon, 21 Nov 2011 06:45:12 +0000 (06:45 +0000)]
Always leave the -current kernel debugging options on.

12 years agoThe PPC IRQ layer assumes that the IPI IRQ is the last IRQ on the PIC.
nwhitehorn [Mon, 21 Nov 2011 04:35:23 +0000 (04:35 +0000)]
The PPC IRQ layer assumes that the IPI IRQ is the last IRQ on the PIC.
This assumption is invalid and the code should be fixed, but humor it for
now and set the "IPI" for PS3s in the non-SMP case to a large number. This
fixes boot with a non-SMP kernel.

Submitted by: geoffrey dot levand at mail dot ru
MFC after: 1 week

12 years ago- When feed-forward clock support is compiled in, change the BPF header to
lstewart [Mon, 21 Nov 2011 04:17:24 +0000 (04:17 +0000)]
- When feed-forward clock support is compiled in, change the BPF header to
  contain both a regular timestamp obtained from the system clock and the
  current feed-forward ffcounter value. This enables new possibilities including
  comparison of timekeeping performance and timestamp correction during post
  processing.

- Add the net.bpf.ffclock_tstamp sysctl to provide a choice between timestamping
  packets using the feedback or feed-forward system clock.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoFix date.
wblock [Mon, 21 Nov 2011 02:03:18 +0000 (02:03 +0000)]
Fix date.

Approved by: gjb (mentor)
MFC after: 1 week

12 years ago- Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate()
lstewart [Mon, 21 Nov 2011 01:26:10 +0000 (01:26 +0000)]
- Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate()
  system calls to provide feed-forward clock management capabilities to
  userspace processes. ffclock_getcounter() returns the current value of the
  kernel's feed-forward clock counter. ffclock_getestimate() returns the current
  feed-forward clock parameter estimates and ffclock_setestimate() updates the
  feed-forward clock parameter estimates.

- Document the syscalls in the ffclock.2 man page.

- Regenerate the script-derived syscall related files.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoConnect LLVM/clang to the build on powerpc64. After the binutils 2.17.50
nwhitehorn [Mon, 21 Nov 2011 00:49:46 +0000 (00:49 +0000)]
Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50
import, it works without issue.

12 years agoAdd a section that explicitly describes partitioning schemes. Modify
wblock [Mon, 21 Nov 2011 00:02:49 +0000 (00:02 +0000)]
Add a section that explicitly describes partitioning schemes.  Modify
existing sections to refer to the new one.  Rearrange partitioning scheme
list so MBR and EBR types are together.  Also add several corrections for
grammar, clarity, and consistency.

Approved by: gjb (mentor)
MFC after: 1 week

12 years agosh: Allow unsetting OPTIND.
jilles [Sun, 20 Nov 2011 21:48:50 +0000 (21:48 +0000)]
sh: Allow unsetting OPTIND.

Note that only assigning the decimal value 1 resets getopts, as before.

12 years agoReplace 'chflags' with 'file flags' in a comment, since 'chflags'
gjb [Sun, 20 Nov 2011 20:05:47 +0000 (20:05 +0000)]
Replace 'chflags' with 'file flags' in a comment, since 'chflags'
is a command, not a flag itself.

While here, wrap a line for readability.

Submitted by: arundel
MFC after: 3 days
X-MFC-With: 227769, 227770

12 years agoFix the note in r227769 to be less specific to the immutable flag.
gjb [Sun, 20 Nov 2011 19:27:52 +0000 (19:27 +0000)]
Fix the note in r227769 to be less specific to the immutable flag.

Submitted by: arundel
MFC after: 3 days
X-MFC-With: r227769

12 years agoAdd a note to src/Makefile that explains that 'rm' runs twice because the
gjb [Sun, 20 Nov 2011 19:05:32 +0000 (19:05 +0000)]
Add a note to src/Makefile that explains that 'rm' runs twice because the
second invocation only needs to operate on files with the immutable flag
set.

Submitted by: arundel (via private email) (original version)
Discussed on: -toolchain@
MFC after: 3 days

12 years agoAdd two arguments to the nfsrpc_rellockown() function in the NFSv4
rmacklem [Sun, 20 Nov 2011 16:46:50 +0000 (16:46 +0000)]
Add two arguments to the nfsrpc_rellockown() function in the NFSv4
client. This does not change the client's behaviour, but prepares
the code so that nfsrpc_rellockown() can be called elsewhere in a
future commit.

MFC after: 2 weeks

12 years agoRevert part of the r227758 which crept in.
attilio [Sun, 20 Nov 2011 16:36:02 +0000 (16:36 +0000)]
Revert part of the r227758 which crept in.

Pointy hat: attilio
X-MFC: r227758

12 years agoIntroduce macro stubs in the mutex implementation that will be always
attilio [Sun, 20 Nov 2011 16:33:09 +0000 (16:33 +0000)]
Introduce macro stubs in the mutex implementation that will be always
defined and will allow consumers, willing to provide options, file and
line to locking requests, to not worry about options redefining the
interfaces.
This is typically useful when there is the need to build another
locking interface on top of the mutex one.

The introduced functions that consumers can use are:
- mtx_lock_flags_
- mtx_unlock_flags_
- mtx_lock_spin_flags_
- mtx_unlock_spin_flags_
- mtx_assert_
- thread_lock_flags_

Spare notes:
- Likely we can get rid of all the 'INVARIANTS' specification in the
  ppbus code by using the same macro as done in this patch (but this is
  left to the ppbus maintainer)
- all the other locking interfaces may require a similar cleanup, where
  the most notable case is sx which will allow a further cleanup of
  vm_map locking facilities
- The patch should be fully compatible with older branches, thus a MFC
  is previewed (infact it uses all the underlying mechanisms already
  present).

Comments review by: eadler, Ben Kaduk
Discussed with: kib, jhb
MFC after: 1 month

12 years agokey_load_private() ignores the passphrase argument if the private key
des [Sun, 20 Nov 2011 15:18:49 +0000 (15:18 +0000)]
key_load_private() ignores the passphrase argument if the private key
is unencrypted.  This defeats the nullok check, because it means a
non-null passphrase will successfully unlock the key.

To address this, try at first to load the key without a passphrase.
If this succeeds and the user provided a non-empty passphrase *or*
nullok is false, reject the key.

MFC after: 1 week
Noticed by: Guy Helmer <guy.helmer@palisadesystems.com>

12 years agoAdd support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
tuexen [Sun, 20 Nov 2011 15:00:45 +0000 (15:00 +0000)]
Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.

MFC after: 3 months.

12 years agoImplement xlocale APIs from Darwin, mainly for use by libc++. This adds a
theraven [Sun, 20 Nov 2011 14:45:42 +0000 (14:45 +0000)]
Implement xlocale APIs from Darwin, mainly for use by libc++.  This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)

12 years agoUpdate and desolarization of zdb(8) and zstreamdump(1) manual pages:
mm [Sun, 20 Nov 2011 13:11:29 +0000 (13:11 +0000)]
Update and desolarization of zdb(8) and zstreamdump(1) manual pages:
- synchronized to match new vendor code [1]
- removed ATTRIBUTES sections
- updated SEE ALSO sections
- properly updated copyright information (required by CDDL)
- remove empty lines via MANFILTER

Obtained from: Illumos [1]
MFC after: 5 days

12 years ago- Add support for Add LOGITECH Webcam C100
miwi [Sun, 20 Nov 2011 12:26:20 +0000 (12:26 +0000)]
- Add support for Add LOGITECH Webcam C100
- While here whitespace fixes

PR: usb/161559
Submitted by: Sergey Zaykov <mail_of_sergey@mail.ru>
Reviewed by: hselasky
Approved by: hselasky, rwatson (mentor)

12 years ago- Add missing usb and ucom devices
miwi [Sun, 20 Nov 2011 12:18:21 +0000 (12:18 +0000)]
- Add missing usb and ucom devices

PR: usb/160301
Submitted by: Garrett Cooper <gcooper@ixsystems.com>
Reviewed by: hselasky
Approved by: hselasky, rwatson (mentor)
MFC after: 3 Days

12 years agoGiven that the typical usage of pause() is pause("zzz", hz / N), where N can
hselasky [Sun, 20 Nov 2011 08:36:18 +0000 (08:36 +0000)]
Given that the typical usage of pause() is pause("zzz", hz / N), where N can
be greater than hz in some cases, simply ignore a timeout value of zero.

Suggested by: Bruce Evans
MFC after: 1 week

12 years agoMinor style change:
hselasky [Sun, 20 Nov 2011 08:29:23 +0000 (08:29 +0000)]
Minor style change:
Simplify the description of pause() and shorten the KASSERT message in pause.
Also add a clamp for the timo argument in the non-KASSERT case.

Suggested by: Bruce Evans
MFC after: 1 week

12 years ago- Provide a sysctl interface to change the active system clock at runtime.
lstewart [Sun, 20 Nov 2011 05:32:12 +0000 (05:32 +0000)]
- Provide a sysctl interface to change the active system clock at runtime.

- Wrap [get]{bin,nano,micro}[up]time() functions of sys/time.h to allow
  requesting time from either the feedback or the feed-forward clock. If a
  feedback (e.g. ntpd) and feed-forward (e.g. radclock) daemon are both running
  on the system, both kernel clocks are updated but only one serves time.

- Add similar wrappers for the feed-forward difference clock.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoFix a whitespace nit.
lstewart [Sun, 20 Nov 2011 01:48:22 +0000 (01:48 +0000)]
Fix a whitespace nit.

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoProvide high-level functions to access the feed-forward absolute and difference
lstewart [Sun, 20 Nov 2011 01:20:50 +0000 (01:20 +0000)]
Provide high-level functions to access the feed-forward absolute and difference
clocks. Each routine can output an upper bound on the absolute time or time
interval requested. Different flavours of absolute time can be requested, for
example with or without leap seconds, monotonic or not, etc.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoSince the nfscl_cleanup() function isn't used by the FreeBSD NFSv4 client,
rmacklem [Sun, 20 Nov 2011 01:18:47 +0000 (01:18 +0000)]
Since the nfscl_cleanup() function isn't used by the FreeBSD NFSv4 client,
delete the code and fix up the related comments. This should not have
any functional effect on the client.

MFC after: 2 weeks

12 years agoPost r223774 the NFSv4 client never uses the linked list with the
rmacklem [Sun, 20 Nov 2011 00:39:15 +0000 (00:39 +0000)]
Post r223774 the NFSv4 client never uses the linked list with the
head nfsc_defunctlockowner. This patch simply removes the code that
loops through this always empty list, since the code no longer does
anything useful. It should not have any effect on the client's
behaviour.

MFC after: 2 weeks

12 years agoAdd 2010 and 2011 copyrights.
brueffer [Sat, 19 Nov 2011 22:14:08 +0000 (22:14 +0000)]
Add 2010 and 2011 copyrights.

12 years agoAdd some (totally untested!) code to correctly set the RF half/quarter
adrian [Sat, 19 Nov 2011 21:12:35 +0000 (21:12 +0000)]
Add some (totally untested!) code to correctly set the RF half/quarter
mode configuration registers. This is apparently required for correct
behaviour, but also requires the chip to actually officially support it.

Sponsored by: Hobnob, Inc.

12 years agoBegin breaking apart the receive setup/stop path in preparation for more
adrian [Sat, 19 Nov 2011 21:05:31 +0000 (21:05 +0000)]
Begin breaking apart the receive setup/stop path in preparation for more
"correct" handling of frames in the RX pending queue during interface
transitions.

* ath_stoprecv() doesn't blank out the descriptor list - that's what
  ath_startrecv() does. So, change a comment to reflect that.

* ath_stoprecv() does include a large (3ms) delay to let pending DMA
  complete. However, I'm under the impression that the stopdma hal
  method does check for a bit in the PCU to indicate DMA has stopped.
  So, to help with fast abort and restart, modify ath_stoprecv() to take
  a flag which indicates whether this is needed.

* Modify the uses of ath_stoprecv() to pass in a flag to support the
  existing behaviour (ie, do the delay.)

* Remove some duplicate PCU teardown code (which wasn't shutting down DMA,
  so it wasn't entirely correct..) and replace it with a call to
  ath_stoprecv(sc, 0) - which disables the DELAY call.

The upshoot of this is now channel change doesn't simply drop completed
frames on the floor, but instead it cleanly handles those frames.
It still discards pending TX frames in the software and hardware queues
as there's no (current) logic which forcibly recalculates the rate control
information (or whether they're appropriate to be on the TX queue after
a channel change), that'll come later.

This still doesn't stop all the sources of queue stalls but it does
tidy up some of the code duplication.

To be complete, queue stalls now occur during normal behaviour -
they only occur after some kind of broken behaviour causes an interface
or node flush, upsetting the TX/RX BAW. Subsequent commits will
incrementally fix these and other related issues.

Sponsored by: Hobnob, Inc.

12 years agoRename the linker emulation name for powerpc and powerc64. This is needed that
andreast [Sat, 19 Nov 2011 19:25:57 +0000 (19:25 +0000)]
Rename the linker emulation name for powerpc and powerc64. This is needed that
we can also use the upstream binutils linker where we have to have a unique
name for the FreeBSD emulation.

12 years agoFor unknown reason, since rev 1.1 of ifconfig.c, sin_family isn't
glebius [Sat, 19 Nov 2011 19:06:08 +0000 (19:06 +0000)]
For unknown reason, since rev 1.1 of ifconfig.c, sin_family isn't
set properly for the mask argument.

Since I'd like to improve argument sanity checking in kernel
side, in in_control(), fix this.

12 years agoPull in r144505 from upstream clang trunk:
dim [Sat, 19 Nov 2011 18:01:14 +0000 (18:01 +0000)]
Pull in r144505 from upstream clang trunk:

Fix the signature of the getcontext builtin, eliminating incorrect
warnings about its prototype.

This also adds a -W(no-)builtin-requires-header option, which can be
used to enable or disable warnings of this kind.

MFC after: 1 week

12 years agoPull in r144237 from upstream clang trunk:
dim [Sat, 19 Nov 2011 17:15:20 +0000 (17:15 +0000)]
Pull in r144237 from upstream clang trunk:

Fix the signature of __sigsetjmp and sigsetjmp.  This eliminates
incorrect warnings about the prototypes of these functions.

MFC after: 1 week

12 years agoPull in r144110 from upstream clang trunk:
dim [Sat, 19 Nov 2011 17:09:36 +0000 (17:09 +0000)]
Pull in r144110 from upstream clang trunk:

Mark the overloaded atomic builtins as having custom type checking,
which they do. This avoids all of the default argument promotions that
we (1) don't want, and (2) undo during that custom type checking, and
makes sure that we don't run into trouble during template
instantiation. Fixes llvm/clang PR11320.

MFC after: 1 week

12 years ago- Add myself
scheidell [Sat, 19 Nov 2011 16:47:26 +0000 (16:47 +0000)]
- Add myself

Approved by: gabor(mentor)

12 years agoInitial version of cesa(4) driver for Marvell crypto engine and security
raj [Sat, 19 Nov 2011 16:30:06 +0000 (16:30 +0000)]
Initial version of cesa(4) driver for Marvell crypto engine and security
accelerator.

The following algorithms and schemes are supported:
 - 3DES, AES, DES
 - MD5, SHA1

Obtained from: Semihalf
Written by: Piotr Ziecik

12 years agoRemove unused variable ubase.
jchandra [Sat, 19 Nov 2011 15:08:49 +0000 (15:08 +0000)]
Remove unused variable ubase.

This vaiable is initialized but not used.

12 years agoRemvoe unused file
jchandra [Sat, 19 Nov 2011 15:01:09 +0000 (15:01 +0000)]
Remvoe unused file

mips/nlm/uart_cpu_xlp.c has replaced uart_bus_xlp_iodi.c

12 years ago- Add new loader_logo orbbw to default.conf
miwi [Sat, 19 Nov 2011 14:44:29 +0000 (14:44 +0000)]
- Add new loader_logo orbbw to default.conf

PR: 162608
Submitted by: manolis
Approved by: rwatson (mentor)
MFC after: 3 Days

12 years ago- Whitespaces fixed only
miwi [Sat, 19 Nov 2011 14:42:06 +0000 (14:42 +0000)]
- Whitespaces fixed only

Approved by: rwatson (mentor)

12 years agoFix USB compilation, and add USB options to XLP conf
jchandra [Sat, 19 Nov 2011 14:33:14 +0000 (14:33 +0000)]
Fix USB compilation, and add USB options to XLP conf

Remove obsolete header file included in usb_init.c

12 years agoFixup cache flush definitions for XLP
jchandra [Sat, 19 Nov 2011 14:14:35 +0000 (14:14 +0000)]
Fixup cache flush definitions for XLP

mco_icache_sync_range was earlier set to mipsNN_icache_sync_range_index_32
which is not necessary, revert this.
Also, the data cache is coherent so write back is not really needed. This
change is experimental.

12 years agoCore structure and functions to support a feed-forward clock within the kernel.
lstewart [Sat, 19 Nov 2011 14:10:16 +0000 (14:10 +0000)]
Core structure and functions to support a feed-forward clock within the kernel.
Implement ffcounter, a monotonically increasing cumulative counter on top of the
active timecounter. Provide low-level functions to read the ffcounter and
convert it to absolute time or a time interval in seconds using the current
ffclock estimates, which track the drift of the oscillator. Add a ring of
fftimehands to track passing of time on each kernel tick and pick up updates of
ffclock estimates.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoWhitespace fixes in XLP HAL files.
jchandra [Sat, 19 Nov 2011 14:06:15 +0000 (14:06 +0000)]
Whitespace fixes in XLP HAL files.

Also fixup a macro in iomap.h

12 years agoSimplify the usb_pause_mtx() function by factoring out the generic parts
hselasky [Sat, 19 Nov 2011 11:17:27 +0000 (11:17 +0000)]
Simplify the usb_pause_mtx() function by factoring out the generic parts
to the kernel's pause() function. The pause() function can now be used
when cold != 0. Also assert that the timeout in system ticks must be
positive.

Suggested by: Bruce Evans
MFC after: 1 week

12 years agoMove the device_delete_all_children() function from usb_util.c
hselasky [Sat, 19 Nov 2011 10:11:50 +0000 (10:11 +0000)]
Move the device_delete_all_children() function from usb_util.c
to kern/subr_bus.c. Simplify this function so that it no longer
depends on malloc() to execute. Identify a few other places where
it makes sense to use device_delete_all_children().

MFC after: 1 week

12 years agosfxge: Remove interrupt self-test code
philip [Sat, 19 Nov 2011 09:16:52 +0000 (09:16 +0000)]
sfxge: Remove interrupt self-test code

It's not currently used; it didn't build on 32-bit and the previous build fix
is incorrect.  If we really implement self-tests we can do this again
properly.

Submitted by: Ben Hutchings <bwh -at- solarflare.com>
MFC after: 3 weeks

12 years agosfxge: Fix if_baudrate reports
philip [Sat, 19 Nov 2011 09:13:58 +0000 (09:13 +0000)]
sfxge: Fix if_baudrate reports

This field is supposed to be set to the interface bit rate, but for some
reason I thought it was denominated in kilobits.  Multiply the values up
accordingly, taking care to saturate rather than overflow on 32-bit
architectures.

Submitted by: Ben Hutchings <bwh -at- solarflare.com>
MFC after: 3 weeks

12 years agoUpdate the manpage for r227697.
kib [Sat, 19 Nov 2011 07:52:39 +0000 (07:52 +0000)]
Update the manpage for r227697.

MFC after: 3 weeks

12 years agoExisting VOP_VPTOCNP() interface has a fatal flow that is critical for
kib [Sat, 19 Nov 2011 07:50:49 +0000 (07:50 +0000)]
Existing VOP_VPTOCNP() interface has a fatal flow that is critical for
nullfs.  The problem is that resulting vnode is only required to be
held on return from the successfull call to vop, instead of being
referenced.

Nullfs VOP_INACTIVE() method reclaims the vnode, which in combination
with the VOP_VPTOCNP() interface means that the directory vnode
returned from VOP_VPTOCNP() is reclaimed in advance, causing
vn_fullpath() to error with EBADF or like.

Change the interface for VOP_VPTOCNP(), now the dvp must be
referenced. Convert all in-tree implementations of VOP_VPTOCNP(),
which is trivial, because vhold(9) and vref(9) are similar in the
locking prerequisites. Out-of-tree fs implementation of VOP_VPTOCNP(),
if any, should have no trouble with the fix.

Tested by: pho
Reviewed by: mckusick
MFC after: 3 weeks (subject of re approval)

12 years agoDo not use NULLVPTOLOWERVP() in the null_print(). If diagnostic is compiled
kib [Sat, 19 Nov 2011 07:41:37 +0000 (07:41 +0000)]
Do not use NULLVPTOLOWERVP() in the null_print(). If diagnostic is compiled
in, and show vnode is used from ddb on the faulty nullfs vnode, we get
panic instead of vnode dump.

MFC after: 1 week

12 years agoUse the plain panic calls, without additional printing around them.
kib [Sat, 19 Nov 2011 07:40:13 +0000 (07:40 +0000)]
Use the plain panic calls, without additional printing around them.
The debugger and dumping support is adequate.

Tested by: pho
MFC after: 1 week

12 years agoRegenerate system call tables.
ed [Sat, 19 Nov 2011 07:20:20 +0000 (07:20 +0000)]
Regenerate system call tables.

12 years agoMake the Linux *at() calls a bit more complete.
ed [Sat, 19 Nov 2011 07:19:37 +0000 (07:19 +0000)]
Make the Linux *at() calls a bit more complete.

Properly support:

- AT_EACCESS for faccessat(),
- AT_SYMLINK_FOLLOW for linkat().

12 years agoRegenerate system call tables.
ed [Sat, 19 Nov 2011 06:36:11 +0000 (06:36 +0000)]
Regenerate system call tables.

12 years agoImprove *access*() parameter name consistency.
ed [Sat, 19 Nov 2011 06:35:15 +0000 (06:35 +0000)]
Improve *access*() parameter name consistency.

The current code mixes the use of `flags' and `mode'. This is a bit
confusing, since the faccessat() function as a `flag' parameter to store
the AT_ flag.

Make this less confusing by using the same name as used in the POSIX
specification -- `amode'.

12 years agoThe old NFS client will crash due to the reply being m_freem()'d
rmacklem [Sat, 19 Nov 2011 03:20:15 +0000 (03:20 +0000)]
The old NFS client will crash due to the reply being m_freem()'d
twice if the server bogusly returns an error with the NFSERR_RETERR
bit (bit 31) set. No actual NFS error has this bit set, but it seems
that amd will sometimes do this. This patch makes sure the NFSERR_RETERR
bit is cleared to avoid a crash.

PR: kern/153847
MFC after: 2 weeks

12 years agoDo not increment the parent firmware's reference count when any other
np [Sat, 19 Nov 2011 00:20:28 +0000 (00:20 +0000)]
Do not increment the parent firmware's reference count when any other
firmware image in the module is registered.  Instead, do it when the
other image is itself referenced.

This allows a module with multiple firmware images to be automatically
unloaded when none of the firmware images are in use.

Discussed with: jhb@ (on -hackers)

12 years agoThere's no need export the device interface methods of miibus(4).
marius [Fri, 18 Nov 2011 22:58:13 +0000 (22:58 +0000)]
There's no need export the device interface methods of miibus(4).

12 years ago- Add a hint.miibus.X.phymask hint, allowing do individually exclude PHY
marius [Fri, 18 Nov 2011 22:39:46 +0000 (22:39 +0000)]
- Add a hint.miibus.X.phymask hint, allowing do individually exclude PHY
  addresses from being probed and attaching something including ukphy(4)
  to it. This is mainly necessarily for PHY switches that create duplicate
  or fake PHYs on the bus that can corrupt the PHY state when accessed or
  simply cause problems when ukphy(4) isolates the additional instances.
- Change miibus(4) to be a hinted bus, allowing to add child devices via
  hints and to set their attach arguments (including for automatically
  probed PHYs). This is mainly needed for PHY switches that violate IEEE
  802.3 and don't even implement the basic register set so we can't probe
  them automatically. However, the ability to alter the attach arguments
  for automatically probed PHYs is also useful as for example it allows
  to test (or tell a user to test) new variant of a PHY with a specific
  driver by letting an existing driver attach to it via manipulating the
  IDs without the need to touch the source code or to limit a Gigabit
  Ethernet PHY to only announce up to Fast Ethernet in order to save
  energy  by limiting the capability mask. Generally, a driver has to
  be hinted via hint.phydrv.X.at="miibusY" and hint.phydrv.X.phyno="Z"
  (which already is sufficient to add phydrvX at miibusY at PHY address
  Z). Then optionally the following attach arguments additionally can
  be configured:
  hint.phydrv.X.id1
  hint.phydrv.X.id2
  hint.phydrv.X.capmask
- Some minor cleanup.

Reviewed by: adrian, ray

12 years agoThere's no need to read DC_10BTSTAT twice in dcphy_status().
marius [Fri, 18 Nov 2011 21:23:13 +0000 (21:23 +0000)]
There's no need to read DC_10BTSTAT twice in dcphy_status().

12 years ago- There's no need to ignore the return value of mii_attach(9) when attaching
marius [Fri, 18 Nov 2011 21:22:43 +0000 (21:22 +0000)]
- There's no need to ignore the return value of mii_attach(9) when attaching
  dcphy(4) (CID 9283).
- In dc_detach(), check whether ifp is NULL as dc_attach() may call the
  former without ifp being allocated (CID 4288).

Found with: Coverity Prevent(tm)

12 years agoPartially revert r218788. r218788 removed calling dc_setcfg() for
yongari [Fri, 18 Nov 2011 19:38:19 +0000 (19:38 +0000)]
Partially revert r218788. r218788 removed calling dc_setcfg() for
!DC_IS_ADMTEK in dc_miibus_statchg(). This change broke link
establishment of Intel 21143 with dcphy(4) where it stuck in
"ability detect" state without completing auto-negotiation.
Also nuke dc_if_media as it's not actually used.

Submitted by: marius

12 years agoAdded check for negative seconds value. Found by syscall() fuzzing.
pho [Fri, 18 Nov 2011 19:14:42 +0000 (19:14 +0000)]
Added check for negative seconds value. Found by syscall() fuzzing.

MFC after: 1 week

12 years agoAdd sfxge(4) to the hardware notes.
brueffer [Fri, 18 Nov 2011 16:54:22 +0000 (16:54 +0000)]
Add sfxge(4) to the hardware notes.