]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoFix the experimental NFS client so that it does not bogusly
rmacklem [Mon, 25 Apr 2011 22:22:51 +0000 (22:22 +0000)]
Fix the experimental NFS client so that it does not bogusly
set the f_flags field of "struct statfs". This had the interesting
effect of making the NFSv4 mounts "disappear" after r221014,
since NFSMNT_NFSV4 and MNT_IGNORE became the same bit.
Move the files used for a diskless NFS root from sys/nfsclient
to sys/nfs in preparation for them to be used by both NFS
clients. Also, move the declaration of the three global data
structures from sys/nfsclient/nfs_vfsops.c to sys/nfs/nfs_diskless.c
so that they are defined when either client uses them.

Reviewed by: jhb
MFC after: 2 weeks

13 years ago- Removed duplicate {_bxe} definition.
davidch [Mon, 25 Apr 2011 22:00:23 +0000 (22:00 +0000)]
- Removed duplicate {_bxe} definition.

MFC after: One week

13 years ago- Added bxe(4) driver for i386 and amd64. Currently untested on other
davidch [Mon, 25 Apr 2011 21:53:41 +0000 (21:53 +0000)]
- Added bxe(4) driver for i386 and amd64. Currently untested on other
  CPU architectures.

MFC after: One week

13 years agosh: Set $? to 0 for background commands.
jilles [Mon, 25 Apr 2011 20:54:12 +0000 (20:54 +0000)]
sh: Set $? to 0 for background commands.

For backgrounded pipelines and subshells, the previous value of $? was being
preserved, which is incorrect.

For backgrounded simple commands containing a command substitution, the
status of the last command substitution was returned instead of 0.

If fork() fails, this is an error.

13 years agoprintf(1): Move non-bugs from the BUGS section to a new section CAVEATS.
jilles [Mon, 25 Apr 2011 19:15:58 +0000 (19:15 +0000)]
printf(1): Move non-bugs from the BUGS section to a new section CAVEATS.

13 years agoTypo fix
cognet [Mon, 25 Apr 2011 18:15:45 +0000 (18:15 +0000)]
Typo fix

13 years agoAdd the possibility to verify MD5 hash of incoming TCP packets.
attilio [Mon, 25 Apr 2011 17:13:40 +0000 (17:13 +0000)]
Add the possibility to verify MD5 hash of incoming TCP packets.
As long as this is a costy function, even when compiled in (along with
the option TCP_SIGNATURE), it can be disabled via the
net.inet.tcp.signature_verify_input sysctl.

Sponsored by: Sandvine Incorporated
Reviewed by: emaste, bz
MFC after: 2 weeks

13 years agoWe need in.h for both INET and INET6, as according to RFC 3493 it
bz [Mon, 25 Apr 2011 16:37:47 +0000 (16:37 +0000)]
We need in.h for both INET and INET6, as according to RFC 3493 it
defines struct in6_addr, which is needed by ip6_hdr used in here.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 5 days

13 years agoBe less strict on includes than in r220746. We need in.h for both
bz [Mon, 25 Apr 2011 16:36:16 +0000 (16:36 +0000)]
Be less strict on includes than in r220746. We need in.h for both
INET or INET6 as it holds all the IPPROTO_* definitions needed
for the SYSCTL_NODE definitions.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 5 days

13 years agoAfter r220885 compile the various NIC drivers depending on INET
bz [Mon, 25 Apr 2011 16:33:42 +0000 (16:33 +0000)]
After r220885 compile the various NIC drivers depending on INET
unconditionally backing out r193997, so that they are available for
IPv6-only setups as well.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 5 days

13 years agoWrap the MIMO stuff in #ifdef AH_SUPPORT_AR5416, as the channel
adrian [Mon, 25 Apr 2011 15:51:49 +0000 (15:51 +0000)]
Wrap the MIMO stuff in #ifdef AH_SUPPORT_AR5416, as the channel
state doesn't have MIMO stuff in it by default.

13 years agoFix the experimental NFS client so that it does not bogusly
rmacklem [Mon, 25 Apr 2011 14:51:08 +0000 (14:51 +0000)]
Fix the experimental NFS client so that it does not bogusly
set the f_flags field of "struct statfs". This had the interesting
effect of making the NFSv4 mounts "disappear" after r221014,
since NFSMNT_NFSV4 and MNT_IGNORE became the same bit.

MFC after: 2 weeks

13 years agoAdd missing bit in r221015.
attilio [Mon, 25 Apr 2011 14:12:58 +0000 (14:12 +0000)]
Add missing bit in r221015.

Sponsored by: Sandvine Incorporated
Reviewed by: des
MFC after: 1 week
X-MFC: r221015

