]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoa variable was erroneously declared as 32 bit instead of 64.
luigi [Fri, 27 Jan 2012 13:26:25 +0000 (13:26 +0000)]
a variable was erroneously declared as 32 bit instead of 64.

MFC after: 3 days

12 years agoRemove a left-over reference to make.conf(5) which was used as a place to
pluknet [Fri, 27 Jan 2012 13:26:19 +0000 (13:26 +0000)]
Remove a left-over reference to make.conf(5) which was used as a place to
store the VM_STACK compile option to enable MAP_STACK support in its
earliest stage of development.

Found by: mux

12 years agoRewrite option parsing in mdconfig(8). This makes it more user-friendly
trasz [Fri, 27 Jan 2012 11:48:44 +0000 (11:48 +0000)]
Rewrite option parsing in mdconfig(8).  This makes it more user-friendly
by removing the ordering requirements and adding more descriptive error
messages; it also makes it more readable and maintainable.

Sponsored by: The FreeBSD Foundation

12 years agoReturn proper error message if recording device is not specified.
mav [Fri, 27 Jan 2012 09:15:55 +0000 (09:15 +0000)]
Return proper error message if recording device is not specified.

MFC after: 1 week

12 years agoFix size check, that prevents getting negative after casting
glebius [Fri, 27 Jan 2012 08:58:58 +0000 (08:58 +0000)]
Fix size check, that prevents getting negative after casting
to a signed type

Reviewed by: bde

12 years agoDo not mention SIOCSIFADDR.
glebius [Fri, 27 Jan 2012 08:46:32 +0000 (08:46 +0000)]
Do not mention SIOCSIFADDR.

12 years agoA problem with respect to data read through the buffer cache for both
rmacklem [Fri, 27 Jan 2012 02:46:12 +0000 (02:46 +0000)]
A problem with respect to data read through the buffer cache for both
NFS clients was reported to freebsd-fs@ under the subject "NFS
corruption in recent HEAD" on Nov. 26, 2011. This problem occurred when
a TCP mounted root fs was changed to using UDP. I believe that this
problem was caused by the change in mnt_stat.f_iosize that occurred
because rsize was decreased to the maximum supported by UDP. This
patch fixes the problem by using v_bufobj.bo_bsize instead of f_iosize,
since the latter is set to f_iosize when the vnode is allocated, but
does not change for a given vnode when f_iosize changes.

Reported by: pjd
Reviewed by: kib
MFC after: 2 weeks

12 years agoMinor cleanups to the csa snd driver.
pfg [Thu, 26 Jan 2012 21:43:11 +0000 (21:43 +0000)]
Minor cleanups to the csa snd driver.

Remove unneeded temporary variable (data) to better match the OSS code.
Remove some unused constants and type definitions.

Tested by: joel
Approved by: jhb (mentor)
MFC after: 3 weeks

12 years agoConsensus between bde and pjd seemed to be that if the function names
ghelmer [Thu, 26 Jan 2012 20:40:22 +0000 (20:40 +0000)]
Consensus between bde and pjd seemed to be that if the function names
are lined up, then any * after a long type should appear after the
type instead of being in front of the function name on the following
line.

