]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoChannel my inner hobgoblin and make all functions enclosed in ()
imp [Thu, 24 Apr 2014 21:17:53 +0000 (21:17 +0000)]
Channel my inner hobgoblin and make all functions enclosed in ()
instead of some in () and some in {}

10 years agoMore like gone in 11...
imp [Thu, 24 Apr 2014 21:17:48 +0000 (21:17 +0000)]
More like gone in 11...

10 years agoCorrect min/max cluster counts for FAT12/16/32
emaste [Thu, 24 Apr 2014 20:53:09 +0000 (20:53 +0000)]
Correct min/max cluster counts for FAT12/16/32

FAT12      1..4084
FAT16   4085..65524
FAT32  65525..

This is required for interoperability with other FAT implementations,
and in particular UEFI.

Obtained from:      NetBSD
Sponsored by:       The FreeBSD Foundation

10 years agoThe PR reported that the old NFS server did not set uio_td == NULL
rmacklem [Thu, 24 Apr 2014 20:47:58 +0000 (20:47 +0000)]
The PR reported that the old NFS server did not set uio_td == NULL
for the VOP_READ() call. This patch fixes both the old and new
server for this case.

PR: 185232
Submitted by: PR had patch for old server
Reviewed by: kib
MFC after: 2 weeks

10 years agoFix host and network routes for new interfaces when net.add_addr_allfibs=0
asomers [Thu, 24 Apr 2014 17:23:16 +0000 (17:23 +0000)]
Fix host and network routes for new interfaces when net.add_addr_allfibs=0

sys/net/route.c
In rtinit1, use the interface fib instead of the process fib.  The
latter wasn't very useful because ifconfig(8) is usually invoked
with the default process fib.  Changing ifconfig(8) to use setfib(2)
would be redundant, because it already sets the interface fib.

tests/sys/netinet/fibs_test.sh
Clear the expected ATF failure

sys/net/if.c
Pass the interface fib in calls to rtrequest1_fib and rtalloc1_fib

sys/netinet/in.c
sys/net/if_var.h
Add a fibnum argument to ifa_switch_loopback_route, a subroutine of
in_scrubprefix.  Pass it the interface fib.

PR: kern/187549
Reviewed by: melifaro
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation

10 years agoRemove limits on size of READ/WRITE operations.
mav [Thu, 24 Apr 2014 16:19:49 +0000 (16:19 +0000)]
Remove limits on size of READ/WRITE operations.

Instead of allocating up to 16MB or RAM at once to handle whole I/O,
allocate up to 1MB at a time, but do multiple ctl_datamove() and storage
I/Os if needed.

10 years agoEliminate duplicate checks in vdev_geom_io_intr error handling
smh [Thu, 24 Apr 2014 15:36:00 +0000 (15:36 +0000)]
Eliminate duplicate checks in vdev_geom_io_intr error handling

MFC after: 1 month

10 years agoMake CAM target CTL frontend respect SIM I/O size limitations.
mav [Thu, 24 Apr 2014 15:16:26 +0000 (15:16 +0000)]
Make CAM target CTL frontend respect SIM I/O size limitations.

If datamove size is bigger then SIM can handle, or it has more segments
then this code can handle -- split it into several CTIO requests.

10 years agoRemove duplicate SYSCTL_DECL(_debug_acpi) which was breaking tinderbox
smh [Thu, 24 Apr 2014 14:58:12 +0000 (14:58 +0000)]
Remove duplicate SYSCTL_DECL(_debug_acpi) which was breaking tinderbox

MFC after: 2 weeks
X-MFC-With: r264849

10 years agoxen: fix copyright header
royger [Thu, 24 Apr 2014 14:44:42 +0000 (14:44 +0000)]
xen: fix copyright header

Some of the code in xen-locore.S was picked from Cherry G. Mathew
amd64 Xen PV branch, but I've failed to set the proper copyright, so
do it now.

Approved by: gibbs

10 years agoAdd Linux socket call decoding to truss
smh [Thu, 24 Apr 2014 14:12:35 +0000 (14:12 +0000)]
Add Linux socket call decoding to truss

MFC after: 1 month

10 years agoModify CTL iSCSI frontend to properly handle situations where datamove
trasz [Thu, 24 Apr 2014 12:54:35 +0000 (12:54 +0000)]
Modify CTL iSCSI frontend to properly handle situations where datamove
routine is called multiple times per SCSI task.

Sponsored by: The FreeBSD Foundation

10 years agoFix jailed raw sockets not setting the correct source address by
smh [Thu, 24 Apr 2014 12:52:31 +0000 (12:52 +0000)]
Fix jailed raw sockets not setting the correct source address by
calling in_pcbladdr instead of prison_get_ip4

MFC after: 1 month

10 years agoIncrease ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still
smh [Thu, 24 Apr 2014 12:38:07 +0000 (12:38 +0000)]
Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still
insufficient on some machines