13 years agoDon't assume that SMI are enabled when attaching ichwd and then do
attilio [Mon, 25 Apr 2011 14:10:33 +0000 (14:10 +0000)]
Don't assume that SMI are enabled when attaching ichwd and then do
correct unwind based on former state.

Sponsored by: Sandvine Incorporated
Reviewed by: des
MFC after: 1 week

13 years agoModify the experimental NFS client so that it uses the same
rmacklem [Mon, 25 Apr 2011 13:09:32 +0000 (13:09 +0000)]
Modify the experimental NFS client so that it uses the same
"struct nfs_args" as the regular NFS client. This is needed
so that the old mount(2) syscall will work and it makes
sharing of the diskless NFS root code easier. Eary in the
porting exercise I introduced a new revision of nfs_args, but
didn't actually need it, thanks to nmount(2). I re-introduced the
NFSMNT_KERB flag, since it does essentially the same thing and
the old one would not have been used because it never worked.
I also added a few new NFSMNT_xxx flags to sys/nfsclient/nfs_args.h
that are used by the experimental NFS client.

MFC after: 2 weeks

13 years agoprintf(1): Mention effect of '#' modifier on other conversions.
jilles [Mon, 25 Apr 2011 12:36:29 +0000 (12:36 +0000)]
printf(1): Mention effect of '#' modifier on other conversions.

13 years agosh: Check setuid()/setgid() return values.
jilles [Mon, 25 Apr 2011 10:14:29 +0000 (10:14 +0000)]
sh: Check setuid()/setgid() return values.

If the -p option is turned off, privileges from a setuid or setgid binary
are dropped. Make sure to check if this succeeds. If it fails, this is an
error which will cause the shell to abort except in interactive mode or if
'command' was used to make 'set' or an outer 'eval' or '.' non-special.

Note that taking advantage of this feature and writing setuid shell scripts
seems unwise.

MFC after: 1 week

13 years agosh: Remove duplicate code resetting uid/gid for set +p/+o privileged.
jilles [Mon, 25 Apr 2011 10:08:34 +0000 (10:08 +0000)]
sh: Remove duplicate code resetting uid/gid for set +p/+o privileged.

MFC after: 1 week

13 years agoWhitespace nit
des [Mon, 25 Apr 2011 09:18:05 +0000 (09:18 +0000)]
Whitespace nit

13 years agocorrect variable type name in comment
ticso [Mon, 25 Apr 2011 09:00:52 +0000 (09:00 +0000)]
correct variable type name in comment

13 years agoCreate a function for the code from r192246 so that it can be used both
dougb [Mon, 25 Apr 2011 06:03:22 +0000 (06:03 +0000)]
Create a function for the code from r192246 so that it can be used both
times mount is called.

Limit the automatic behavior to when AUTO is specified (as it is in
etc/defaults/rc.conf) and for everything else take advantage of all
of the goodness in checkyesno.

13 years agoAdd svn:executable property
dougb [Mon, 25 Apr 2011 05:57:01 +0000 (05:57 +0000)]
Add svn:executable property

13 years agoWhen msk_detach() is called from msk_attach(), ifp may be
glebius [Mon, 25 Apr 2011 04:55:50 +0000 (04:55 +0000)]
When msk_detach() is called from msk_attach(), ifp may be
yet not initialized.

13 years agoBreak out the PLL setup into an overridable method.
adrian [Sun, 24 Apr 2011 15:53:57 +0000 (15:53 +0000)]
Break out the PLL setup into an overridable method.

The only method right now is ar5416InitPLL() which handles multiple
chipsets; this can now be overridden by newer chipset HAL code.

13 years agoUse the refactored ar5416WriteTxPowerRateRegisters() call in the ar9285 code.
adrian [Sun, 24 Apr 2011 15:48:07 +0000 (15:48 +0000)]
Use the refactored ar5416WriteTxPowerRateRegisters() call in the ar9285 code.

13 years agoEliminate code duplication between AR5416/AR9160/AR9280 and AR9285.
adrian [Sun, 24 Apr 2011 14:50:29 +0000 (14:50 +0000)]
Eliminate code duplication between AR5416/AR9160/AR9280 and AR9285.

Writing the TX power registers is the same between all of these chips
and later NICs (AR9287, AR9271 USB, etc.) so this will reduce code
duplication when those NICs are added to the HAL.

13 years agoFix typo.
kib [Sun, 24 Apr 2011 13:22:14 +0000 (13:22 +0000)]
Fix typo.

MFC after: 3 days

13 years agoVFS sometimes is unable to inactivate a vnode when vnode use count
kib [Sun, 24 Apr 2011 10:47:56 +0000 (10:47 +0000)]
VFS sometimes is unable to inactivate a vnode when vnode use count
goes to zero. E.g., the vnode might be only shared-locked at the time of
vput() call. Such vnodes are kept in the hash, so they can be found later.

