]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoConvert NO_MANCOMPRESS to normal convention.
imp [Sun, 13 Apr 2014 05:22:26 +0000 (05:22 +0000)]
Convert NO_MANCOMPRESS to normal convention.

10 years agoIn tree makefile shouldn't be setting policy piecemeal. Don't set
imp [Sun, 13 Apr 2014 05:22:22 +0000 (05:22 +0000)]
In tree makefile shouldn't be setting policy piecemeal. Don't set
NO_MANCOMPRESS here.

10 years agoNO_MAN= has been deprecated in favor of MAN= for some time, go ahead
imp [Sun, 13 Apr 2014 05:21:56 +0000 (05:21 +0000)]
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.

10 years agoDon't apply ctf conversions in POSIX mode. These can't happen there
imp [Sun, 13 Apr 2014 05:21:48 +0000 (05:21 +0000)]
Don't apply ctf conversions in POSIX mode. These can't happen there
because they pollute the POSIX environment, which doens't allow
for these extentions. ctf conversions are really only relevant when
used in coordination with the rest of the bsd*.mk system anyway.
Leave them in place for the normal, non-posix enviornment since
they are quite useful there.

10 years agoCheck the right file for pwcache_groupdb.
imp [Sun, 13 Apr 2014 05:21:43 +0000 (05:21 +0000)]
Check the right file for pwcache_groupdb.

10 years agoWe no longer support upgrading from FreeBSD 4, so we don't need the
imp [Sun, 13 Apr 2014 05:21:35 +0000 (05:21 +0000)]
We no longer support upgrading from FreeBSD 4, so we don't need the
NOMAN and NOSHARED defines here. They have been obsolete for almost a
decade anyway.

10 years agoUp the minimum system to build FreeBSD current to 8.0-RELEASE. The
imp [Sun, 13 Apr 2014 05:21:30 +0000 (05:21 +0000)]
Up the minimum system to build FreeBSD current to 8.0-RELEASE. The
issues with vendors that needed 7.x support have been resolved. Many
vendors are still using 8.x build platforms, however, so bumping this
up to 9.0 will have to wait until that is resolved. Actual support for
building from 8.x still relies on those vendors fixing bugs that are
present as most developers have moved onto 9.x or newer platforms.

Reviewed by: marcel@

10 years agoDetermine whether to build clang and its bootstrap tools the same
imp [Sun, 13 Apr 2014 05:21:22 +0000 (05:21 +0000)]
Determine whether to build clang and its bootstrap tools the same
way. This allows a clang bootstrap to happen, even when WITHOUT_CLANG
is defined. This is a minimal version of a more extensive change which
can be MFC'd more easily. However, we have to also test to see if
we're building clang as not cc, since the bootstrap for that needs
these cross tools and it is easier to build them in just one place.

MFC after: 1 week

10 years agoClean trailing whitespace.
gjb [Sun, 13 Apr 2014 02:03:14 +0000 (02:03 +0000)]
Clean trailing whitespace.
Add missing .El to fix formatting.

Found with: mandoc(1)
Sponsored by: The FreeBSD Foundation

10 years agoBump Dd, missed as part of r264098 and related commits.
gjb [Sun, 13 Apr 2014 01:47:15 +0000 (01:47 +0000)]
Bump Dd, missed as part of r264098 and related commits.

Sponsored by: The FreeBSD Foundation

10 years agoFix a panic in zfs_rename().
davide [Sun, 13 Apr 2014 01:15:37 +0000 (01:15 +0000)]
Fix a panic in zfs_rename().
this is due to a wrong dereference of a vnode when it's not locked and
can be (potentially) recycled. 'sdvp' cannot be locked on zfs_rename()
entry point because the VFS can't be sure that this scenario is
LOR-free (it might violate the parent->child lock acquisition rule).
Dereference 'tdvp' instead, which is already locked on entry, and access
'sdvp' fields only when it's safe, i.e. under ZFS_ENTER scope.

While at it, remove the usage of VOP_REALVP, as long as this is a NOP
on FreeBSD.

Discussed with: avg
Reviewed by: pjd

10 years agoAdd a simple EFI stub loader. This is a quick and dirty of boot1.chrp from
nwhitehorn [Sun, 13 Apr 2014 01:14:25 +0000 (01:14 +0000)]
Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp from
the PowerPC port with all the Open Firmware bits removed and replaced by
their EFI counterparts. On the whole, I think I prefer Open Firmware.

This code is supposed to be an immutable shim that sits on the EFI system
partition, loads /boot/loader.efi from UFS and tells the real loader what
disk/partition to look at. It finds the UFS root partition by the somewhat
braindead approach of picking the first UFS partition it can find. Better
approaches are called for, but this works for now. This shim loader will
also be useful for secure boot in the future, which will require some
rearchitecture.

