davide [Sat, 27 Oct 2012 23:34:18 +0000 (23:34 +0000)]
MFC r238925:
Until now KTR_ENTRIES, which defines the size of circular buffer used in
ktr(4), was constrained to be a power of two. Remove this constraint and
update sys/conf/NOTES accordingly.
eadler [Sat, 27 Oct 2012 01:20:48 +0000 (01:20 +0000)]
MFC r241848:
Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.
delphij [Fri, 26 Oct 2012 00:30:44 +0000 (00:30 +0000)]
MFC r240210:
It seems that what the code really meant is that when a write is completed,
do a BUS_DMASYNC_POSTWRITE over the DMA map. The way it currently is would
only do POSTREAD for read transactions.
gavin [Thu, 25 Oct 2012 10:29:15 +0000 (10:29 +0000)]
Merge r240680 from head:
Align the PCI Express #defines with the style used for the PCI-X
#defines. This has the advantage that it makes the names more
compact, and also allows us to correct the non-uniform naming of
the PCIM_LINK_* defines, making them all consistent amongst themselves.
This is a mostly mechanical rename:
s/PCIR_EXPRESS_/PCIER_/g
s/PCIM_EXP_/PCIEM_/g
s/PCIM_LINK_/PCIEM_LINK_/g
In this MFC, #defines have been added for the old names to assist
merges and out-of-tree drivers.
brooks [Tue, 23 Oct 2012 21:20:05 +0000 (21:20 +0000)]
MFC r228120:
Allow NO_FOO to override WITH_FOO that could be specified in /etc/src.conf.
This is required to override knobs (e.g. WITH_PROFILE) during buildworld
stages in Makefile.inc1 (otherwise the build is stopped due to both WITH_FOO
and WITHOUT_FOO defined).
marius [Sun, 21 Oct 2012 11:43:47 +0000 (11:43 +0000)]
MFC: r241679
It turns out that as documented, PCF8563_R_SECOND_VL (i.e. battery low)
doesn't automatically clear when VDD rises above Vlow again and needs to be
cleared manually. However, apparently this needs all of the time registers
to be set, i.e. pcf8563_settime(), and not just PCF8563_R_SECOND in order
for PCF8563_R_SECOND_VL to stick. Thus, we just issue a warning during
pcf8563_attach() rather than failing with ENXIO in case it is set.
mav [Fri, 19 Oct 2012 17:45:56 +0000 (17:45 +0000)]
MFC r241375:
Cast vendor-specific spell on VIA VT1818S codecs alike to VT1708S to
make analog input loopback and dual-stream playback work by enabling
signal mixing by nid 22, as it should be according to info returned by
the CODEC. Otherwise pin nid 28 receives only signal from DAC nid 16.
jhb [Fri, 19 Oct 2012 11:01:39 +0000 (11:01 +0000)]
MFC 206082,206179,207056,207057,210612,210636,210656,212423,212426,228121,
228124,228137,228140,228141,228147,228153,228158,228311,241395,241396:
Convert WITH_CTF into a normal build option where MK_CTF is set to yes/no
depending on WITH_CTF/WITHOUT_CTF. In addition, WITH_CTF can now be
specified in src.conf (not recommended, there are some problems with
static executables), make.conf (would also affect ports which do not use
GNU make and do not override the compile targets) or in the kernel config
(via "makeoptions WITH_CTF=yes").
marius [Thu, 18 Oct 2012 14:57:11 +0000 (14:57 +0000)]
MFC: r239864
- Unlike cache invalidation and TLB demapping IPIs, reading registers from
other CPUs doesn't require locking so get rid of it. As the latter is used
for the timecounter on certain machine models, using a spin lock in this
case can lead to a deadlock with the upcoming callout(9) rework.
- Merge r134227/r167250 from x86:
Avoid cross-IPI SMP deadlock by using the smp_ipi_mtx spin lock not only
for smp_rendezvous_cpus() but also for the MD cache invalidation and TLB
demapping IPIs.
- Mark some unused function arguments as such.
rmacklem [Mon, 15 Oct 2012 01:13:36 +0000 (01:13 +0000)]
MFC: r241097
Attila Bogar and Herbert Poeckl both reported similar problems
w.r.t. a Linux NFS client doing a krb5 NFS mount against the
FreeBSD server. We determined this was a Linux bug:
http://www.spinics.net/lists/linux-nfs/msg32466.html, however
the mount failed to work, because the Destroy operation with a
bogus encrypted checksum destroyed the authenticator handle.
This patch changes the rpcsec_gss code so that it doesn't
Destroy the authenticator handle for this case and, as such,
the Linux mount will work.
jimharris [Tue, 9 Oct 2012 19:59:22 +0000 (19:59 +0000)]
MFC r240901:
Use CAM_SEL_TIMEOUT and CAM_DEV_NOT_THERE to report missing targets or
LUNs respectively. This removes a huge number of error messages
from CAM during bus scans.
jimharris [Tue, 9 Oct 2012 19:57:18 +0000 (19:57 +0000)]
MFC r240900:
Specify MTX_RECURSE for the controller's io_lock. Without it, tws(4)
immediately panics on boot with INVARIANTS enabled. The driver already
clearly expects to be able to recurse on this mutex - the main I/O path
is always recursing on this lock.
jhb [Tue, 9 Oct 2012 18:45:08 +0000 (18:45 +0000)]
MFC 201279,201280,201286,213907,214146,220195,222753,223371,225515,235833:
Various fixes to managing PCI BARs including proper support for managing
PCI ROM BARs:
- Teach the PCI bus driver to handle PCIR_BIOS BARs properly and remove
special handling for the PCIR_BIOS decoding enable bit from the cardbus
driver. The PCIR_BIOS BAR does include type bits like other BARs.
Instead, it is always a 32-bit non-prefetchable memory BAR where the low
bit is used as a flag to enable decoding.
- Explicitly track the state of all known BARs for each PCI device. The PCI
bus driver will now remember the size of a BAR obtained during the initial
bus scan and use that size when doing lazy resource allocation rather than
resizing the BAR. The bus driver will now also report unallocated BARs to
userland for display by 'pciconf -lb'.
- Add a constant for the offset of the ROM BIOS BAR in PCI-PCI bridges and
properly handle ROM BIOS BARs in PCI-PCI bridges. The PCI bus now also
properly handles the lack of a ROM BIOS BAR in a PCI-Cardbus bridge.
sbruno [Tue, 9 Oct 2012 18:02:05 +0000 (18:02 +0000)]
MFC r240879
This patch fixes a nit in the em, lem, and igb driver statistics. Increment
adapter->dropped_pkts instead of if_ierrors because if_ierrors is
overwritten by hw stats collection.
Submitted by: Andrew Boyer <aboyer@averesystems.com>
Reviewed by: Jack F Vogel <jfv@freebsd.org>
obrien [Tue, 9 Oct 2012 05:06:30 +0000 (05:06 +0000)]
MF9: r237100: MFC r236338, r236339, r236346, r236347, r236365, & r236977
* Deprecate the FreeBSD 10's make's ":U" (to-upper case) and ":L"
(to-lower case) modifiers for ":tu" and ":tl".
* make it easier to test newly-built make.
* Add "-V '${VAR}'" variable expansion from Portable Berkeley Make.
* regression test for '-V' command line option and the :t[lu] modifiers.
rmacklem [Mon, 8 Oct 2012 13:14:00 +0000 (13:14 +0000)]
MFC: r240902
Attila Bogar reported a bug in mountd when multiple export
entries with different security flavors are in the exports(5)
file. For that case, mountd replies with the security flavors
of the last entry and not the correct one for the client host.
This patch fixes that by storing separate copies of the flavors
for each host/net case, plus a default one for the case where
no hosts/nets are specified on an entry in the exports(5) file.
Unlike the patch in the PR, it replies with the security flavors
for the entry instead of merging the security flavors for all
the entries and replying with that.
jhb [Sun, 7 Oct 2012 21:33:04 +0000 (21:33 +0000)]
MFC 239955-239957:
Cleanups and fixes for building firmware modules into a kernel:
- Add common rules for building firmware object files (NORMAL_FW to run
uudecode, and NORMAL_FWO to use ld to build the .fwo file) and use those
instead of explicit ld/uudecode invocations in sys/conf/files. Apart from
increasing readability, this makes it possible to adjust the flags used for
firmware objects in one place.
- Similar to how r171350 fixed linking of kernel modules containing
firmware objects by adding --no-warn-mismatch to the linker flags,
add --no-warn-mismatch when linking firmware objects (*.fwo) as
well as to the link of the main kernel file. This permits firmware
modules to be statically linked into an ia64 kernel.
jhb [Sun, 7 Oct 2012 20:17:24 +0000 (20:17 +0000)]
MFC 212429:
Add real dependancies on the uuencoded firmwares.
Now when one does 'make kernel ; make kernel' the second invocation
only does: `kernel.ko' is up to date.
rather than reproduce all the .fw files and relink the kernel.
jhb [Sun, 7 Oct 2012 18:57:52 +0000 (18:57 +0000)]
MFC 239440,239519:
Refine the changes made in r208212 to avoid bogus failures from
if_delmulti() when clearing the configuration for a subinterface when
the parent interface is being detached. The current code was still
triggering an assertion in if_delmulti() due to the parent interface being
partially detached. Fix this by not calling if_delmulti() at all if the
parent interface is being detached. Warn if if_delmulti() fails when the
parent is not being detached (but similar to 208212, still proceed with
tearing down the vlan state).
jhb [Sun, 7 Oct 2012 18:31:17 +0000 (18:31 +0000)]
MFC 226961,239951:
Add a -h flag similar to the -h flag for ln to force mv(1) to treat a
symbolic link to a directory for the target as a symbolic link instead of
a directory. This makes it possible to atomically update a symbolic
link using rename().