If ffs_valloc() allocated an inode that has its vnode cached in hash, and
still owing the inactivation, then vget() call from ffs_valloc() clears
VI_OWEINACT, and then the vnode is reused for the newly allocated inode.

The problem is, the vnode is not reclaimed before it is put to the new
use. ffs_valloc() recycles vnode vm object, but this is not enough.
In particular, at least v_vflag should be cleared, and several bits of
UFS state need to be removed.

It is very inconvenient to call vgone() at this point. Instead, move
some parts of ufs_reclaim() into helper function ufs_prepare_reclaim(),
and call the helper from VOP_RECLAIM and ffs_valloc().

Reviewed by: mckusick
Tested by: pho
MFC after: 3 weeks

13 years agoOne key is expected from providers smaller than or equal to (2^20)*sectorsize
pjd [Sun, 24 Apr 2011 10:41:13 +0000 (10:41 +0000)]
One key is expected from providers smaller than or equal to (2^20)*sectorsize
bytes. Remove bogus assertion and while here remove another too obvious
assertion.

Reported by: Fabian Keil <freebsd-listen@fabiankeil.de>
MFC after: 2 weeks

13 years agoExplicitly note that device numbers are starting from zero.
mav [Sun, 24 Apr 2011 09:23:08 +0000 (09:23 +0000)]
Explicitly note that device numbers are starting from zero.

13 years agoSwitch the GENERIC kernels for all architectures to the new CAM-based ATA
mav [Sun, 24 Apr 2011 08:58:58 +0000 (08:58 +0000)]
Switch the GENERIC kernels for all architectures to the new CAM-based ATA
stack. It means that all legacy ATA drivers are disabled and replaced by
respective CAM drivers. If you are using ATA device names in /etc/fstab or
other places, make sure to update them respectively (adX -> adaY,
acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential
numbers for each type in order of detection, unless configured otherwise
with tunables, see cam(4)).

ataraid(4) functionality is now supported by the RAID GEOM class.
To use it you can load geom_raid kernel module and use graid(8) tool
for management. Instead of /dev/arX device names, use /dev/raid/rX.

13 years agoPatch the mountd and nfsd man pages to reflect the recent changes
rmacklem [Sun, 24 Apr 2011 01:11:28 +0000 (01:11 +0000)]
Patch the mountd and nfsd man pages to reflect the recent changes
done by r220980 to deprecate the -e option and add the -o option.
This is a content change for both man pages.

13 years agoThis patch changes the default NFS server to the new one, which was
rmacklem [Sun, 24 Apr 2011 00:06:56 +0000 (00:06 +0000)]
This patch changes the default NFS server to the new one, which was
referred to as the experimental server. It also adds a new command
line option "-o" to both mountd and nfsd that forces them to use the
old/regular NFS server. The "-e" option for these commands is now
a no-op, since the new server is the default. I will be committing rc
script and man changes soon. Discussed on freebsd-fs@.

13 years agoFix display of the drm sysctls.
kib [Sat, 23 Apr 2011 23:11:44 +0000 (23:11 +0000)]
Fix display of the drm sysctls.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

13 years agosh: Allow EV_EXIT through function calls, make {...} <redir more consistent.
jilles [Sat, 23 Apr 2011 22:28:56 +0000 (22:28 +0000)]
sh: Allow EV_EXIT through function calls, make {...} <redir more consistent.

If EV_EXIT causes an exit, use the exception mechanism to unwind
redirections and local variables. This way, if the final command is a
redirected command, an EXIT trap now executes without the redirections.

Because of these changes, EV_EXIT can now be inherited by the body of a
function, so do so. This means that a function no longer prevents a fork
before an exec being skipped, such as in
  f() { head -1 /etc/passwd; }; echo $(f)

Wrapping a single builtin in a function may still cause an otherwise
unnecessary fork with command substitution, however.

An exit command or -e failure still invokes the EXIT trap with the
original redirections and local variables in place.

Note: this depends on SHELLPROC being gone. A SHELLPROC depended on
keeping the redirections and local variables and only cleaning up the
state to restore them.

13 years agoFix two bugs in r218670.
kib [Sat, 23 Apr 2011 21:38:21 +0000 (21:38 +0000)]
Fix two bugs in r218670.

Hold the vnode around the region where object lock is dropped, until
vnode lock is acquired.

Do not drop the vnode reference for a case when the object was
deallocated during unlock. Note that in this case, VV_TEXT is cleared
by vnode_pager_dealloc().

Reported and tested by: pho
Reviewed by: alc
MFC after: 3 days

13 years ago- Clarification on kld_file_stat.size
gjb [Sat, 23 Apr 2011 20:59:58 +0000 (20:59 +0000)]
- Clarification on kld_file_stat.size
- While here, remove a few C comments that don't seem to contribute
  anything additional to the man page.