10 years agoFix the style of ata_interrupt_locked().
rpaulo [Sat, 12 Apr 2014 23:40:54 +0000 (23:40 +0000)]
Fix the style of ata_interrupt_locked().

10 years agoHide internal details of sbintime_t implementation wrapping INT64_MAX into
davide [Sat, 12 Apr 2014 23:29:29 +0000 (23:29 +0000)]
Hide internal details of sbintime_t implementation wrapping INT64_MAX into
SBT_MAX, to make it more robust in case internal type representation will
change in the future. All the consumers were migrated to SBT_MAX and
every new consumer (if any) should from now use this interface.

Requested by: bapt, jmg, Ryan Lortie (implictly)
Reviewed by: mav, bde

10 years agofind: Correctly propagate -exec/-execdir ... {} + exit status.
jilles [Sat, 12 Apr 2014 22:36:26 +0000 (22:36 +0000)]
find: Correctly propagate -exec/-execdir ... {} + exit status.

As per POSIX, the -exec ... {} + primary always returns true, but a non-zero
exit status causes find to return a non-zero exit status itself. GNU does
the same, and also for -execdir ... {} +.

It does not make much sense to return false from the primary only when the
child process happens to be run.

The behaviour for -exec/-execdir ... ; remains unchanged: the primary
returns true or false depending on the exit status, and find's exit status
is unaffected.

10 years agoImprove markup and remove contractions.
brueffer [Sat, 12 Apr 2014 22:05:03 +0000 (22:05 +0000)]
Improve markup and remove contractions.

MFC after: 1 week

10 years agoUse proper MFSNAMELEN for fs type.
bdrewery [Sat, 12 Apr 2014 21:39:17 +0000 (21:39 +0000)]
Use proper MFSNAMELEN for fs type.

MFC after: 2 weeks
Reviewed by: rodrigc
Also spotted by:ambrisko

10 years agomdoc and language improvements.
brueffer [Sat, 12 Apr 2014 21:04:53 +0000 (21:04 +0000)]
mdoc and language improvements.

MFC after: 1 week

10 years agoAlign and round the partitionable disk space to 4K by default.
marcel [Sat, 12 Apr 2014 20:28:39 +0000 (20:28 +0000)]
Align and round the partitionable disk space to 4K by default.
Since this would also apply when recovering, make sure not to
align or round when that would have a partition fall outside
the partitionable area.

10 years agoRemove the names of the build host and user and the build date. This
des [Sat, 12 Apr 2014 18:01:25 +0000 (18:01 +0000)]
Remove the names of the build host and user and the build date.  This
still leaves the host OS and version, but these are harder to remove.

MFC after: 3 weeks

10 years agoIntroduce RANLIBFLAGS to mirror ARFLAGS and add -D to both. This sets
des [Sat, 12 Apr 2014 12:44:09 +0000 (12:44 +0000)]
Introduce RANLIBFLAGS to mirror ARFLAGS and add -D to both.  This sets
all timestamps in static libraries to 0 so that consecutive builds
from the same source, even on different machines, produce identical
libraries.

MFC after: 3 weeks

10 years agoProperly release the in6_multi lock.
ae [Sat, 12 Apr 2014 02:05:31 +0000 (02:05 +0000)]
Properly release the in6_multi lock.

MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoUpdate the SDT(9) examples to reflect the removal of the sname parameter
markj [Fri, 11 Apr 2014 22:45:12 +0000 (22:45 +0000)]
Update the SDT(9) examples to reflect the removal of the sname parameter
in r258622.

MFC after: 3 days

10 years agoRemove stray .Nm macro.
brueffer [Fri, 11 Apr 2014 22:34:00 +0000 (22:34 +0000)]
Remove stray .Nm macro.

MFC after: 3 days

10 years agoMFV r258194-264360: nc(1) from OpenBSD 5.5.
delphij [Fri, 11 Apr 2014 22:12:31 +0000 (22:12 +0000)]
MFV r258194-264360: nc(1) from OpenBSD 5.5.

MFC after: 2 weeks

10 years agoSome whitespace and style fixes.
jhb [Fri, 11 Apr 2014 21:00:59 +0000 (21:00 +0000)]
Some whitespace and style fixes.

Submitted by: bde

10 years agoRemove unused val argument value from SYSCTL_INT() calls.
mav [Fri, 11 Apr 2014 20:44:09 +0000 (20:44 +0000)]
Remove unused val argument value from SYSCTL_INT() calls.

10 years agoFix insta-panic on assert of unlocked periph mtx in ciss(4) when
sbruno [Fri, 11 Apr 2014 20:19:01 +0000 (20:19 +0000)]
Fix insta-panic on assert of unlocked periph mtx in ciss(4) when
logical volume state changes.

Currently, I view this as a critical fix for users and will MFC this rapidly as
my testing has shown data loss when the disk is failed by removing it when
under some amount of write activity and this code panics the box.