12 years agoMake the comments consistent (capitalization, punctuation, and
ghelmer [Thu, 26 Jan 2012 20:35:01 +0000 (20:35 +0000)]
Make the comments consistent (capitalization, punctuation, and
format).

Requested by bde

12 years agoRestore the parenthesis that are necessary around the constant values.
ghelmer [Thu, 26 Jan 2012 20:33:08 +0000 (20:33 +0000)]
Restore the parenthesis that are necessary around the constant values.

Requested by bde.

12 years agoA flowtable entry can continue referencing an llentry indefinitely if the entry is...
kmacy [Thu, 26 Jan 2012 20:02:40 +0000 (20:02 +0000)]
A flowtable entry can continue referencing an llentry indefinitely if the entry is repeatedly
referenced within its timeout window. This change clears the LLE_VALID flag when an llentry
is removed from an interface's hash table and adds an extra check to the flowtable code
for the LLE_VALID flag in llentry to avoid retaining and using a stale reference.

Reviewed by: qingli@
MFC after: 2 weeks

12 years ago- Rewrite paragraphs about preemption.
glebius [Thu, 26 Jan 2012 19:11:08 +0000 (19:11 +0000)]
- Rewrite paragraphs about preemption.
- Avoid word combination "carp interface".

Prodded by: az

12 years agoRemove the blank line between the license and .Dd
ken [Thu, 26 Jan 2012 18:18:47 +0000 (18:18 +0000)]
Remove the blank line between the license and .Dd

Prompted by: brueffer
MFC after: 1 week

12 years agoBring in the LSI-supported version of the mps(4) driver.
ken [Thu, 26 Jan 2012 18:17:21 +0000 (18:17 +0000)]
Bring in the LSI-supported version of the mps(4) driver.

This involves significant changes to the mps(4) driver, but is not a
complete rewrite.

Some of the changes in this version of the driver:
 - Integrated RAID (IR) support.
 - Support for WarpDrive controllers.
 - Support for SCSI protection information (EEDP).
 - Support for TLR (Transport Level Retries), needed for tape drives.
 - Improved error recovery code.
 - ioctl interface compatible with LSI utilities.

mps.4: Update the mps(4) driver man page somewhat for the driver
changes.  The list of supported hardware still needs to be
updated to reflect the full list of supported cards.

conf/files: Add the new driver files.

mps/mpi/*: Updated version of the MPI header files, with a BSD style
copyright.

mps/*: See above for a description of the new driver features.

modules/mps/Makefile:
Add the new mps(4) driver files.

Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com>
Reviewed by: ken
MFC after: 1 week

12 years agoMore mdconfig(8) tests.
trasz [Thu, 26 Jan 2012 18:16:16 +0000 (18:16 +0000)]
More mdconfig(8) tests.

12 years agoAdd CAM infrastructure to allow reporting when a drive's long read capacity
ken [Thu, 26 Jan 2012 18:09:28 +0000 (18:09 +0000)]
Add CAM infrastructure to allow reporting when a drive's long read capacity
data changes.

cam_ccb.h: Add a new advanced information type, CDAI_TYPE_RCAPLONG,
for long read capacity data.

cam_xpt_internal.h:
Add a read capacity data pointer and length to struct cam_ed.

cam_xpt.c: Free the read capacity buffer when a device goes away.
While we're here, make sure we don't leak memory for other
malloced fields in struct cam_ed.

scsi_all.c: Update the scsi_read_capacity_16() to take a uint8_t * and
a length instead of just a pointer to the parameter data
structure.  This will hopefully make this function somewhat
immune to future changes in the parameter data.

scsi_all.h: Add some extra bit definitions to struct
scsi_read_capacity_data_long, and bump up the structure
size to the full size specified by SBC-3.

Change the prototype for scsi_read_capacity_16().

scsi_da.c: Register changes in read capacity data with the transport
layer.  This allows the transport layer to send out an
async notification to interested parties.  Update the
dasetgeom() API.

Use scsi_extract_sense_len() instead of
scsi_extract_sense().

scsi_xpt.c: Add support for the new CDAI_TYPE_RCAPLONG advanced
information type.

Make sure we set the physpath pointer to NULL after freeing
it.  This allows blindly freeing it in the struct cam_ed
destructor.

sys/param.h: Bump __FreeBSD_version from 1000005 to 1000006 to make it
easier for third party drivers to determine that the read
capacity data async notification is available.

camcontrol.c,
mptutil/mpt_cam.c:
Update these for the new scsi_read_capacity_16() argument
structure.

Sponsored by: Spectra Logic

12 years agoStart sentences on a new line, and fix a few other nits.
ken [Thu, 26 Jan 2012 17:28:33 +0000 (17:28 +0000)]
Start sentences on a new line, and fix a few other nits.

Prompted by: gjb
MFC after: 1 week

12 years agoUpdate PCI IDs for ciss controllers that are supported by this driver.
sbruno [Thu, 26 Jan 2012 17:04:17 +0000 (17:04 +0000)]
Update PCI IDs for ciss controllers that are supported by this driver.

Submitted by: scott.benesh@hp.com
Obtained from: Yahoo! Inc and HP
MFC after: 1 week

12 years agoXen netback driver rewrite.
ken [Thu, 26 Jan 2012 16:35:09 +0000 (16:35 +0000)]
Xen netback driver rewrite.

share/man/man4/Makefile,
share/man/man4/xnb.4,
sys/dev/xen/netback/netback.c,
sys/dev/xen/netback/netback_unit_tests.c:

Rewrote the netback driver for xen to attach properly via newbus
and work properly in both HVM and PVM mode (only HVM is tested).
Works with the in-tree FreeBSD netfront driver or the Windows
netfront driver from SuSE.  Has not been extensively tested with
a Linux netfront driver.  Does not implement LRO, TSO, or
polling.  Includes unit tests that may be run through sysctl
after compiling with XNB_DEBUG defined.

sys/dev/xen/blkback/blkback.c,
sys/xen/interface/io/netif.h:

Comment elaboration.

sys/kern/uipc_mbuf.c:

Fix page fault in kernel mode when calling m_print() on a
null mbuf.  Since m_print() is only used for debugging, there
are no performance concerns for extra error checking code.

sys/kern/subr_scanf.c:

Add the "hh" and "ll" width specifiers from C99 to scanf().
A few callers were already using "ll" even though scanf()
was handling it as "l".

Submitted by: Alan Somers <alans@spectralogic.com>
Submitted by: John Suykerbuyk <johns@spectralogic.com>
Sponsored by: Spectra Logic
MFC after: 1 week
Reviewed by: ken

12 years agoPress some more info into the PCM device name:
mav [Thu, 26 Jan 2012 12:09:04 +0000 (12:09 +0000)]
Press some more info into the PCM device name:
 - add "+HP" in case of headphones redirection;
 - add device type for analog devices, if all pins have the same.

As result now it may look like "Analog 5.1+HP/2.0" or "Front Analog Mic".
I hope it will be more useful than long and confusing.

MFC after: 2 months
Sponsored by: iXsystems, Inc.

12 years agoRemove casts from inet6 address testing macros, thus preserving
glebius [Thu, 26 Jan 2012 12:04:19 +0000 (12:04 +0000)]
Remove casts from inet6 address testing macros, thus preserving
qualifier from original argument.

Obtained from: NetBSD, r. 1.67
Submitted by: maxim

12 years agoAlthough aio_nbytes is size_t, later is is signed to
glebius [Thu, 26 Jan 2012 11:59:48 +0000 (11:59 +0000)]
Although aio_nbytes is size_t, later is is signed to
casted types: to ssize_t in filesystem code and to
int in buf code, thus supplying a negative argument
leads to kernel panic later. To fix that check user
supplied argument in the beginning of syscall.

Submitted by: Maxim Dounin <mdounin mdounin.ru>, maxim@

12 years agoList supported ioctl commands instead of old one.
glebius [Thu, 26 Jan 2012 11:08:55 +0000 (11:08 +0000)]
List supported ioctl commands instead of old one.

12 years agoDon't mention no longer supported ioctl commands.
glebius [Thu, 26 Jan 2012 10:53:39 +0000 (10:53 +0000)]
Don't mention no longer supported ioctl commands.

12 years agoRemove a block that contatined some outdated misinformation
glebius [Thu, 26 Jan 2012 10:51:41 +0000 (10:51 +0000)]
Remove a block that contatined some outdated misinformation
on how addresses are configured, as well as obviousness that
Ethernet interface may run arp(4).

12 years agoRemove a commented out old block inherited from inet.4. The
glebius [Thu, 26 Jan 2012 10:48:17 +0000 (10:48 +0000)]
Remove a commented out old block inherited from inet.4. The
text there was so much outdated that it required a complete
rewrite even for inet.4, not mentioning inet6.4. There is
no reason to keep it in the manual page.

12 years ago- Remove no longer supported ioctl cmds.
glebius [Thu, 26 Jan 2012 10:43:40 +0000 (10:43 +0000)]
- Remove no longer supported ioctl cmds.
- Fix name of SIOCSIFADDR.

12 years agoUpdate information on setting and retreiving inet4 addresses.
glebius [Thu, 26 Jan 2012 10:42:25 +0000 (10:42 +0000)]
Update information on setting and retreiving inet4 addresses.

12 years agoFix typo in r230571.
mav [Thu, 26 Jan 2012 10:30:50 +0000 (10:30 +0000)]
Fix typo in r230571.

Submitted by: trasz

12 years agoixgbe changes:
luigi [Thu, 26 Jan 2012 09:55:16 +0000 (09:55 +0000)]
ixgbe changes:
- remove experimental code for disabling CRC
- use the correct constant for conversion between interrupt rate
  and EITR values (the previous values were off by a factor of 2)
- make dev.ix.N.queueM.interrupt_rate a RW sysctl variable.
  Changing individual values affects the queue immediately,
  and propagates to all interfaces at the next reinit.
- add dev.ix.N.queueM.irqs rdonly sysctl, to export the actual
  interrupt counts

Netmap-related changes for ixgbe:
- use the "new" format for TX descriptors in netmap mode.
- pass interrupt mitigation delays to the user process doing poll()
  on a netmap file descriptor.
  On the RX side this means we will not check the ring more than once
  per interrupt. This gives the process a chance to sleep and process
  packets in larger batches, thus reducing CPU usage.
  On the TX side we take this even further: completed transmissions are
  reclaimed every half ring even if the NIC interrupts more often.
  This saves even more CPU without any additional tx delays.

Generic Netmap-related changes:
- align the netmap_kring to cache lines so that there is no false sharing
  (possibly useful for multiqueue NICs and MSIX interrupts, which are
  handled by different cores). It's a minor improvement but it does not
  cost anything.

Reviewed by: Jack Vogel
Approved by: Jack Vogel

12 years agoAdd another bunch of CODEC IDs.
mav [Thu, 26 Jan 2012 09:45:14 +0000 (09:45 +0000)]
Add another bunch of CODEC IDs.

12 years agoAdd some node debugging which has helped me track down which particular
adrian [Thu, 26 Jan 2012 07:03:30 +0000 (07:03 +0000)]
Add some node debugging which has helped me track down which particular
concurrent vap->iv_bss free issues have been occuring.

12 years agoInclude opt_wlan.h before net80211 includes; so IEEE80211_* configuration
adrian [Thu, 26 Jan 2012 05:11:37 +0000 (05:11 +0000)]
Include opt_wlan.h before net80211 includes; so IEEE80211_* configuration
flags are correctly handled.

This is required for this to load when IEEE80211_DEBUG_REFCNT is
defined.

12 years agoRevert r230516, since it doesn't really fix the problem.
rmacklem [Thu, 26 Jan 2012 00:07:34 +0000 (00:07 +0000)]
Revert r230516, since it doesn't really fix the problem.

12 years agoUpdate sbp_targ such that it can actually handle multiple CTIO's during operation
sbruno [Wed, 25 Jan 2012 23:33:50 +0000 (23:33 +0000)]
Update sbp_targ such that it can actually handle multiple CTIO's during operation

PR: kern/119575

12 years agoDon't print a warning when using netstat to print
tuexen [Wed, 25 Jan 2012 21:49:48 +0000 (21:49 +0000)]
Don't print a warning when using netstat to print
SCTP statistics when there is not SCTP in the kernel.
This problem was reported by Sean Mahood.

MFC after: 1 week.

12 years agoOops, fix the loader tunable name added in r230551.
mav [Wed, 25 Jan 2012 20:54:16 +0000 (20:54 +0000)]
Oops, fix the loader tunable name added in r230551.

12 years agoWhen doing vflush(WRITECLOSE), clean vnode pages.
kib [Wed, 25 Jan 2012 20:54:09 +0000 (20:54 +0000)]
When doing vflush(WRITECLOSE), clean vnode pages.

Unmounts do vfs_msync() before calling VFS_UNMOUNT(), but there is
still a race allowing a process to dirty pages after msync
finished. Remounts rw->ro just left dirty pages in system.

Reviewed by: alc, tegge (long time ago)
Tested by: pho
MFC after: 2 weeks

12 years agoFix remaining calls to cache_enter() in both NFS clients to provide
kib [Wed, 25 Jan 2012 20:48:20 +0000 (20:48 +0000)]
Fix remaining calls to cache_enter() in both NFS clients to provide
appropriate timestamps.  Restore the assertions which verify that
NCF_TS is set when timestamp is asked for.

Reviewed by:  jhb (previous version)
MFC after:    2 weeks

12 years agoRewrite jack presence detection and implement automatic recording source
mav [Wed, 25 Jan 2012 20:46:10 +0000 (20:46 +0000)]
Rewrite jack presence detection and implement automatic recording source
selection in snd_hda(4) driver.

Now driver tracks jack presence detection status for every CODEC pin. For
playback associations, when configured, that information, same as before,
can be used to automatically redirect audio to headphones. Also same as
before, these events are used to track digital display connection status
and fetch ELD. Now in addition to that driver uses that information to
automatically switch recording source of the mixer to the connected input.

When there are devices with no jack detection and with one both connected,
last ones will have the precedence. As result, on most laptops after boot
internal microphone should be automatically selected. But if external one
(for example, headset) connected, it will be selected automatically.
When external mic disconnected, internal one will be selected again.

Automatic recording source selection is enabled by default now to make
recording work out of the box without touching mixer. But it can be
disabled or limited only to attach time using hint.pcm.X.rec.autosrc loader
tunables or dev.pcm.X.rec.autosrc sysctls.

MFC after: 2 months
Sponsored by: iXsystems, Inc.

12 years agoFix CTL flags in the declarations of KERN_PROC_ENV, AUXV and
trociny [Wed, 25 Jan 2012 20:15:58 +0000 (20:15 +0000)]
Fix CTL flags in the declarations of KERN_PROC_ENV, AUXV and
PS_STRINGS sysctls: they are read only.

MFC after: 1 week

12 years agoAdd -P option to allow get and set limits for other processes.
trociny [Wed, 25 Jan 2012 20:14:41 +0000 (20:14 +0000)]
Add -P option to allow get and set limits for other processes.

Submitted by: Andrey Zonov <andrey at zonov.org>
MFC after: 2 weeks

12 years agoAfter the recent changes there is no need in rlimit array any more.
trociny [Wed, 25 Jan 2012 20:13:37 +0000 (20:13 +0000)]
After the recent changes there is no need in rlimit array any more.

Submitted by: Andrey Zonov <andrey at zonov.org>
MFC after: 1 week

12 years agoAdd a timeout on positive name cache entries in the NFS client. That is,
jhb [Wed, 25 Jan 2012 20:05:58 +0000 (20:05 +0000)]
Add a timeout on positive name cache entries in the NFS client.  That is,
we will only trust a positive name cache entry for a specified amount of
time before falling back to a LOOKUP RPC, even if the ctime for the file
handle matches the cached copy in the name cache entry.  The timeout is
configured via a new 'nametimeo' mount option and defaults to 60 seconds.
It may be set to zero to disable positive name caching entirely.

Reviewed by: rmacklem
MFC after: 1 week

12 years agoRemove extra sentence, a leftover from r202845.
stefanf [Wed, 25 Jan 2012 18:49:11 +0000 (18:49 +0000)]
Remove extra sentence, a leftover from r202845.

12 years agoClarify and improve the boot menu with some small changes:
pluknet [Wed, 25 Jan 2012 18:36:01 +0000 (18:36 +0000)]
Clarify and improve the boot menu with some small changes:
- Enter instead of ENTER
- Remove colons
- Line up option values
- Use dots to provide a line to visually connect the menu
  selections with their values
- Replace Enabled/Disabled with off/On
  (bigger inital cap for "On" is a visual indicator)
- Remove confusing "Boot" from selections that don't boot.
- With loader_color=1 in /boot/loader.conf, use reverse video to
  highlight enabled options

PR: misc/160818
Submitted by: Warren Block <wblock wonkity com>
Reviewed by: Devin Teske <devin dot teske fisglobal com>, current@
MFC after: 1 week

12 years agoFix a bug introduced in r230000. We were eliminating all LUNs on a target
ken [Wed, 25 Jan 2012 17:58:47 +0000 (17:58 +0000)]
Fix a bug introduced in r230000.  We were eliminating all LUNs on a target
in response to CAM_DEV_NOT_THERE, instead of just the LUN in question.

This will now just eliminate the specified LUN in response to
CAM_DEV_NOT_THERE.

Reported by: Richard Todd <rmtodd@servalan.servalan.com>
MFC after: 3 days

12 years agoRevert 229667: After some discussion of this change, it seems it is
ghelmer [Wed, 25 Jan 2012 14:50:12 +0000 (14:50 +0000)]
Revert 229667: After some discussion of this change, it seems it is
better to leave the pidfile open where it was. Add a note to the
man page describing pidfile strategies to use if the daemon is to
be run as a user other than root.

12 years agoOrder newly added functions alphabetically.
kib [Wed, 25 Jan 2012 12:43:27 +0000 (12:43 +0000)]
Order newly added functions alphabetically.

Requested by: bde
MFC after: 3 days

12 years agoAllow PASSTHROUGH (AC3) to have more then 2 channels.
mav [Wed, 25 Jan 2012 11:45:50 +0000 (11:45 +0000)]
Allow PASSTHROUGH (AC3) to have more then 2 channels.
8 channels can be used to get more then 6.144Mbps bandwidth.

12 years agoFix comment.
trasz [Wed, 25 Jan 2012 11:28:18 +0000 (11:28 +0000)]
Fix comment.

12 years agoMove mdconfig(8) tests under regression/sbin/, where they belong.
trasz [Wed, 25 Jan 2012 10:11:54 +0000 (10:11 +0000)]
Move mdconfig(8) tests under regression/sbin/, where they belong.

Submitted by: jh@

12 years agoFix word order in hdaa_subvendor_id() to match PCI (where it comes from),
mav [Wed, 25 Jan 2012 09:57:34 +0000 (09:57 +0000)]
Fix word order in hdaa_subvendor_id() to match PCI (where it comes from),
broken at r230130. This should fix applying system-specific patches.

12 years agoRemove unused variable.
pluknet [Wed, 25 Jan 2012 08:53:42 +0000 (08:53 +0000)]
Remove unused variable.

The actual ia6->ia6_lifetime access is hidden in
IFA6_IS_INVALID/IFA6_IS_DEPRECATED macros since a long time ago
(see netinet6/nd6.c, r1.104 of KAME for the reference).

MFC after: 3 days

12 years agoAdd prototypes, ANSIfy functions definitions to reduce WARNS=6 output.
charnier [Wed, 25 Jan 2012 08:42:19 +0000 (08:42 +0000)]
Add prototypes, ANSIfy functions definitions to reduce WARNS=6 output.

12 years agoFix a SIGSEGV problem in directory entry renaming.
hrs [Wed, 25 Jan 2012 07:45:15 +0000 (07:45 +0000)]
Fix a SIGSEGV problem in directory entry renaming.

12 years agoMinor indenting divot...
imp [Wed, 25 Jan 2012 04:48:27 +0000 (04:48 +0000)]
Minor indenting divot...

12 years agoSome minor additions to the list of supported devices...
imp [Wed, 25 Jan 2012 04:45:29 +0000 (04:45 +0000)]
Some minor additions to the list of supported devices...

12 years agoExperimental support for booting CHRP-type PowerPC systems from hard disks.
nwhitehorn [Wed, 25 Jan 2012 03:37:39 +0000 (03:37 +0000)]
Experimental support for booting CHRP-type PowerPC systems from hard disks.

12 years agoClean up reinstall option and remove duplicate code
emaste [Wed, 25 Jan 2012 02:15:40 +0000 (02:15 +0000)]
Clean up reinstall option and remove duplicate code

- Move the reinstall logic to be before menus are initialised
  (menus are not needed when reinstalling a zonefile).

- Remove unnecessary re-initialization of path_db.

- Update variable name and error message because we now use the
  zone name relative to /usr/share/zoneinfo, not the full path.

pr: bin/164041
Submitted by: Devin Teske <dteske vicor com>
MFC after: 1 week

12 years agoIf a mount -u is done to either NFS client that switches it
rmacklem [Wed, 25 Jan 2012 00:22:53 +0000 (00:22 +0000)]
If a mount -u is done to either NFS client that switches it
from TCP to UDP and the rsize/wsize/readdirsize is greater
than NFS_MAXDGRAMDATA, it is possible for a thread doing an
I/O RPC to get stuck repeatedly doing retries. This happens
because the RPC will use a resize/wsize/readdirsize that won't
work for UDP and, as such, it will keep failing indefinitely.
This patch returns an error for this case, to avoid the problem.
A discussion on freebsd-fs@ seemed to indicate that returning
an error was preferable to silently ignoring the "udp"/"mntudp"
option.
This problem was discovered while investigating a problem reported
by pjd@ via email.

MFC after: 2 weeks

12 years ago- Fix documentation to note that /etc/hast.conf is the default configuration
pjd [Tue, 24 Jan 2012 23:43:13 +0000 (23:43 +0000)]
- Fix documentation to note that /etc/hast.conf is the default configuration
  file for hastd(8) and hastctl(8) and not hast.conf.
- In copyright statement correct that this file is documentation, not software.
- Bump date.

MFC after: 3 days

12 years agoMerge illumos revisions 13572, 13573, 13574:
mm [Tue, 24 Jan 2012 23:09:54 +0000 (23:09 +0000)]
Merge illumos revisions 13572, 13573, 13574:

Rev. 13572:
disk sync write perf regression when slog is used post oi_148 [1]

Rev. 13573:
crash during reguid causes stale config [2]
allow and unallow missing from zpool history since removal of pyzfs [5]

Rev. 13574:
leaking a vdev when removing an l2cache device [3]
memory leak when adding a file-based l2arc device [4]
leak in ZFS from metaslab_group_create and zfs_ereport_checksum [6]

References:
https://www.illumos.org/issues/1909 [1]
https://www.illumos.org/issues/1949 [2]
https://www.illumos.org/issues/1951 [3]
https://www.illumos.org/issues/1952 [4]
https://www.illumos.org/issues/1953 [5]
https://www.illumos.org/issues/1954 [6]

Obtained from: illumos (issues #1909, #1949, #1951, #1952, #1953, #1954)
MFC after: 2 weeks

12 years agoIn addition to r230511, allow 8 channel AC3 formats.
mav [Tue, 24 Jan 2012 22:40:24 +0000 (22:40 +0000)]
In addition to r230511, allow 8 channel AC3 formats.

12 years agosockstat: Also show sockets not associated with a file descriptor.
jilles [Tue, 24 Jan 2012 21:33:34 +0000 (21:33 +0000)]
sockstat: Also show sockets not associated with a file descriptor.

Sockets not associated with a file descriptor include TCP TIME_WAIT states
and sockets created via the socket(9) API such as from rpc.lockd and the NFS
client.

PR: bin/164081
MFC after: 2 weeks
No objection: des

12 years agoEnable High Bit Rate (HBR) Encoded Packet Type (EPT), if supported
mav [Tue, 24 Jan 2012 17:31:27 +0000 (17:31 +0000)]
Enable High Bit Rate (HBR) Encoded Packet Type (EPT), if supported
(HDMI and HBR bits set) and needed (AC3 format used with 8 channels).
This should allow DTS-HD/TrueHD pass-through with rates above 6.144Mbps.

MFC after: 2 months
Sponsored by: iXsystems, Inc.

12 years agoReplace random ARIN direct assignment legacy IPs with proper RFC 5735
bz [Tue, 24 Jan 2012 15:20:31 +0000 (15:20 +0000)]
Replace random ARIN direct assignment legacy IPs with proper RFC 5735
TEST-NET1 block for use in documentation and example code addresses.

MFC after: 3 days

12 years agoJust define __FreeBSD__ to 1 instead of doing what the compiler does.
netchild [Tue, 24 Jan 2012 15:13:55 +0000 (15:13 +0000)]
Just define __FreeBSD__ to 1 instead of doing what the compiler does.
The kernel is supposed to DTRT based upon the __FreeBSD_version value,
not the value of __FreeBSD__.

Discussed with: bz

12 years agoRemove unused variable.
glebius [Tue, 24 Jan 2012 14:27:14 +0000 (14:27 +0000)]
Remove unused variable.

12 years agoHDMI and DisplayPort support can coexist in HDA CODEC.
mav [Tue, 24 Jan 2012 14:17:13 +0000 (14:17 +0000)]
HDMI and DisplayPort support can coexist in HDA CODEC.
Report "HDMI/DP" in PCM device name if both supported.

MFC after: 2 months
Sponsored by: iXsystems, Inc.

12 years agoPlug a possible ifa_ref leak in case of premature return from in6_purgeaddr().
bz [Tue, 24 Jan 2012 13:57:30 +0000 (13:57 +0000)]
Plug a possible ifa_ref leak in case of premature return from in6_purgeaddr().

Reviewed by: rwatson
MFC after: 3 days

12 years agoAdd some basic regression tests for mdconfig(8).
trasz [Tue, 24 Jan 2012 13:23:52 +0000 (13:23 +0000)]
Add some basic regression tests for mdconfig(8).

12 years agoWe are in FreeBSD 10 now: define __FreeBSD__ to 10.
netchild [Tue, 24 Jan 2012 11:06:22 +0000 (11:06 +0000)]
We are in FreeBSD 10 now: define __FreeBSD__ to 10.

12 years agoRemove the stale XXX rt_newaddrmsg comment.
pluknet [Tue, 24 Jan 2012 09:51:42 +0000 (09:51 +0000)]
Remove the stale XXX rt_newaddrmsg comment.
A routing socket message is generated since r192282.

Reviewed by: bz
MFC after: 3 days

12 years agoTry resolving jail path with realpath(3).
mm [Tue, 24 Jan 2012 08:04:38 +0000 (08:04 +0000)]
Try resolving jail path with realpath(3).

jail(8) does a chdir(2) to the given path argument. Kernel evaluates the
jail path from the new cwd and not from the original cwd, which leads to
undesired behavior if given a relative path.

Reviewed by: jamie
MFC after: 2 weeks

12 years agoRemove unnecessary line break.
bz [Tue, 24 Jan 2012 06:21:38 +0000 (06:21 +0000)]
Remove unnecessary line break.

MFC after: 3 days

12 years agoFix up some style(9) indenting and reorganise some of the hal methods.
adrian [Tue, 24 Jan 2012 06:12:48 +0000 (06:12 +0000)]
Fix up some style(9) indenting and reorganise some of the hal methods.

There should be no functional change due to this commit.

12 years agoAdd a missing HAL method macro. I'm using this as part of some personal
adrian [Tue, 24 Jan 2012 06:07:05 +0000 (06:07 +0000)]
Add a missing HAL method macro. I'm using this as part of some personal
DFS radar stuff.

12 years agoApparently, both nfs clients do not use cache_enter_time()
kib [Mon, 23 Jan 2012 17:09:23 +0000 (17:09 +0000)]
Apparently, both nfs clients do not use cache_enter_time()
consistently, creating some namecache entries without NCF_TS flag.
This causes panic due to failed assertion.

As a temporal relief, remove the assert. Return epoch timestamp for
the entries without timestamp if asked.

While there, consolidate the code which returns timestamps, into a
helper cache_out_ts().

Discussed with:  jhb
MFC after: 2 weeks

12 years agoRealtek CODECs declare support for 32bit samples on S/PDIF input/output
mav [Mon, 23 Jan 2012 17:05:11 +0000 (17:05 +0000)]
Realtek CODECs declare support for 32bit samples on S/PDIF input/output
widgets. I am not sure if S/PDIF supports 32bit samples, but my Marantz
SR4001 doesn't, producing only single clicks on playback start/stop.
Because HDA controller requires 32bit alignment for all samples above 16bit,
we can't handle this situation in regular way and have to set 32bit format
in sound(4) for anything above 16bit. To workaround the problem, prefer
to setup hardware to use 24/20bit samples when 32bit format requested. Add
dev.pcm.X.play.32bit and dev.pcm.X.rec.32bit sysctls to control what format
really use for 32bit samples.

MFC after: 2 months
Sponsored by: iXsystems, Inc.

12 years agoProvide a findhook method for ng_socket(4). The node stores a
glebius [Mon, 23 Jan 2012 16:43:13 +0000 (16:43 +0000)]
Provide a findhook method for ng_socket(4). The node stores a
hash with names of its hooks. It starts with size of 16, and
grows when number of hooks reaches twice the current size. A
failure to grow (memory is allocated with M_NOWAIT) isn't
fatal, however.

I used standard hash(9) function for the hash. With 25000
hooks named in the mpd (ports/net/mpd5) manner of "b%u", the
distributions is the following: 72.1% entries consist of one
element, 22.1% consist of two, 5.2% consist of three and
0.6% of four.

Speedup in a synthetic test that creates 25000 hooks and then
runs through a long cyclce dereferencing them in a random order
is over 25 times.

12 years agoConvert panic()s to KASSERT()s. This is an optimisation for
glebius [Mon, 23 Jan 2012 16:31:46 +0000 (16:31 +0000)]
Convert panic()s to KASSERT()s. This is an optimisation for
hashdestroy() since in absence of INVARIANTS a compiler
will drop the entire for() cycle.

12 years agoPart of r230482 didn't actually work. Revert it for now. This means PR
nwhitehorn [Mon, 23 Jan 2012 16:17:54 +0000 (16:17 +0000)]
Part of r230482 didn't actually work. Revert it for now. This means PR
161047 isn't actually fixed.

PR: bin/161047

12 years agoDo a test in a better way. Editing files after testing them is never wise.
nwhitehorn [Mon, 23 Jan 2012 15:50:16 +0000 (15:50 +0000)]
Do a test in a better way. Editing files after testing them is never wise.

12 years agoPer popular demand, if installing from a graphics terminal, run the
nwhitehorn [Mon, 23 Jan 2012 15:44:52 +0000 (15:44 +0000)]
Per popular demand, if installing from a graphics terminal, run the
installer on a VTY with no kernel messages (VTY 2), show the installer
log in real time on VTY 3, and spawn a shell on VTY 4.

PR: bin/161047, bin/161048
MFC after: 2 weeks

12 years agoIn ng_socket(4) expose less kernel internals to userland. This commit
glebius [Mon, 23 Jan 2012 15:39:45 +0000 (15:39 +0000)]
In ng_socket(4) expose less kernel internals to userland. This commit
breaks ABI, but makes probability of ABI breakage in future less.

12 years agoConvert locks that protect name hash, ID hash and typelist from
glebius [Mon, 23 Jan 2012 15:17:14 +0000 (15:17 +0000)]
Convert locks that protect name hash, ID hash and typelist from
mutex(9) to rwlock(9) based locks.

While here remove dropping lock when processing NGM_LISTNODES,
and NGM_LISTTYPES generic commands. We don't need to drop it
since memory allocation is done with M_NOWAIT.

12 years agoMechanically add a config for all missing drivers.
netchild [Mon, 23 Jan 2012 11:37:40 +0000 (11:37 +0000)]
Mechanically add a config for all missing drivers.

No cross-referencing was added to the configs, so no
automatic linking to the documentation of other subsystems.

Drivers which already contain doxygen markup:
agp ath bktr bxe cxgb cxgbe dpt drm e1000 iir
ixgbe mwl nxge ofw pccard siba wpi xen

12 years agoFix two nits in previous commit pointed out by pjd@.
des [Mon, 23 Jan 2012 09:23:07 +0000 (09:23 +0000)]
Fix two nits in previous commit pointed out by pjd@.

MFC after: 3 weeks

12 years agoAdd C11 macros describing subnormal numbers to float.h.
das [Mon, 23 Jan 2012 06:36:41 +0000 (06:36 +0000)]
Add C11 macros describing subnormal numbers to float.h.

Reviewed by: bde

12 years agoMake procstat -l to work with the new version of kern.proc.rlimit.
trociny [Sun, 22 Jan 2012 20:26:46 +0000 (20:26 +0000)]
Make procstat -l to work with the new version of kern.proc.rlimit.

Submitted by: Andrey Zonov <andrey at zonov.org>
MFC after: 2 weeks

12 years agoChange kern.proc.rlimit sysctl to:
trociny [Sun, 22 Jan 2012 20:25:00 +0000 (20:25 +0000)]
Change kern.proc.rlimit sysctl to:

- retrive only one, specified limit for a process, not the whole
  array, as it was previously (the sysctl has been added recently and
  has not been backported to stable yet, so this change is ok);

- allow to set a resource limit for another process.

Submitted by: Andrey Zonov <andrey at zonov.org>
Discussed with: kib
Reviewed by: kib
MFC after: 2 weeks

12 years agoIncrease snd_hda(4) default maximal buffer size from 16K to 64K and
mav [Sun, 22 Jan 2012 15:44:20 +0000 (15:44 +0000)]
Increase snd_hda(4) default maximal buffer size from 16K to 64K and
maximal from 64K to 256K.

We usually don't need 750 sound interrupts per second (1.3ms latency)
when playing 192K/24/8 stream. 187 should be better. On usual 48K/16/2
it is just enough for hw.snd.latency=9 at hw.snd.latency_profile=1 with
23 and 6 interrupts per second.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

12 years agoDocument the values for hw.snd.default_auto.
stefanf [Sun, 22 Jan 2012 14:04:42 +0000 (14:04 +0000)]
Document the values for hw.snd.default_auto.

12 years agosh: Fix $? in the first command of a 'for'.
jilles [Sun, 22 Jan 2012 14:00:33 +0000 (14:00 +0000)]
sh: Fix $? in the first command of a 'for'.

In the first command of a 'for', $? should be the exit status of the last
pipeline (command substitution in the word list or command before 'for'),
not always 0.

12 years agoConnect VirtIO-related manpages to the build.
brueffer [Sun, 22 Jan 2012 13:51:20 +0000 (13:51 +0000)]
Connect VirtIO-related manpages to the build.

12 years agoClarify the implementation-defined behaviour in case of close(2)
kib [Sun, 22 Jan 2012 11:58:17 +0000 (11:58 +0000)]
Clarify the implementation-defined behaviour in case of close(2)
returning error.

MFC after: 1 week

12 years agoFix typo.
kib [Sun, 22 Jan 2012 11:35:50 +0000 (11:35 +0000)]
Fix typo.

Submitted by: John Marino <draco marino st>
MFC after: 3 days

12 years ago- Replace "wtmp" with "utx.log" because last(1) no longer reads wtmp.
hrs [Sun, 22 Jan 2012 11:34:24 +0000 (11:34 +0000)]
- Replace "wtmp" with "utx.log" because last(1) no longer reads wtmp.
- A real filename is now shown in an output report when "-f file" is specified.
- Add Xr lastlogin into last(1) manual page.

Reviewed by: ed
MFC after: 1 week