PR: 146047
Submitted by: arundel
MFC after: 3 days

13 years agoAs previously advertised, remove the error message for enable_quotas
dougb [Sat, 23 Apr 2011 17:37:14 +0000 (17:37 +0000)]
As previously advertised, remove the error message for enable_quotas
prior to 9.0-RELEASE.

This change should not be MFC'ed.

13 years agoCheck return code of setuid() and setgid() in finger.
simon [Sat, 23 Apr 2011 14:19:26 +0000 (14:19 +0000)]
Check return code of setuid() and setgid() in finger.

While they will not fail in normal circumstances, better safe than
sorry.

MFC after: 1 week

13 years agoCheck return code of setuid() in timedc.
simon [Sat, 23 Apr 2011 13:57:12 +0000 (13:57 +0000)]
Check return code of setuid() in timedc.

While it will not fail in normal circumstances, better safe than
sorry.

MFC after: 3 days

13 years agoCheck return code of setuid(), setgid(), and setgroups() in rwhod.
simon [Sat, 23 Apr 2011 13:42:03 +0000 (13:42 +0000)]
Check return code of setuid(), setgid(), and setgroups() in rwhod.

While they will not fail in normal circumstances, better safe than
sorry.

MFC after: 1 week

13 years agoCheck return code of setuid() in traceroute.
simon [Sat, 23 Apr 2011 13:07:35 +0000 (13:07 +0000)]
Check return code of setuid() in traceroute.

While it will not fail in normal circumstances, better safe than sorry.

Reported by: LLVM's clang static analyzer
MFC after: 3 days

13 years agoFix a LOR in vfs_busy() where, after msleeping, it would lock
rmacklem [Sat, 23 Apr 2011 11:22:48 +0000 (11:22 +0000)]
Fix a LOR in vfs_busy() where, after msleeping, it would lock
the mutexes in the wrong order for the case where the
MBF_MNTLSTLOCK is set. I believe this did have the
potential for deadlock. For example, if multiple nfsd threads
called vfs_busyfs(), which calls vfs_busy() with MBF_MNTLSTLOCK.
Thanks go to pho for catching this during his testing.

Tested by: pho
Submitted by: kib
MFC after: 2 weeks

13 years agoFix a corner-case of interrupt handling which resulted in potentially
adrian [Sat, 23 Apr 2011 06:37:09 +0000 (06:37 +0000)]
Fix a corner-case of interrupt handling which resulted in potentially
spurious (and fatal) interrupt errors.

One user reported seeing this:

Apr 22 18:04:24 ceres kernel: ar5416GetPendingInterrupts: fatal error,
  ISR_RAC 0x0 SYNC_CAUSE 0x2000

SYNC_CAUSE of 0x2000 is AR_INTR_SYNC_LOCAL_TIMEOUT which is a bus timeout;
this shouldn't cause HAL_INT_FATAL to be set.

After checking out ath9k, ath9k_ar9002_hw_get_isr() clears (*masked)
before continuing, regardless of whether any bits in the ISR registers
are set. So if AR_INTR_SYNC_CAUSE is set to something that isn't
treated as fatal, and AR_ISR isn't read or is read and is 0, then
(*masked) wouldn't be cleared. Thus any of the existing bits set
that were passed in would be preserved in the output.

The caller in if_ath - ath_intr() - wasn't setting the masked value
to 0 before calling ath_hal_getisr(), so anything that was present
in that uninitialised variable would be preserved in the case above
of AR_ISR=0, AR_INTR_SYNC_CAUSE != 0; and if the HAL_INT_FATAL bit
was set, a fatal condition would be interpreted and the chip was
reset.

This patch does the following:

* ath_intr() - set masked to 0 before calling ath_hal_getisr();
* ar5416GetPendingInterrupts() - clear (*masked) before processing
  continues; so if the interrupt source is AR_INTR_SYNC_CAUSE
  and it isn't fatal, the hardware isn't reset via returning
  HAL_INT_FATAL.

This doesn't fix any underlying errors which trigger
AR_INTR_SYNC_LOCAL_TIMEOUT - which is a bus timeout of some
sort - so that likely should be further investigated.

13 years agoo Remove an incomplete sentence.
maxim [Sat, 23 Apr 2011 05:56:06 +0000 (05:56 +0000)]
o Remove an incomplete sentence.

PR: docs/156593
Submitted by: Yuri Pankov
MFC after: 1 week

13 years agoImprove the error handling for the new get_pidfile_from_conf()
dougb [Sat, 23 Apr 2011 05:24:17 +0000 (05:24 +0000)]
Improve the error handling for the new get_pidfile_from_conf()