MFC after: 2 weeks

10 years agoStyle fixes.
trasz [Thu, 24 Apr 2014 11:28:23 +0000 (11:28 +0000)]
Style fixes.

10 years agoGrammar fix.
trasz [Thu, 24 Apr 2014 11:27:03 +0000 (11:27 +0000)]
Grammar fix.

10 years agoWait for the callout to finish before unloading the module
bryanv [Thu, 24 Apr 2014 05:04:54 +0000 (05:04 +0000)]
Wait for the callout to finish before unloading the module

MFC after: 3 days

10 years agoUpdate the date that was missed in r263259
bryanv [Thu, 24 Apr 2014 03:31:07 +0000 (03:31 +0000)]
Update the date that was missed in r263259

10 years agoFix panic by adding mtx_assert() to urtwn_init_locked() and
kevlo [Thu, 24 Apr 2014 03:16:47 +0000 (03:16 +0000)]
Fix panic by adding mtx_assert() to urtwn_init_locked() and
urtwn_stop_locked().

Tested by: Anthony Jenkins <scoobi_doo at yahoo dot com>

10 years agoAdd information about supported NCQ functionality to camcontrol identify.
smh [Thu, 24 Apr 2014 02:16:23 +0000 (02:16 +0000)]
Add information about supported NCQ functionality to camcontrol identify.

MFC after: 2 weeks

10 years agoInclude bsd.opts.mk before Makefile.inc so Makefile.inc can do things
imp [Thu, 24 Apr 2014 02:02:51 +0000 (02:02 +0000)]
Include bsd.opts.mk before Makefile.inc so Makefile.inc can do things
based on MK_xxx symbols. Continue to include bsd.own.mk after
Makefile.inc to preserve current behavior.

10 years agoHoist CR convenience function up from dhcpd config and use
imp [Thu, 24 Apr 2014 02:02:46 +0000 (02:02 +0000)]
Hoist CR convenience function up from dhcpd config and use
appropriately in nanobsd.sh. Also create CR0 for a errors allowed
version.

10 years agoSwitch to using pkgng for all package management. Add necessary
imp [Thu, 24 Apr 2014 02:02:37 +0000 (02:02 +0000)]
Switch to using pkgng for all package management. Add necessary
bootstrap step for pkg. Fix a bunch of annoying little nits. We can
now build fat or thin images successfully for the dhcpd config.

10 years agoAdd a routine for easy workaround any umount issues w/o hacking
imp [Thu, 24 Apr 2014 02:02:28 +0000 (02:02 +0000)]
Add a routine for easy workaround any umount issues w/o hacking
nanobsd.sh.

10 years agoIntroduce NANO_PKG_META_BASE to allow moving where metadata for
imp [Thu, 24 Apr 2014 02:02:20 +0000 (02:02 +0000)]
Introduce NANO_PKG_META_BASE to allow moving where metadata for
packages is stored.

Sponsored by: Netflix

10 years agoNo need for true here, remove it.
imp [Thu, 24 Apr 2014 02:02:11 +0000 (02:02 +0000)]
No need for true here, remove it.

Sponsored by: Netflix

10 years agoOverride the parallel make target to use all CPUs.
imp [Thu, 24 Apr 2014 02:02:06 +0000 (02:02 +0000)]
Override the parallel make target to use all CPUs.

10 years agoBegin fleshing out support for net80211 provided (legacy) sleep management.
adrian [Thu, 24 Apr 2014 01:39:53 +0000 (01:39 +0000)]
Begin fleshing out support for net80211 provided (legacy) sleep management.

This transitions the VAP in and out of SLEEP state based on:

* whether there's been an active transmission in the last (hardcoded) 500ms;
* whether the TIM from the AP indicates there is data available.

It uses the beacon reception to trigger the active traffic check.
This way there's no further timer running to wake up the CPU
from its own sleep states.

Right now the VAP isn't woken up for multicast traffic - mostly because
the only NIC I plan on doing this for right will auto wakeup and stay
awake for multicast traffic indicated in the TIM.  So I don't have
to manually keep the hardware awake.

This doesn't do anything if the NIC doesn't advertise it implements
the new SWSLEEP capability AND if the VAP doesn't have powersave
enabled.

It also doesn't do much with ath(4) as it doesn't currently implement
the SLEEP state.

Tested:

* AR5416, STA mode (with local ath(4) changes)

10 years agoAdd a capability to indicate that the net80211 stack should be doing
adrian [Thu, 24 Apr 2014 01:28:39 +0000 (01:28 +0000)]
Add a capability to indicate that the net80211 stack should be doing
RUN->SLEEP->RUN transitions for station mode sleep management.

10 years agoAdd some new ATA defines for SATA 3.1 spec
smh [Thu, 24 Apr 2014 01:28:14 +0000 (01:28 +0000)]
Add some new ATA defines for SATA 3.1 spec