Reviewed by: mav@ scottl@
MFC after: 3 days
Sponsored by: Yahoo! Inc.

10 years agoThere is no need to save and restore the host's return address in the
neel [Fri, 11 Apr 2014 20:15:53 +0000 (20:15 +0000)]
There is no need to save and restore the host's return address in the
'struct vmxctx'. It is preserved on the host stack across a guest entry
and exit and just restoring the host's '%rsp' is sufficient.

Pointed out by: grehan@

10 years agoThe tw_pcbrele() function does not need the global timewait lock.
jhb [Fri, 11 Apr 2014 19:17:45 +0000 (19:17 +0000)]
The tw_pcbrele() function does not need the global timewait lock.

Submitted by: Julien Charbon
Suggested by: glebius

10 years agoUpdate the llvm/clang patch for r264345.
dim [Fri, 11 Apr 2014 18:40:29 +0000 (18:40 +0000)]
Update the llvm/clang patch for r264345.

10 years agomdoc and spelling cleanup.
brueffer [Fri, 11 Apr 2014 18:37:24 +0000 (18:37 +0000)]
mdoc and spelling cleanup.

MFC after: 3 days

10 years agoImprove use of socket buffer upcalls.
mav [Fri, 11 Apr 2014 18:26:08 +0000 (18:26 +0000)]
Improve use of socket buffer upcalls.

Use soreadable()/sowriteable() in socket upcalls to avoid extra wakeups
until we have enough data to read or space to write.

Increase partial receive len from 1K to 128K to not wake up on every
received packet.

This significantly reduces locks congestion and CPU usage and improves
throughput for large I/Os on NICs without TSO and LRO.

Reviewed by: trasz
Sponsored by: iXsystems, Inc.

10 years agoAccount for the "plus 1" encoding of the CPUID Function 4 reported
tychon [Fri, 11 Apr 2014 18:19:21 +0000 (18:19 +0000)]
Account for the "plus 1" encoding of the CPUID Function 4 reported
core per package and cache sharing values.

Approved by: grehan (co-mentor)

10 years agoBefore calling mmap() on a shared library's text and data sections, rtld
alc [Fri, 11 Apr 2014 16:55:25 +0000 (16:55 +0000)]
Before calling mmap() on a shared library's text and data sections, rtld
first calls mmap() with the arguments PROT_NONE and MAP_ANON to reserve a
single, contiguous range of virtual addresses for the entire shared library.
Later, rtld calls mmap() with the the shared library's file descriptor
and the argument MAP_FIXED to place the text and data sections within the
reserved range.  The rationale for mapping shared libraries in this way is
explained in the commit message for Revision 190885.  However, this approach
does have an unintended, negative consequence.  Since the first call to
mmap() specifies MAP_ANON and not the shared library's file descriptor, the
kernel has no idea what alignment the vm object backing the file prefers.
As a result, the reserved range's alignment is unlikely to be the same as
the vm object's, and so mapping with superpages becomes impossible.  To
address this problem, this revision adds the argument MAP_ALIGNED_SUPER to
the first call to mmap() if the text section is larger than the smallest
superpage size.

To determine if the text section is larger than the smallest superpage
size, rtld must always fetch the page size information.  As a result, the
private code for fetching the base page size in rtld's builtin malloc is
redundant.  Eliminate it.  Requested by: kib

Tested by: zbb (on arm)
Reviewed by: kib (an earlier version)
Discussed with: jhb

10 years agoAmend r263891, by making clang default to DWARF2 debug info format for
dim [Fri, 11 Apr 2014 16:51:35 +0000 (16:51 +0000)]
Amend r263891, by making clang default to DWARF2 debug info format for
all FreeBSD versions, not just 10.x and earlier.  Apparently too many
people seem to have trouble with post-1993 formats.

Also remove the related notes about messing with kernel configuration
files from UPDATING, which are now superfluous.

Requested by: many
MFC after: 3 days

10 years agoTune buffer sizes for SuperSpeed USB when using LibUSB v0.1 and v1.0
hselasky [Fri, 11 Apr 2014 14:11:55 +0000 (14:11 +0000)]
Tune buffer sizes for SuperSpeed USB when using LibUSB v0.1 and v1.0
APIs to increase the maximum bandwidth limit.

MFC after: 1 week

10 years agoAdd SRC_UPDATE_SKIP, DOC_UPDATE_SKIP, and PORTS_UPDATE_SKIP
gjb [Fri, 11 Apr 2014 13:48:45 +0000 (13:48 +0000)]
Add SRC_UPDATE_SKIP, DOC_UPDATE_SKIP, and PORTS_UPDATE_SKIP
variables.  These are intended to allow bypassing the
'svn co /usr/{src,doc,ports}' step in the chroot when the
tree exists from external means.