13 years agoIntroduce to rc.subr get_pidfile_from_conf(). It does just what it sounds
dougb [Sat, 23 Apr 2011 04:26:31 +0000 (04:26 +0000)]
Introduce to rc.subr get_pidfile_from_conf(). It does just what it sounds
like, determines the path to a pid file as it is specified in a conf file.

Use the new feature for rc.d/named and rc.d/devd, the 2 services in the
base that list their pid files in their conf files.

Remove the now-obsolete named_pidfile, and warn users if they have it set.

13 years agoFix the merlin LNA configuration code - these are bit flags, not raw values to be
adrian [Fri, 22 Apr 2011 17:57:13 +0000 (17:57 +0000)]
Fix the merlin LNA configuration code - these are bit flags, not raw values to be
written into the registers.

13 years agoNote which of the built kernels is being installed.
obrien [Fri, 22 Apr 2011 17:10:51 +0000 (17:10 +0000)]
Note which of the built kernels is being installed.

PR: 156579
Submitted by: dhw

13 years agoCorrect spelling in comments.
marius [Fri, 22 Apr 2011 13:56:21 +0000 (13:56 +0000)]
Correct spelling in comments.

Submitted by: brucec

13 years agoMore spelling fixes.
marius [Fri, 22 Apr 2011 12:46:39 +0000 (12:46 +0000)]
More spelling fixes.

Submitted by: N.J. Mann

13 years agoCorrect spelling in comments.
marius [Fri, 22 Apr 2011 12:42:41 +0000 (12:42 +0000)]
Correct spelling in comments.

Submitted by: brucec

13 years agoMF sparc64: r181701 (partial), r182020 (partial), r182730 (partial), r216628,
marius [Fri, 22 Apr 2011 12:39:48 +0000 (12:39 +0000)]
MF sparc64: r181701 (partial), r182020 (partial), r182730 (partial), r216628,
r216801

- cosmetic changes and style fixes
- Trick GAS/GCC into compiling access to TICK/(S)TICK_COMPARE independently
  of the selected instruction set. Moreover, sun4v doesn't need the WAR for
  BlackBird CPUs.
- Rename the "xor" parameter to "xorval" as the former is a reserved keyword
  in C++.

13 years agoThe second regdomain word is a set of bitflags describing
adrian [Fri, 22 Apr 2011 10:59:20 +0000 (10:59 +0000)]
The second regdomain word is a set of bitflags describing
regulatory domain behaviour. Document what the v14 EEPROM
flags are.

13 years agoBring over a pdadc calibration fix from ath9k - unused power detector
adrian [Fri, 22 Apr 2011 10:57:46 +0000 (10:57 +0000)]
Bring over a pdadc calibration fix from ath9k - unused power detector
gain values should be 58, not the previous values.

Obtained From: linux ath9k

13 years agoCorrect spelling.
marius [Fri, 22 Apr 2011 09:59:16 +0000 (09:59 +0000)]
Correct spelling.

Submitted by: brucec

13 years ago- Correct spelling. [1]
marius [Fri, 22 Apr 2011 09:52:28 +0000 (09:52 +0000)]
- Correct spelling. [1]
- Remove variables which are unused besides initialization. [2]

Submitted by: brucec [1], Christoph Mallon [2]

13 years agoCorrect spelling in a comment.
marius [Fri, 22 Apr 2011 09:44:01 +0000 (09:44 +0000)]
Correct spelling in a comment.

Submitted by: brucec

13 years agoCorrect spelling in comments.
marius [Fri, 22 Apr 2011 09:41:51 +0000 (09:41 +0000)]
Correct spelling in comments.

Submitted by: brucec

13 years agoCorrect spelling in comments.
marius [Fri, 22 Apr 2011 09:39:05 +0000 (09:39 +0000)]
Correct spelling in comments.

Submitted by: brucec

13 years agoCorrect spelling in comments.
marius [Fri, 22 Apr 2011 09:31:40 +0000 (09:31 +0000)]
Correct spelling in comments.

Submitted by: brucec

13 years agoCorrect spelling in comments.
marius [Fri, 22 Apr 2011 09:22:27 +0000 (09:22 +0000)]
Correct spelling in comments.

Submitted by: brucec

13 years agoUtilize vfs_sanitizeopts() in vfs_mergeopts() to merge options. Because
jh [Fri, 22 Apr 2011 07:26:09 +0000 (07:26 +0000)]
Utilize vfs_sanitizeopts() in vfs_mergeopts() to merge options. Because
vfs_sanitizeopts() can handle "ro" and "rw" options properly, there is
no more need to add "noro" in vfs_donmount() to cancel "ro".

This also fixes a problem of canceling options beginning with "no".
For example, "noatime" didn't cancel "nonoatime". Thus it was possible
that both "noatime" and "nonoatime" were active at the same time.

Reviewed by: bde