10 years agoSilence compiler warning due to missing return in idmap_id_to_numeric_domain_rid
smh [Thu, 24 Apr 2014 01:20:43 +0000 (01:20 +0000)]
Silence compiler warning due to missing return in idmap_id_to_numeric_domain_rid

10 years agoEliminated optarg global being used outside of the function which called getopt
smh [Thu, 24 Apr 2014 01:12:52 +0000 (01:12 +0000)]
Eliminated optarg global being used outside of the function which called getopt

MFC after: 2 weeks

10 years agoAdd the ability to set a minimum ashift size for ZFS pool creation or root level
smh [Thu, 24 Apr 2014 01:06:03 +0000 (01:06 +0000)]
Add the ability to set a minimum ashift size for ZFS pool creation or root level
vdev addition.

Change max_auto_ashift sysctl to error when an invalid value is requested instead
of silently limiting it.

10 years agoExposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their
smh [Thu, 24 Apr 2014 00:41:02 +0000 (00:41 +0000)]
Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their
values can be viewed.

10 years agoAllow the guest to read the TSC via MSR 0x10.
grehan [Thu, 24 Apr 2014 00:27:34 +0000 (00:27 +0000)]
Allow the guest to read the TSC via MSR 0x10.
NetBSD/amd64 does this, as does Linux on AMD CPUs.

Reviewed by: neel
MFC after: 3 weeks

10 years agoRemove an unnecessary level of indirection for an argument.
rmacklem [Wed, 23 Apr 2014 23:13:46 +0000 (23:13 +0000)]
Remove an unnecessary level of indirection for an argument.
This simplifies the code and should avoid the clang sparc
port from generating an abort() call.

Requested by: rdivacky
Submitted by: jhb
MFC after: 2 weeks

10 years agoAllow frames to be transmitted in either RUN or SLEEP state
adrian [Wed, 23 Apr 2014 22:44:49 +0000 (22:44 +0000)]
Allow frames to be transmitted in either RUN or SLEEP state

Frames transmitted during SLEEP state should be queued in the
power save queue before waking the unit up.  Otherwise DHCP
requests and such will be dropped if the NIC is asleep - the
NIC will wake up but not transmit the frame.

10 years agoAllow the state of the interface to be "up" if the VAP is in SLEEP state.
adrian [Wed, 23 Apr 2014 22:43:39 +0000 (22:43 +0000)]
Allow the state of the interface to be "up" if the VAP is in SLEEP state.

Without this, the carrier will drop when the NIC transitions to SLEEP
and nothing will ever transmit.

10 years agoModify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
rmacklem [Wed, 23 Apr 2014 22:13:10 +0000 (22:13 +0000)]
Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
so that it only does the RPC for names that are answered by the RPC.
Doing the RPC for other names is harmless, but unnecessary.

MFC after: 2 weeks

10 years agoUpdate zfsboot to coincide with r264840 to bsdconfig(8) adding
dteske [Wed, 23 Apr 2014 22:06:43 +0000 (22:06 +0000)]
Update zfsboot to coincide with r264840 to bsdconfig(8) adding
GEOM support (thereby adding GEOM support to the disk selection
menu of bsdinstall(8)'s `zfsboot' module updated herein).

MFC after: 1 week
X-MFC-with: 264840