The use case here is that /usr/src, /usr/doc, and /usr/ports
in the chroot exist as result of zfs dataset clones, so it
is possible (and happens quite often) that the included
distributions may not be consistent.  (This is not the case
for -RELEASE builds, but does happen for snapshot builds.)

Tested on: stable/9@r264319
MFC After: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoDon't leak the TCP pcbinfo lock if a time wait connection is closed
jhb [Fri, 11 Apr 2014 13:11:43 +0000 (13:11 +0000)]
Don't leak the TCP pcbinfo lock if a time wait connection is closed
in between grabbing a reference on the connection structure and obtaining
the pcbinfo lock.

Reviewed by: Julien Charbon

10 years agoCreate zvol devices on zfs clone.
mav [Fri, 11 Apr 2014 11:56:16 +0000 (11:56 +0000)]
Create zvol devices on zfs clone.

While big and shiny patch is not ready, it is better to have something.

PR: kern/178999
MFC after: 1 week

10 years agoCorrect IMOD default value according to comment.
hselasky [Fri, 11 Apr 2014 08:25:54 +0000 (08:25 +0000)]
Correct IMOD default value according to comment.

Reported by: Daniel O'Connor <doconnor@gsoft.com.au>
MFC after: 1 week

10 years agoSmall performance optimization. Clobber only cr0, rather than the entire CR.
jhibbits [Fri, 11 Apr 2014 06:17:44 +0000 (06:17 +0000)]
Small performance optimization.  Clobber only cr0, rather than the entire CR.

Discussed with: rdivacky,nwhitehorn
MFC after: 3 weeks

10 years agoRefine r264257; given that I later on decided to nuke the wildcard for
marius [Thu, 10 Apr 2014 21:03:46 +0000 (21:03 +0000)]
Refine r264257; given that I later on decided to nuke the wildcard for
the Sunix 0x1999 line of chips there actually is no need to explicitly
keep puc(4) from attaching to the single port version anymore.

10 years agoRework r264179.
grehan [Thu, 10 Apr 2014 19:15:58 +0000 (19:15 +0000)]
Rework r264179.

- remove redundant code
- remove erroneous setting of the error return
  in vmmdev_ioctl()
- use style(9) initialization
- in vmx_inject_pir(), document the race condition
  that the final conditional statement was detecting,

Tested with both gcc and clang builds.

Reviewed by: neel

10 years agoIn if_freemulti(), relax the paranoid KASSERT() on ifma->ifma_protospec.
bms [Thu, 10 Apr 2014 18:43:02 +0000 (18:43 +0000)]
In if_freemulti(), relax the paranoid KASSERT() on ifma->ifma_protospec.

This KASSERT() existed as a sanity check that upper layers in the network
stack (e.g. inet, inet6) had released their reference to the underlying
driver's multicast memberships (ifmultiaddr{}). However it assumes the
lifecycle of the driver membership corresponds to the lifecycle of the
network layer membership.

In the submitter's case, ieee80211_ioctl_updatemulti() attempts to
reprogram the (parent, physical) ifnet{} memberships in response
to a change in membership on the (child, virtual) VAP ifnet, using
a batched update mechanism. These updates happen independently from
the network layer, causing a "false negative" assertion failure.

There are possibly other use cases where this KASSERT() may be triggered
by other networking stack activity (e.g. where a nesting relationship
exists between multiple ifnet{} instances). This suggests that further
review of FreeBSD's approach to nested ifnet relationships is needed.

MFC after: 6 weeks
Submitted by: adrian@

10 years ago- Adding myself to the committers-ports.dot
xmj [Thu, 10 Apr 2014 18:34:26 +0000 (18:34 +0000)]
- Adding myself to the committers-ports.dot
- Adding myself to the freebsd calendar

Approved by: swills (mentor)

10 years agoCurrently, the TCP slow timer can starve TCP input processing while it
jhb [Thu, 10 Apr 2014 18:15:35 +0000 (18:15 +0000)]
Currently, the TCP slow timer can starve TCP input processing while it
walks the list of connections in TIME_WAIT closing expired connections
due to contention on the global TCP pcbinfo lock.

To remediate, introduce a new global lock to protect the list of
connections in TIME_WAIT.  Only acquire the TCP pcbinfo lock when
closing an expired connection.  This limits the window of time when
TCP input processing is stopped to the amount of time needed to close
a single connection.

Submitted by: Julien Charbon <jcharbon@verisign.com>
Reviewed by: rwatson, rrs, adrian
MFC after: 2 months

10 years agoFix spelling error in g_trace() call.
bdrewery [Thu, 10 Apr 2014 17:00:44 +0000 (17:00 +0000)]
Fix spelling error in g_trace() call.

Sponsored by: EMC / Isilon Storage Division
MFC after: 1 week