13 years agoRevert r220907 and r220915.
adrian [Fri, 22 Apr 2011 00:44:27 +0000 (00:44 +0000)]
Revert r220907 and r220915.

Changing the size of struct ieee80211_mimo_info changes
the STA info data, breaking ifconfig in general.

13 years ago- Centralize driver tunables initialization/validation.
davidch [Thu, 21 Apr 2011 23:06:00 +0000 (23:06 +0000)]
- Centralize driver tunables initialization/validation.
- Centralize PCI resource allocation/release.
- Enable flowid (TSS) support.
- Added "per-fastpath" locks and watchdog timeouts.
- Fixed problem where the CQ producer index was advanced beyond
  the size of the CQ ring during initialization.
- Replaced hard-coded debug levels in some debug print statements.
- More style(9) fixes.

MFC after: Two weeks

13 years ago- Use the streaming cache unless BUS_DMA_COHERENT is specified. Since
marius [Thu, 21 Apr 2011 21:56:28 +0000 (21:56 +0000)]
- Use the streaming cache unless BUS_DMA_COHERENT is specified. Since
  r220375 all drivers enabled in the sparc64 GENERIC should be either
  correctly using bus_dmamap_sync(9) calls or supply BUS_DMA_COHERENT
  when appropriate or as a workaround for missing bus_dmamap_sync(9)
  calls (sound(4) drivers and partially sym(4)). In at least some
  configurations taking advantage of the streaming cache results in
  a modest performance improvement.
- Remove the memory barrier for BUS_DMASYNC_PREREAD which as the
  comment already suggested is bogus.
- Add my copyright for having implemented several things like support
  for the Fire and Oberon IOMMUs, taking over PROM IOMMU mappings etc.

13 years agoAdd g_eli_key_cache.c to GELI.
pjd [Thu, 21 Apr 2011 21:15:11 +0000 (21:15 +0000)]
Add g_eli_key_cache.c to GELI.

MFC after: 2 weeks

13 years agoAccording to ATA specifications, when ATAPI master is the only device, it
mav [Thu, 21 Apr 2011 20:56:34 +0000 (20:56 +0000)]
According to ATA specifications, when ATAPI master is the only device, it
should respond with all zeroes to any access to slave registers. Test with
PATA devices confirmed such behavior. Unluckily, Intel SATA controllers in
legacy emulation mode behave differently, not making any difference between
ATA and ATAPI devices. It causes false positive slave device detection and,
as result, command timeouts.

To workaround this problem, mask result of legacy-emulated soft-reset with
the device presence information received from the SATA-specific registers.

13 years agoRemove the nm_mtx mutex locking from the test for
rmacklem [Thu, 21 Apr 2011 19:56:06 +0000 (19:56 +0000)]
Remove the nm_mtx mutex locking from the test for
nm_maxfilesize. This value rarely, if ever, changes
and the nm_mtx mutex is locked/unlocked earlier in
the function, which should be sufficient to avoid
getting a stale cached value for it. There is a
discussion w.r.t. what these tests should be, but
I've left them basically the same as the regular
NFS client for now.

Suggested by: pjd
MFC after: 2 weeks

13 years agoExpand / correct newsyslog regression tests:
simon [Thu, 21 Apr 2011 16:40:34 +0000 (16:40 +0000)]
Expand / correct newsyslog regression tests:
- Test newslog with clasic naming of rotates files to actually test
  the correct number of log files as newsyslog now does the correct
  thing post r220926.
- Add some more newsyslog tests which tests keeping 0, 1, and 2
  logfiles.

13 years agoFix an old bug in newsyslog where we kept one log file more than was
simon [Thu, 21 Apr 2011 16:31:05 +0000 (16:31 +0000)]
Fix an old bug in newsyslog where we kept one log file more than was
requested in newsyslog.conf.  This was only the case using the non-time
based filenames (.0, .1, .2 etc.).

The change also makes newsyslog clean clean up the old extra logfile so
users don't end up with a single stale logfile which won't be rotated
out.

This change also cleans up some code a bit to avoid more copy / paste
code and removes some old copy / paste code in the process.

PR: bin/76697
MFC after: 2 weeks

13 years agoAdd some more bit definitions:
attilio [Thu, 21 Apr 2011 14:39:33 +0000 (14:39 +0000)]
Add some more bit definitions:
- TCO_MESSAGEx: TCO specific regs providing the ability to monitor BIOS
  bootup activity.
- TCO_NEWCENTURY: reporting RTC year roll over.
- TCO_NMI2SMI_EN, TCO_NMI_NOW: controlling SMIs conversion to NMIs and
  NMI trigger.
- SMI_GBL_EN: Enabling SMI delivery for all the northbridge controller.

MFC after: 10 days