10 years agoImplement GEOM based media device classification. You'll notice a few
dteske [Wed, 23 Apr 2014 22:04:04 +0000 (22:04 +0000)]
Implement GEOM based media device classification. You'll notice a few
different things from this commit:
+ More devices. Devices that were previously ignored are now present.
+ Faster device scanning. "There is no try, only Do" -- f_device_try()
  is no longer the basis of device scanning as GEOM provides [nearly]
  all devices (doesn't provide network devices).
+ More information available as non-root. Usually you have to be root
  to do things like taste filesystems, and that limits the amount of
  information available to non-root users; with GEOM, we see all even
  running unprivileged as the brunt of information (except for so-
  called ``dangerously dedicated'' file systems) is represented by the
  `kern.geom.confxml' sysctl(8) MIB.
NB: Only really useful for external scripts that use the API and run as
    non-root; where this code is used in bsdconfig(8) and bsdinstall(8)
    you are running as root so can detect even ``dangerously dedicated''
    file systems that are not present in GEOM; e.g., no PART class for
    a DOS filesystem written directly to disk without partition table).
+ No more use of legacy tools such as diskinfo(8) to get disk capacity
  or fdisk(8) to see partitions.

MFC after: 1 week

10 years agoDon't free an mbuf twice. This only happens in very rare error
tuexen [Wed, 23 Apr 2014 21:20:55 +0000 (21:20 +0000)]
Don't free an mbuf twice. This only happens in very rare error
cases where the peer sends illegal sequencing information in
DATA chunks for an existing association.

MFC after: 3 days.

10 years ago- Format the usage so that it fits in 80 cols and follows the standard
jhb [Wed, 23 Apr 2014 20:55:07 +0000 (20:55 +0000)]
- Format the usage so that it fits in 80 cols and follows the standard
  convention for long usage lines in manpages.
- Sort the option string passed to getopts and the case statements for
  the option returned by getopts.
- Add a -C option to specify the device to be used for the console
  (defaults to 'stdio')  (This could be let vmrun be run in the background
  by using /dev/nmdm0B or the like)
- Add a -H option to specify a host path to pass to bhyveload(8) via
  -h to back the host0: filesystem in bhyveload(8) (useful for loading
  kernels from the host into the guest without having to copy them into
  the guest's disk image first)

Reviewed by: neel
MFC after: 2 weeks

10 years agoMFV r264830:
delphij [Wed, 23 Apr 2014 20:32:39 +0000 (20:32 +0000)]
MFV r264830:

4745 fix AVL code misspellings

MFC after: 2 weeks

10 years agoMFV r264829:
delphij [Wed, 23 Apr 2014 20:29:46 +0000 (20:29 +0000)]
MFV r264829:

3897 zfs filesystem and snapshot limits

MFC after: 2 weeks

10 years agoDisable UNMAP support for STEC 842 SSDs.
mav [Wed, 23 Apr 2014 19:50:35 +0000 (19:50 +0000)]
Disable UNMAP support for STEC 842 SSDs.

In some unknown cases UNMAP commands make device firmware stuck.

MFC after: 2 weeks

10 years ago- Sprinkle const and static as appropriate.
marius [Wed, 23 Apr 2014 19:32:50 +0000 (19:32 +0000)]
- Sprinkle const and static as appropriate.
- Convert the remainder of snd_hda(4) to take advantage of nitems().
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after: 3 days

10 years agoAdd quirk to configure headphones redirection on Intel DH87RL boards.
marius [Wed, 23 Apr 2014 19:25:59 +0000 (19:25 +0000)]
Add quirk to configure headphones redirection on Intel DH87RL boards.

MFC after: 3 days

10 years agoAdd patches corresponding to r264826 and r264827
emaste [Wed, 23 Apr 2014 18:36:32 +0000 (18:36 +0000)]
Add patches corresponding to r264826 and r264827

10 years agoMerge Clang r202185:
emaste [Wed, 23 Apr 2014 18:26:12 +0000 (18:26 +0000)]
Merge Clang r202185:

  Debug info: Generate debug info for variadic functions.
  Paired commit with LLVM.

  rdar://problem/13690847

This merege includes changes to use the Clang 3.4 API (revisions
199686 and 200082) in lib/CodeGen/CGDebugInfo.cpp:

getParamType  -> getArgType
getNumParams  -> getNumArgs
getReturnType -> getResultType

Sponsored by: DARPA, AFRL

10 years agoMerge LLVM r202188:
emaste [Wed, 23 Apr 2014 18:25:11 +0000 (18:25 +0000)]
Merge LLVM r202188:

  Debug info: Support variadic functions.
  Variadic functions have an unspecified parameter tag after the last
  argument. In IR this is represented as an unspecified parameter in the
  subroutine type.

  Paired commit with CFE r202185.

  rdar://problem/13690847

  This re-applies r202184 + a bugfix in DwarfDebug's argument handling.

This merge includes a change to use the LLVM 3.4 API in
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:

DwarfUnit -> CompileUnit

Sponsored by:       DARPA, AFRL

10 years agoChange the vlapic timer frequency to be in the ballpark of contemporary
neel [Wed, 23 Apr 2014 16:50:40 +0000 (16:50 +0000)]
Change the vlapic timer frequency to be in the ballpark of contemporary
hardware. This also decouples the vlapic emulation from the host's TSC
frequency.

Requested by: grehan@

10 years agoMake usage printing more consistent with other tools.
ed [Wed, 23 Apr 2014 14:05:28 +0000 (14:05 +0000)]
Make usage printing more consistent with other tools.

- Introduce a separate usage() function.
- Don't use argv[0]. Directly name the application, as we do elsewhere.
- Don't prepend the application name.
- Don't print two newlines.

10 years agoAllow .WAIT to appear in SUBDIR= lists, to provide some control over
ian [Wed, 23 Apr 2014 12:52:11 +0000 (12:52 +0000)]
Allow .WAIT to appear in SUBDIR= lists, to provide some control over
parallel build order.  All subdirs before a .WAIT will be built before
any subdirs after it.

Reviewed by: imp@

10 years agoUpdate to byacc 20140409
bapt [Wed, 23 Apr 2014 05:57:45 +0000 (05:57 +0000)]
Update to byacc 20140409
Among all the modifications, this new byacc also solves a 14 year old bug [1]

PR: bin/23254 [1]
Submitted by: marka@nominum.com [1]
MFC after: 3 weeks

10 years agoOops, revert r264801.
kevlo [Wed, 23 Apr 2014 05:54:55 +0000 (05:54 +0000)]
Oops, revert r264801.

10 years agoAdd a missing break.
kevlo [Wed, 23 Apr 2014 05:53:03 +0000 (05:53 +0000)]
Add a missing break.

10 years ago- Get transmit loop more in line with the other serial drivers.
hselasky [Wed, 23 Apr 2014 05:50:55 +0000 (05:50 +0000)]
- Get transmit loop more in line with the other serial drivers.
- Add a comment about FTDI and ZLPs.
- Correctly check odditiy of baud rate divisor.
- Correct IOCTL handling for "error" and "event" char.

MFC after: 1 weeks

10 years agoWrap the rate control re-init code in a lock, to serialise it with
adrian [Wed, 23 Apr 2014 05:19:45 +0000 (05:19 +0000)]
Wrap the rate control re-init code in a lock, to serialise it with
concurrent updates from any completing transmits in other threads.

This was exposed when doing power save work - net80211 is constantly
doing reassociations and it's causing the rate control state to get
blanked out.  This could cause the rate control code to assert.

This should be MFCed to stable/10 as it's a stability fix.

Tested:

* AR5416, STA

MFC after: 7 days

10 years agoFix grammar error and trailing newline.
bdrewery [Wed, 23 Apr 2014 02:21:17 +0000 (02:21 +0000)]
Fix grammar error and trailing newline.

Submitted by: danfe
MFC after: 3 days

10 years agoMove xdev knobs from release/arm/release.sh and into an
gjb [Wed, 23 Apr 2014 02:01:22 +0000 (02:01 +0000)]
Move xdev knobs from release/arm/release.sh and into an
XDEV_FLAGS variable in ${KERNCONF}.conf file.

MFC after: 3 days
X-MFC-Note: fix stable/10 XDEV_FLAGS local for branch
Sponsored by: The FreeBSD Foundation

10 years agoPlay musical-KNOBS a bit more with release/arm/release.sh.
gjb [Wed, 23 Apr 2014 01:47:07 +0000 (01:47 +0000)]
Play musical-KNOBS a bit more with release/arm/release.sh.

For stable/10, r264703 sets the correct WITH/WITHOUT
knobs to get xdev built with the arm-freebsd-gcc binary
installed.  Unfortunately, the same fix does not work on
head/.

Also, quite to my amazement, WITH_GCC=1 and WITH_GNUCXX=1
causes xdev to fail spectactularly at least on r264791.

The situation as it stands is:

 - gcc(1) is needed for the u-boot build.
 - cc(1) *cannot* be clang(1)

To shoe-horn the toolchain to make 'xdev' give what is
needed, remove WITH_GNUCXX=1 and add WITH_GCC_BOOTSTRAP=1.

MFC After: 1 week
X-MFC-To: stable/10 only
X-MFC-Note: after stable/10 is broken in this way...
Sponsored by: The FreeBSD Foundation

10 years agoImport byacc 20140409
bapt [Tue, 22 Apr 2014 22:11:22 +0000 (22:11 +0000)]
Import byacc 20140409

10 years agoImport libucl 0.4.0
bapt [Tue, 22 Apr 2014 22:02:06 +0000 (22:02 +0000)]
Import libucl 0.4.0
Adapt pkg(7) to the new libucl API

10 years agoSimplify reading pw.conf(5) by using getline(3)
bapt [Tue, 22 Apr 2014 21:07:56 +0000 (21:07 +0000)]
Simplify reading pw.conf(5) by using getline(3)

10 years agoFix installworld failure when kerberos source files have new timestamps
emaste [Tue, 22 Apr 2014 20:37:07 +0000 (20:37 +0000)]
Fix installworld failure when kerberos source files have new timestamps

If a kerberos .hx source file is newer than the .h copy, but the content
is the same, then during buildworld the "cmp -s || cp" command in the
.hx.h rule would do nothing, leaving the .h copy with the older
timestamp.  During installworld the rule would again be invoked, causing
a failure as neither cmp or cp would exist in the temporary path.

As the underlying issue should be resolved by r262209, unconditionally
copy the file.

No objection: peter@
Tested by: gjb@
Sponsored by: The FreeBSD Foundation

10 years agoCheck that port is started when MAC filter is set
gnn [Tue, 22 Apr 2014 20:19:09 +0000 (20:19 +0000)]
Check that port is started when MAC filter is set

The MAC filter set may be called without softc_lock held in the case of
SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING
flag which implies port started, but it is not guaranteed to remain.
softc_lock shared lock can't be held in the case of these ioctls processing,
since it results in failure where kernel complains that non-sleepable
lock is held in sleeping thread.

Both problems are repeatable on LAG with LACP proto bring up.

Submitted by:   Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

MFC after: 2 weeks

10 years agoUse calloc() in favor of malloc + memset.
delphij [Tue, 22 Apr 2014 18:55:21 +0000 (18:55 +0000)]
Use calloc() in favor of malloc + memset.

Reviewed by: neel

10 years agoKeep geom_uncompress(4) in line with geom_uzip(4), bring in the r264504 fix.
loos [Tue, 22 Apr 2014 18:08:34 +0000 (18:08 +0000)]
Keep geom_uncompress(4) in line with geom_uzip(4), bring in the r264504 fix.

Make sure not to start I/O bigger than MAXPHYS bytes.

Quoting r264504:

When we detect the condition, we'll reduce the block count and perform
a "short" read.  In g_uncompress_done() we need to consider the original
I/O length and stop early if we're about to deflate a block that we didn't
read.  By using bio_completed in the cloned BIO and not bio_length to
check for this, we automatically and gracefully handle short reads that
our providers may be doing on top of the short reads we may initiate
ourselves.

Reviewed by: marcel

10 years agoFactor out common ioport handler code for better hygiene -- pointed
tychon [Tue, 22 Apr 2014 16:13:56 +0000 (16:13 +0000)]
Factor out common ioport handler code for better hygiene -- pointed
out by neel@.

Approved by: neel (co-mentor)

10 years ago- Fix an off by one error when checking for the stop event. This resulted
jhb [Tue, 22 Apr 2014 15:17:32 +0000 (15:17 +0000)]
- Fix an off by one error when checking for the stop event.  This resulted
  in not showing the most recent event by default.
- When the stop even is hit, break out of the outer loop to stop fetching
  more events.

MFC after: 1 week

10 years agoDon't claim the adapter is idle if it is clearing a drive.
jhb [Tue, 22 Apr 2014 15:15:54 +0000 (15:15 +0000)]
Don't claim the adapter is idle if it is clearing a drive.

MFC after: 1 week

10 years agoFixes mkdir for the NFSv2 client that was broken by r264705.
rmacklem [Tue, 22 Apr 2014 04:42:46 +0000 (04:42 +0000)]
Fixes mkdir for the NFSv2 client that was broken by r264705.

Reported by: bdrewery
MFC after: 2 weeks

10 years agoVarious style(9) fixes and typos in grep, sort and patch.
pfg [Mon, 21 Apr 2014 22:52:18 +0000 (22:52 +0000)]
Various style(9) fixes and typos in grep, sort and patch.

MFC after: 3 days

10 years agoAdd parameterized position handling to printf(1).
pfg [Mon, 21 Apr 2014 22:47:18 +0000 (22:47 +0000)]
Add parameterized position handling to printf(1).

Add a new %n$ option to change the order of the parameters as
done in the ksh93 builtin printf (among others).

For example:
%printf '%2$1d %1$s\n' one 2 three 4
2 one
4 three

The feature was written by Garret D'Amore under a
BSD license for Nexenta/illumos.

Reference:
http://garrett.damore.org/2010/10/new-implementation-of-printf.html

PR: bin/152934
Obtained from: Illumos
MFC after: 2 weeks

10 years agoPrevent building tests when bootstrapping make.
jmmv [Mon, 21 Apr 2014 22:36:31 +0000 (22:36 +0000)]
Prevent building tests when bootstrapping make.

Should fix the breakage reported by tinderbox when WITHOUT_BMAKE is set,
which was probably introduced in r263346..

10 years agoAdd placeholder Kyuafiles for various top-level hierarchies.
jmmv [Mon, 21 Apr 2014 21:39:25 +0000 (21:39 +0000)]
Add placeholder Kyuafiles for various top-level hierarchies.

This change adds tests/ directories in the source tree to create various
subdirectories in /usr/tests/ and to install placeholder Kyuafiles for
them.

the relevant hierarchies are: cddl, etc, games, gnu and secure.

The reason for this is to simplify the addition of new test programs for
utilities or libraries under any of these directories.  Doing so on a
case by case basis is unnecessary and is quite an obscure process.

10 years agoUse case insensitive match in portsnap.
delphij [Mon, 21 Apr 2014 19:33:27 +0000 (19:33 +0000)]
Use case insensitive match in portsnap.

PR: bin/186510
Submitted by: olli
MFC after: 2 weeks

10 years agoAdd {} braces so that the code conforms to the indentation.
rmacklem [Mon, 21 Apr 2014 19:17:19 +0000 (19:17 +0000)]
Add {} braces so that the code conforms to the indentation.
Fortunately, I don't think doing the assignment of cap->tsomax
unconditionally causes any problem.

Reviewed by: glebius
MFC after: 2 weeks

10 years agoFor an NFSv4 mount with the "nocto" option, don't get the
rmacklem [Mon, 21 Apr 2014 19:10:23 +0000 (19:10 +0000)]
For an NFSv4 mount with the "nocto" option, don't get the
up to date file attributes upon close. This reduces the
Getattr RPC count by about 65% for software builds.

MFC after: 2 weeks

10 years agolibc/stdio: Fail fdopen() on an execute-only fd.
jilles [Mon, 21 Apr 2014 17:40:23 +0000 (17:40 +0000)]
libc/stdio: Fail fdopen() on an execute-only fd.

An execute-only fd (opened with O_EXEC) allows neither read() nor write()
and is therefore incompatible with all stdio modes. Therefore, the [EINVAL]
error applies.

Also adjust the similar check in freopen() with a NULL path, even though
this checks an fd which is already from a FILE.

10 years agourndis(4) will first appear in 9.3-RELEASE.
gjb [Mon, 21 Apr 2014 16:35:19 +0000 (16:35 +0000)]
urndis(4) will first appear in 9.3-RELEASE.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agolibc: Add fopen() test to regression Makefile.
jilles [Mon, 21 Apr 2014 12:39:35 +0000 (12:39 +0000)]
libc: Add fopen() test to regression Makefile.

10 years agoRename the fp{get,set}* files so they no longer conflict with the softfloat
andrew [Mon, 21 Apr 2014 09:43:22 +0000 (09:43 +0000)]
Rename the fp{get,set}* files so they no longer conflict with the softfloat
version of these files. Keep them within this directory so they can be used
to implement the armv6 version of these functions.

10 years agoRewrite the cleanup code to, well, actually work right.
adrian [Mon, 21 Apr 2014 06:07:08 +0000 (06:07 +0000)]
Rewrite the cleanup code to, well, actually work right.

The existing cleanup code was based on the Atheros reference driver
from way back and stuff that was in Linux ath9k.  It turned out to be ..
rather silly.

Specifically:

* The whole method of determining whether there's hardware-queued frames
  was fragile and the BAW would never quite work right afterwards.

* The cleanup path wouldn't correctly pull apart aggregate frames in the
  queue, so frames would not be freed and the BAW wouldn't be correctly
  updated.

So to implement this:

* Pull the aggregate frames apart correctly and handle each separately;
* Make the atid->incomp counter just track the number of hardware queued
  frames rather than try to figure it out from the BAW;
* Modify the aggregate completion path to handle it as a single frame
  (atid->incomp tracks the one frame now, not the subframes) and
  remove the frames from the BAW before completing them as normal frames;
* Make sure bf->bf_next is NULled out correctly;
* Make both aggregate session and non-aggregate path frames now be
  handled via the incompletion path.

TODO:

* kill atid->incomp; the driver tracks the hardware queued frames
  for each TID and so we can just use that.

This is a stability fix that should be merged back to stable/10.

Tested:

* AR5416, STA

MFC after: 7 days

10 years ago* Modify the debugging output from pause/resume to note the TID and STA
adrian [Mon, 21 Apr 2014 02:09:14 +0000 (02:09 +0000)]
* Modify the debugging output from pause/resume to note the TID and STA
  MAC
* Now that the paused < 0 bugs have been identified, make the DPRINTF()
  a device_printf() again.  Anything else that shows up here needs to be
  fixed immediately.

Tested:

* AR5416, STA mode

MFC after: 7 days

10 years agoMake sure bf_next is NULL'ed out when we're completing up an aggregate
adrian [Mon, 21 Apr 2014 02:05:51 +0000 (02:05 +0000)]
Make sure bf_next is NULL'ed out when we're completing up an aggregate
frame through the cleanup path.

Whilst here, fix the indenting for something I messed up.

Tested:

* AR5416, STA mode

10 years agobsd-family-tree: Add missing releases
eadler [Mon, 21 Apr 2014 02:04:37 +0000 (02:04 +0000)]
bsd-family-tree: Add missing releases

- NetBSD 6.0.4
- DragonFly 3.6.2

10 years agoFix a cleanup hang if cleanup gets called _during_ an active cleanup.
adrian [Mon, 21 Apr 2014 01:02:49 +0000 (01:02 +0000)]
Fix a cleanup hang if cleanup gets called _during_ an active cleanup.

During power save testing I noticed that the cleanup code is being
called during a RUN->RUN state transition.  It's because the net80211
stack is treating that (for reasons I don't quitey know yet) as a
reassociation and this calls the node cleanup code.  The reason it's
seeing a RUN->RUN transition is because during active power save
stuff it's possible that the RUN->SLEEP and SLEEP->RUN transitions
happen so quickly that the deferred net80211 vap state code
"loses" a transition, namely the intermediary SLEEP transition.

So, this was causing the node reassociation code to sometimes be called
twice in quick succession and this would result in ath_tx_tid_cleanup()
to be called again.  The code calling it would always call pause, and
then only call resume if the TID didn't have "cleanup_inprogress" set.
Unfortunately it didn't check if it was already set on entry, so it
would pause but not call resume.  Thus, paused would be called more
than once (once before each entry into ath-tx_tid_cleanup()) but resume
would only be called once when the cleanup state was finished.

This doesn't entirely fix all of the issues seen in the cleanup path
but it's a necessary first step.

Since this is a stability fix, it should be merged to stable/10 at some
point.

Tested:

* AR5416, STA mode

MFC after: 7 days

10 years agoModify the NFSv4 client create/mkdir RPC so that it acquires
rmacklem [Sun, 20 Apr 2014 22:19:00 +0000 (22:19 +0000)]
Modify the NFSv4 client create/mkdir RPC so that it acquires
post-create/mkdir directory attributes. This allows the RPC to
name cache the newly created directory and reduces the lookup RPC
count for applications creating a lot of directories.

MFC after: 2 weeks

10 years agoAdd consistency checks to ensure that fragments of a user message
tuexen [Sun, 20 Apr 2014 21:11:39 +0000 (21:11 +0000)]
Add consistency checks to ensure that fragments of a user message
have the same U-bit.

MFC after: 3 days

10 years agoApply a slightly different color hammer to arm/release.sh:
gjb [Sun, 20 Apr 2014 20:46:06 +0000 (20:46 +0000)]
Apply a slightly different color hammer to arm/release.sh:

 - gcc(1) fails to build usr.bin/dtc
 - lack of WITH_GNUCXX=1 causes cc1plus(1) calls to fail
 - u-boot fails to build with clang (hard-coded gcc(1) calls)

Implement the proper incantation of WITH_/WITHOUT_ knobs
to get arm snapshot builds working again.

Since the cc(1) binary is no longer expected to be clang(1),
remove the chroot(8) post-install cc(1) overwrite.

MFC After: 3 days
X-MFC-With: r264518,r264697,r264698
Tested on: stable/10@r264677 RPI-B
Sponsored by: The FreeBSD Foundation

10 years agoRemove uncessary cache and TLB maintenance ops.
ian [Sun, 20 Apr 2014 18:21:05 +0000 (18:21 +0000)]
Remove uncessary cache and TLB maintenance ops.

 - These were needed on armv4/5 (VIVT cache), not needed on armv6.
 - The wbinv_all call can't be used on SMP systems; cache operations by
   set/way are not broadcast to other cores.
 - The TLB maintenance operations needed for pmap_growkernel() happen in
   pmap_grow_l2_bucket(), so there's no need to flush all TLB entries at
   the end.
 - There may not be any need for the TLB flush at the beginning of
   pmap_release(), but it's left in for now pending more investigation.

Pointed out by:    Svatopluk Kraus <onwahe@gmail.com>
Discussed with:    cognet@

10 years agoSend also a packet containing an ABORT chunk in response to an OOTB packet
tuexen [Sun, 20 Apr 2014 18:15:23 +0000 (18:15 +0000)]
Send also a packet containing an ABORT chunk in response to an OOTB packet
containing a COOKIE-ECHO chunk.

MFC after: 3 days

10 years agoFix EOL escape.
gjb [Sun, 20 Apr 2014 16:34:10 +0000 (16:34 +0000)]
Fix EOL escape.

MFC after: 3 days
X-MFC-With: r264697
Sponsored by: The FreeBSD Foundation

10 years agoWhen building the 'xdev' target when WITH_GCC=1 and
gjb [Sun, 20 Apr 2014 16:33:28 +0000 (16:33 +0000)]
When building the 'xdev' target when WITH_GCC=1 and
WITHOUT_CLANG_IS_CC=1, it appears WITHOUT_CLANG=1 must
also be set.

While here, reorder the lines to put the WITH_* and
WITHOUT_* entries on the same line.

MFC After: 3 days
X-MFC-With: r264518
Tested on: stable/10@r264677
Sponsored by: The FreeBSD Foundation

10 years agoAdd the deprecated fp{get,set}* functions, a few ports use them.
andrew [Sun, 20 Apr 2014 14:58:14 +0000 (14:58 +0000)]
Add the deprecated fp{get,set}* functions, a few ports use them.

10 years agoFix a comment typo; conversion tables are for leap years, not leap seconds.
ian [Sun, 20 Apr 2014 13:37:22 +0000 (13:37 +0000)]
Fix a comment typo; conversion tables are for leap years, not leap seconds.

10 years agoApply upstream patch for EC calculation bug and bump version addendum.
des [Sun, 20 Apr 2014 11:34:33 +0000 (11:34 +0000)]
Apply upstream patch for EC calculation bug and bump version addendum.

10 years agoBackport from projects/pf r263908:
mm [Sun, 20 Apr 2014 09:17:48 +0000 (09:17 +0000)]
Backport from projects/pf r263908:

De-virtualize UMA zone pf_mtag_z and move to global initialization part.

The m_tag struct does not know about vnet context and the pf_mtag_free()
callback is called unaware of current vnet. This causes a panic.

MFC after: 1 week