10 years agoFix EFI loader object tree creation on 9.x build hosts
emaste [Thu, 10 Apr 2014 16:53:21 +0000 (16:53 +0000)]
Fix EFI loader object tree creation on 9.x build hosts

Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi
subdirectory was skipped altogether for gcc (since GCC does not support
a required attribute).  However, during the early buildworld stages
${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build
hosts), not the compiler that will eventually be used.  This caused
"make obj" to skip the efi subdirectory.  In later build stages
${COMPILER_TYPE} is "clang", and then the efi loader would attempt to
build in the source directory.

Sponsored by: The FreeBSD Foundation

10 years agoFix wrong sizes used to access PD_Type and PD_State DDF metadata fields.
mav [Thu, 10 Apr 2014 16:00:33 +0000 (16:00 +0000)]
Fix wrong sizes used to access PD_Type and PD_State DDF metadata fields.

This caused incorrect behavior of arrays with big-endian DDF metadata.
Little-endian (like used by Adaptec controllers) should not be harmed.
Add workaround should be enough to manage compatibility.

MFC after: 2 weeks

10 years agoAdd the Asus USB-N10 NANO.
kevlo [Thu, 10 Apr 2014 14:37:37 +0000 (14:37 +0000)]
Add the Asus USB-N10 NANO.

Tested by: Kuan-Chung Chiu <buganini@gmail.com>

10 years agoFix stray "." left over from previous commit.
brueffer [Thu, 10 Apr 2014 10:56:11 +0000 (10:56 +0000)]
Fix stray "." left over from previous commit.

MFC after: 1 week

10 years agoFix Xref order in SEE ALSO.
brueffer [Thu, 10 Apr 2014 10:54:06 +0000 (10:54 +0000)]
Fix Xref order in SEE ALSO.

MFC after: 1 week

10 years agoMore mdoc/spelling/grammar cleanup.
brueffer [Thu, 10 Apr 2014 10:18:30 +0000 (10:18 +0000)]
More mdoc/spelling/grammar cleanup.

10 years agoDo not increment bio_data in case of BIO_DELETE.
mav [Thu, 10 Apr 2014 10:12:56 +0000 (10:12 +0000)]
Do not increment bio_data in case of BIO_DELETE.

This fixes KASSERT() panic in g_io_request().

10 years agoFix build breakage caused by r264295
smh [Thu, 10 Apr 2014 05:04:23 +0000 (05:04 +0000)]
Fix build breakage caused by r264295

X-MFC-With: r264295
MFC after: 1 week

10 years agoAdd kqueue support for devctl.
davidxu [Thu, 10 Apr 2014 02:30:51 +0000 (02:30 +0000)]
Add kqueue support for devctl.

Reviewed by: kib,mjg

10 years agoRestore the pX part to the version number printed in debugging mode.
des [Wed, 9 Apr 2014 20:42:00 +0000 (20:42 +0000)]
Restore the pX part to the version number printed in debugging mode.

10 years agoFix three refcounter leaks and lock recursion they covered.
mav [Wed, 9 Apr 2014 19:16:40 +0000 (19:16 +0000)]
Fix three refcounter leaks and lock recursion they covered.

MFC after: 1 week

10 years agoReally, really, really only allow this option for amd64/i386 builds.
sbruno [Wed, 9 Apr 2014 18:44:54 +0000 (18:44 +0000)]
Really, really, really only allow this option for amd64/i386 builds.

Submitted by: imp@ and tinderbox

10 years agoConstrain the amount of data returned to what is actually available
tychon [Wed, 9 Apr 2014 14:50:55 +0000 (14:50 +0000)]
Constrain the amount of data returned to what is actually available
not the size of the buffer.

Approved by: grehan (co-mentor)

10 years agoIntroduce new serialization type CTL_SERIDX_UNMAP.
mav [Wed, 9 Apr 2014 10:58:52 +0000 (10:58 +0000)]
Introduce new serialization type CTL_SERIDX_UNMAP.

Unfortunately we can't check range collisions for UNMAP commands alike
to writes, because they include multiple ranges, which are also passed
in data block, not in CDB.  As result, UNMAP commands have to be treated
as colliding with any other command accessing the media.