13 years agoRemove all object files during 'make clean'.
ae [Thu, 21 Apr 2011 14:17:36 +0000 (14:17 +0000)]
Remove all object files during 'make clean'.

MFC after: 1 week

13 years agoIf number of keys for the given provider doesn't exceed the limit,
pjd [Thu, 21 Apr 2011 13:35:20 +0000 (13:35 +0000)]
If number of keys for the given provider doesn't exceed the limit,
allocate all of them at attach time. This allows to avoid moving
keys around in the most-recently-used queue and needs no mutex
synchronization nor refcounting.

MFC after: 2 weeks

13 years agoInstead of allocating memory for all the keys at device attach,
pjd [Thu, 21 Apr 2011 13:31:43 +0000 (13:31 +0000)]
Instead of allocating memory for all the keys at device attach,
create reasonably large cache for the keys that is filled when
needed. The previous version was problematic for very large providers
(hundreds of terabytes or serval petabytes). Every terabyte of data
needs around 256kB for keys. Make the default cache limit big enough
to fit all the keys needed for 4TB providers, which will eat at most
1MB of memory.

MFC after: 2 weeks

13 years agoRevert r220906, since the vp isn't always locked when
rmacklem [Thu, 21 Apr 2011 12:38:12 +0000 (12:38 +0000)]
Revert r220906, since the vp isn't always locked when
nfscl_request() is called. It will need a more involved
patch.

13 years ago - Fix mapping of the last two SATA ports on 6-port Intel controllers.
mav [Thu, 21 Apr 2011 11:44:16 +0000 (11:44 +0000)]
 - Fix mapping of the last two SATA ports on 6-port Intel controllers.
This improves hard-reset and hot-plug on these ports.
 - Device with ID 0x29218086 is a 2-port variant of ICH9 in legacy mode.
Skip probing for nonexistent slave devices there.

13 years agoUse periodic status polling added at r214671 only in ATA_CAM mode. Legacy
mav [Thu, 21 Apr 2011 09:02:19 +0000 (09:02 +0000)]
Use periodic status polling added at r214671 only in ATA_CAM mode. Legacy
mode won't receive much benefit from it due to its hot-plug limitations.

13 years agoConvert to new ieee80211_mimo_info format.
adrian [Thu, 21 Apr 2011 08:20:56 +0000 (08:20 +0000)]
Convert to new ieee80211_mimo_info format.

13 years agoUse size_t for sopt_valsize.
glebius [Thu, 21 Apr 2011 08:18:55 +0000 (08:18 +0000)]
Use size_t for sopt_valsize.

Submitted by: Brandon Gooch <jamesbrandongooch gmail.com>

13 years agoMake PATA-like soft-reset in ata(4) more strict in checking disk signature.
mav [Thu, 21 Apr 2011 07:26:14 +0000 (07:26 +0000)]
Make PATA-like soft-reset in ata(4) more strict in checking disk signature.
It allows to avoid false positive device detection under Xen, that caused
long probe delays due to subsequent IDENTIFY command timeouts.

MFC after: 1 month

13 years agoRemove GNU man implemenation now that the BSD version has cooked for a while.
gordon [Thu, 21 Apr 2011 07:14:10 +0000 (07:14 +0000)]
Remove GNU man implemenation now that the BSD version has cooked for a while.

13 years ago- Allows using full device name paths, such as /dev/ad0 or /dev/mirror/gm0 in config...
jpaetzel [Thu, 21 Apr 2011 06:25:12 +0000 (06:25 +0000)]
- Allows using full device name paths, such as /dev/ad0 or /dev/mirror/gm0 in config files
- Fixes some issues creating gmirror devices, including on GPT partitions
- Bugfixes for ZFS mirroring
- Enhanced GELI to work with a passphrase only, or key-file only
- Bugfix to prevent crashing of PC-BSD Live media when checking for upgrade partitions

Submitted by: Kris Moore <kmoore@freebsd.org>
Approved by: kib (mentor)
Sponsored by: iXsystems

13 years agoImplement very basic ALQ logging for net80211.
adrian [Thu, 21 Apr 2011 03:59:37 +0000 (03:59 +0000)]
Implement very basic ALQ logging for net80211.

This is destined to be a lightweight and optional set of ALQ
probes for debugging events which are just impossible to debug
with printf/log (eg packet TX/RX handling; AMPDU handling.)

The probes and operations themselves will appear in subsequent
commits.

13 years agoChange the MIMO userland export ABI to include flags, number of radio chains,
adrian [Thu, 21 Apr 2011 03:47:40 +0000 (03:47 +0000)]
Change the MIMO userland export ABI to include flags, number of radio chains,
extended EVM statistics and EXT channel data.

ifconfig still displays 3 chains worth of ctl noise/rssi.

13 years agoAdd a check for VI_DOOMED at the beginning of nfscl_request()
rmacklem [Wed, 20 Apr 2011 23:25:18 +0000 (23:25 +0000)]
Add a check for VI_DOOMED at the beginning of nfscl_request()
so that it won't try and use vp->v_mount to do an RPC during
a forced dismount. There needs to be at least one more kernel
commit, plus a change to the umount(8) command before forced
dismounts will work for the experimental NFS client.

MFC after: 2 weeks

13 years agoRing the freelist doorbell from within refill_fl. While here, fix a bug
np [Wed, 20 Apr 2011 23:20:00 +0000 (23:20 +0000)]
Ring the freelist doorbell from within refill_fl.  While here, fix a bug
that could have allowed the hardware pidx to reach the cidx even though
the freelist isn't empty.  (Haven't actually seen this but it was there
waiting to happen..)

MFC after: 1 week

13 years agosh: Do not word split "${#parameter}".
jilles [Wed, 20 Apr 2011 22:24:54 +0000 (22:24 +0000)]
sh: Do not word split "${#parameter}".

This is only a problem if IFS contains digits, which is unusual but valid.

Because of an incorrect fix for PR bin/12137, "${#parameter}" was treated
as ${#parameter}. The underlying problem was that "${#parameter}"
erroneously added CTLESC bytes before determining the length. This
was properly fixed for PR bin/56147 but the incorrect fix was not backed
out.

Reported by: Seeker on forums.freebsd.org
MFC after: 2 weeks

13 years agoOnly set the sample rate if the USB audio channel reports
hselasky [Wed, 20 Apr 2011 19:41:08 +0000 (19:41 +0000)]
Only set the sample rate if the USB audio channel reports
that it supports the frequency control request.

MFC after: 7 days
Approved by: thompsa (mentor)

13 years agoCorrect comment.
pjd [Wed, 20 Apr 2011 18:49:12 +0000 (18:49 +0000)]
Correct comment.

MFC after: 1 week

13 years agoWhen we become primary, we connect to the remote and expect it to be in
pjd [Wed, 20 Apr 2011 18:43:28 +0000 (18:43 +0000)]
When we become primary, we connect to the remote and expect it to be in
secondary role. It is possible that the remote node is primary, but only
because there was a role change and it didn't finish cleaning up (unmounting
file systems, etc.). If we detect such situation, wait for the remote node
to switch the role to secondary before accepting I/Os. If we don't wait for
it in that case, we will most likely cause split-brain.

MFC after: 1 week

13 years agoUse the correct free routine when destroying a control queue.
np [Wed, 20 Apr 2011 18:04:34 +0000 (18:04 +0000)]
Use the correct free routine when destroying a control queue.

X-MFC after: r220873

13 years agoAdd ref to the latest firmware additions.
bschmidt [Wed, 20 Apr 2011 17:53:39 +0000 (17:53 +0000)]
Add ref to the latest firmware additions.

13 years agoNow that all bits are in for 1030/6230 adapters enable those.
bschmidt [Wed, 20 Apr 2011 17:49:05 +0000 (17:49 +0000)]
Now that all bits are in for 1030/6230 adapters enable those.
While here pull the adapter names from the Linux driver and sort
the list by ID.

13 years agoThe 6000 series gen2 adapters have 2 firmware images, one with
bschmidt [Wed, 20 Apr 2011 17:43:20 +0000 (17:43 +0000)]
The 6000 series gen2 adapters have 2 firmware images, one with
advanced btcoex support and one without.

13 years agoAdd firmware images for the 6000 series g2a and g2b adapters.
bschmidt [Wed, 20 Apr 2011 17:34:09 +0000 (17:34 +0000)]
Add firmware images for the 6000 series g2a and g2b adapters.

13 years agoUpdate iwn(4) firmware blobs:
bschmidt [Wed, 20 Apr 2011 17:32:20 +0000 (17:32 +0000)]
Update iwn(4) firmware blobs:
- bump iwn1000fw to 39.31.5.1
- bump iwn5000fw to 8.83.5.1
- bump iwn6050fw to 41.28.5.1

13 years agoAdd basic support for advanced bluetooth coexistence required
bschmidt [Wed, 20 Apr 2011 16:59:27 +0000 (16:59 +0000)]
Add basic support for advanced bluetooth coexistence required
for 6005 gen2b (1030/6030) adapters.

13 years agoIf we act in different role than requested by the remote node, log it
pjd [Wed, 20 Apr 2011 16:38:05 +0000 (16:38 +0000)]
If we act in different role than requested by the remote node, log it
as a warning and not an error.

MFC after: 1 week

13 years agoTimeout must be positive.
pjd [Wed, 20 Apr 2011 16:36:59 +0000 (16:36 +0000)]
Timeout must be positive.

MFC after: 1 week