From the other side all UNMAPs are equal (we don't support ANCHOR flag),
so we can execute several UNMAPs same time.

10 years agoWhen splitting huge unmap requests, do it on sector boundary.
mav [Wed, 9 Apr 2014 10:44:09 +0000 (10:44 +0000)]
When splitting huge unmap requests, do it on sector boundary.

10 years agoRemove support of LUN-based CD changers from cd(4) driver.
mav [Wed, 9 Apr 2014 08:57:57 +0000 (08:57 +0000)]
Remove support of LUN-based CD changers from cd(4) driver.

This code was heavily broken few months ago during CAM locking changes.
Fixing it would require almost complete rewrite.  Since there are no
known devices on market using this interface younger then ~15 years, and
they are CD, not even DVD, I don't see much reason to rewrite it.

This change does not mean those devices won't work.  They will just work
slower due to inefficient disks load/unload schedule if several LUNs
accessed same time.

Discussed with: ken@
Silence on: scsi@, hardware@
MFC after: 1 week

10 years agoFix for infinite XHCI reset loops when the set address USB request fails.
hselasky [Wed, 9 Apr 2014 06:27:04 +0000 (06:27 +0000)]
Fix for infinite XHCI reset loops when the set address USB request fails.

MFC after: 2 days

10 years agoAdd workaround for MCP61 Ethernet controller found on MSI K9
yongari [Wed, 9 Apr 2014 05:15:40 +0000 (05:15 +0000)]
Add workaround for MCP61 Ethernet controller found on MSI K9
motherboard.  PHY hardware used for the controller responded at
all possible addresses which in turn resulted in having 32 PHYs
for the controller.  If driver detects "MSI K9N6PGM2-V2 (MS-7309)"
motherboard, tell miibus(4) PHY is located at 0.

Tested by: Chris H

10 years agoAdd a function to check whether the given register can be accessed whilst
adrian [Wed, 9 Apr 2014 03:51:05 +0000 (03:51 +0000)]
Add a function to check whether the given register can be accessed whilst
the chip is asleep.

It's AR5416 and later specific; I'll add a HAL method to generalise it
later.

Tested:

* AR5416, STA mode

10 years agoSpell imgact_binmisc correctly
sbruno [Wed, 9 Apr 2014 03:46:04 +0000 (03:46 +0000)]
Spell imgact_binmisc correctly

10 years agoBump osreldate for tracking SA-14:06
peter [Wed, 9 Apr 2014 01:26:58 +0000 (01:26 +0000)]
Bump osreldate for tracking SA-14:06

10 years agoAnother fix for r264274. Last moment cosmetic changes are evil!
mav [Tue, 8 Apr 2014 22:36:39 +0000 (22:36 +0000)]
Another fix for r264274.  Last moment cosmetic changes are evil!

10 years agosys/kern/imgact_binmisc.c -- free the right pointer mask vs magic
sbruno [Tue, 8 Apr 2014 22:12:01 +0000 (22:12 +0000)]
sys/kern/imgact_binmisc.c -- free the right pointer mask vs magic

sys/sys/imagact_binmisc.h -- cleanup white space tabs vs spaces
                          -- remove stray " in comment

Submitted by: jmallett@

10 years agoAlso ignore files from Murcirial (.hg) and git (.git) when copying
imp [Tue, 8 Apr 2014 21:58:04 +0000 (21:58 +0000)]
Also ignore files from Murcirial (.hg) and git (.git) when copying
file trees.

10 years agoActually, since this is what I thought I was doing, only allow the
sbruno [Tue, 8 Apr 2014 21:39:51 +0000 (21:39 +0000)]
Actually, since this is what I thought I was doing, only allow the
binmisc code to be build on amd64/i386 for the kernel.

Update NOTES with some indication of what this code is used for.

Pointed out by jhb@ ... thanks!

Submitted by: jhb@

10 years agoOops! Few quick fixes for r264274.
mav [Tue, 8 Apr 2014 21:30:10 +0000 (21:30 +0000)]
Oops! Few quick fixes for r264274.

10 years agoMerge OpenSSL 1.0.1g.
jkim [Tue, 8 Apr 2014 21:06:58 +0000 (21:06 +0000)]
Merge OpenSSL 1.0.1g.

Approved by: benl (maintainer)

10 years agoHandle single-byte reads from the bvmcons port (0x220) by returning
jhb [Tue, 8 Apr 2014 21:02:03 +0000 (21:02 +0000)]
Handle single-byte reads from the bvmcons port (0x220) by returning
0xff.  Some guests may attempt to read from this port to identify
psuedo-PNP ISA devices.  (The ie(4) driver in FreeBSD/i386 is one
example.)

Reviewed by: grehan

10 years agoQuick mdoc/whitespace/spelling pass, this needs some more work.
brueffer [Tue, 8 Apr 2014 20:59:02 +0000 (20:59 +0000)]
Quick mdoc/whitespace/spelling pass, this needs some more work.

10 years agoExplicitly initialize 'vmname' to NULL.
jhb [Tue, 8 Apr 2014 20:54:13 +0000 (20:54 +0000)]
Explicitly initialize 'vmname' to NULL.

Reviewed by: grehan

10 years agoAdd support for SCSI UNMAP commands to CTL.
mav [Tue, 8 Apr 2014 20:50:48 +0000 (20:50 +0000)]
Add support for SCSI UNMAP commands to CTL.

This patch adds support for three new SCSI commands: UNMAP, WRITE SAME(10)
and WRITE SAME(16).  WRITE SAME commands support both normal write mode
and UNMAP flag.  To properly report UNMAP capabilities this patch also adds
support for reporting two new VPD pages: Block limits and Logical Block
Provisioning.

UNMAP support can be enabled per-LUN by adding "-o unmap=on" to `ctladm
create` command line or "option unmap on" to lun sections of /etc/ctl.conf.

At this moment UNMAP supported for ramdisks and device-backed block LUNs.
It was tested to work great with ZFS ZVOLs.  For file-backed LUNs UNMAP
support is unfortunately missing due to absence of respective VFS KPI.

Reviewed by: ken
MFC after: 1 month
Sponsored by: iXsystems, Inc

10 years agoPut proper ${} around variable expansion. This fixes the build on 9.2
imp [Tue, 8 Apr 2014 20:10:57 +0000 (20:10 +0000)]
Put proper ${} around variable expansion.  This fixes the build on 9.2
with fmake (which complained). Not sure why bmake didn't complain though...

10 years agoAdd Stacey Son's binary activation patches that allow remapping of
sbruno [Tue, 8 Apr 2014 20:10:22 +0000 (20:10 +0000)]
Add Stacey Son's binary activation patches that allow remapping of
execution to a emumation program via parsing of ELF header information.

With this kernel module and userland tool, poudriere is able to build
ports packages via the QEMU userland tools (or another emulator program)
in a different architecture chroot, e.g. TARGET=mips TARGET_ARCH=mips

I'm not connecting this to GENERIC for obvious reasons, but this should
allow the kernel module to be built by default and enable the building
of the userland tool (which automatically loads the kernel module).

Submitted by: sson@
Reviewed by: jhb@

10 years ago(Re)connect sys/boot/amd64 to the build
emaste [Tue, 8 Apr 2014 19:19:58 +0000 (19:19 +0000)]
(Re)connect sys/boot/amd64 to the build

Sponsored by: The FreeBSD Foundation

10 years agoFix NFS deadlock vulnerability. [SA-14:05]
delphij [Tue, 8 Apr 2014 18:27:32 +0000 (18:27 +0000)]
Fix NFS deadlock vulnerability. [SA-14:05]

Fix "Heartbleed" vulnerability and ECDSA Cache Side-channel
Attack in OpenSSL. [SA-14:06]

10 years agoWakeup only one thread of added in r263978i at a time.
mav [Tue, 8 Apr 2014 18:22:03 +0000 (18:22 +0000)]
Wakeup only one thread of added in r263978i at a time.

This slightly reduces lock congestion between threads.

Submitted by: trasz

10 years agoAdd explicit casts to quiet warnings in libefi
emaste [Tue, 8 Apr 2014 18:21:38 +0000 (18:21 +0000)]
Add explicit casts to quiet warnings in libefi

Sponsored by: The FreeBSD Foundation

10 years agoFix printf args for 64-bit archs
emaste [Tue, 8 Apr 2014 18:02:32 +0000 (18:02 +0000)]
Fix printf args for 64-bit archs

Sponsored by: The FreeBSD Foundation

10 years agoCorrect a variable's type for 64-bit Ficl
emaste [Tue, 8 Apr 2014 17:50:27 +0000 (17:50 +0000)]
Correct a variable's type for 64-bit Ficl

FICL_INT is long.

10 years agoRevert r264132, disconnecting sys/boot/amd64 for now
emaste [Tue, 8 Apr 2014 17:40:09 +0000 (17:40 +0000)]
Revert r264132, disconnecting sys/boot/amd64 for now

Some 64-bit Ficl warnings broke tinderbox builds.

10 years agoUpdate to fix at r264244.
ray [Tue, 8 Apr 2014 14:18:39 +0000 (14:18 +0000)]
Update to fix at r264244.
o Unmute terminal when done with driver replacement.
o Move init fonts to early point.
o Minor cleanup.

MFC after: 6 days
X-MFC-with: r264244 r264242
Sponsored by: The FreeBSD Foundation

10 years agoFix cursor color in reverse video mode.
ray [Tue, 8 Apr 2014 14:14:25 +0000 (14:14 +0000)]
Fix cursor color in reverse video mode.

PR: kern/188196
Submitted by: Claude Buisson <clbuisson@orange.fr> (original version)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

10 years agoDistinguish between the different variants and configurations of Sunix
marius [Tue, 8 Apr 2014 07:32:32 +0000 (07:32 +0000)]
Distinguish between the different variants and configurations of Sunix
{MIO,SER}5xxxx chips instead of treating all of them as PUC_PORT_2S.
Among others, this fixes the hang seen when trying to probe the none-
existent second UART on an actually 1-port chip.

Obtained from: NetBSD (BAR layouts)
MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoAdd some debugging and forcing of the BAW to match what the current
adrian [Tue, 8 Apr 2014 07:14:14 +0000 (07:14 +0000)]
Add some debugging and forcing of the BAW to match what the current
tracked BAW actually is.

The net80211 code that completes a BAR will set tid->txa_start (the
BAW start) to whatever value was called when sending the BAR.
Now, in case there's bugs in my driver code that cause the BAW
to slip along, we should make sure that the new BAW we start
at is actually what we currently have it at, not what we've sent.

This totally breaks the specification and so this stays a printf().
If it happens then I need to know and fix it.

Whilst here, add some debugging updates:

* add TID logging to places where it's useful;
* use SEQNO().

10 years agoDon't do continue inside the scheduler loop; we really need to check
adrian [Tue, 8 Apr 2014 07:10:52 +0000 (07:10 +0000)]
Don't do continue inside the scheduler loop; we really need to check
if we've hit the end of the list and cycled around to the first
node again.

Obtained from: DragonflyBSD

10 years agoCorrect the actual definition of ath_tx_tid_filt_comp_single() to
adrian [Tue, 8 Apr 2014 07:08:59 +0000 (07:08 +0000)]
Correct the actual definition of ath_tx_tid_filt_comp_single() to
match how it's used.

This is another bug that led to aggregate traffic hanging because
the BAW tracking stopped being accurate.  In this instance, a filtered
frame that exceeded retries would return a non-error, which would
mean the caller would never remove it from the BAW.  But it wouldn't
be added to the filtered list, so it would be lost forever.  There'd
thus be a hole in the BAW that would never get transmitted and
this leads to a traffic hang.

Tested:

* Routerstation Pro, AR9220 AP

10 years agoAdd a comment explaining the obvious.
adrian [Tue, 8 Apr 2014 07:01:27 +0000 (07:01 +0000)]
Add a comment explaining the obvious.

10 years agoDon't resume a TID on each filtered frame completion - only do it if
adrian [Tue, 8 Apr 2014 07:00:43 +0000 (07:00 +0000)]
Don't resume a TID on each filtered frame completion - only do it if
we did suspend it.

The whole suspend/resume TID queue thing is supposed to be a matched
reference count - a subsystem (eg addba negotiation, BAR transmission,
filtered frames, etc) is supposed to call pause() once and then resume()
once.

ath_tx_tid_filt_comp_complete() is called upon the completion of any
filtered frame, regardless of whether the driver had aleady seen
a filtered frame and called pause().

So only call resume() if tid->isfiltered = 1, which indicates that
we had called pause() once.

This fixes a seemingly whacked and different problem - traffic hangs.

What was actually going on:

* There'd be some marginal link with crappy behaviour, causing filtered
  frames and BAR TXing to occur;
* A BAR TX would occur, setting the new BAW (block-ack window) to seqno n;
* .. and pause() would be called, blocking further transmission;
* A filtered frame completion would occur from the hardware, but with
  tid->isfiltered = 0 which indiciates we haven't actually marked
  the queue yet as filtered;
* ath_tx_tid_filt_comp_complete() would call resume(), continuing
  transmission;
* Some frames would be queued to the hardware, since the TID is now no
  longer paused;
* .. and if some make it out and ACked successfully, the new BAW
  may be seqno n+1 or more;
* .. then the BAR TX completes and sets the new seqno back to n.

At this point the BAW tracking would be loopy because the BAW
start was modified but the BAW ring buffer wasn't updated in lock
step.

Tested:

* Routerstation Pro + AR9220 AP

10 years agoUpdates to i.MX53:
rpaulo [Tue, 8 Apr 2014 04:05:04 +0000 (04:05 +0000)]
Updates to i.MX53:

* Define support for the SDHCI driver, although it doesn't work yet
* Fix the memory mappings for IPU [1]

Reviewed by: ray [1]

10 years agoAdd a basic set of data points which count the number of sleep entries
adrian [Tue, 8 Apr 2014 02:36:27 +0000 (02:36 +0000)]
Add a basic set of data points which count the number of sleep entries
that are being done by the OS.

For now this'll match up with the "wakeups"; although I'll dig deeper into
this to see if we can determine which sleep state the CPU managed to get
into.  Most things I've seen these days only expose up to C2 or C3 via
ACPI even though the CPU goes all the way down to C6 or C7.

10 years agoRemove a bogus re-assignment.
kevlo [Tue, 8 Apr 2014 01:54:50 +0000 (01:54 +0000)]
Remove a bogus re-assignment.

10 years agoFix panic on load new driver while vt(4) is in VGA textmode.
ray [Mon, 7 Apr 2014 22:49:41 +0000 (22:49 +0000)]
Fix panic on load new driver while vt(4) is in VGA textmode.
o Mute terminal while vt(4) driver change in progress.
o Reset VDF_TEXTMODE before init new driver.
o Assign default font, if new driver is not in TEXTMODE.
o Do not update screen while driver changing.

Resolved by: adrian
Reported by: tyler
MFC after: 7 days
Sponsored by: The FreeBSD Foundation