]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoid_t is 64bit, provide the compat32 wrapper for clock_getcpuclockid2(2).
kib [Sat, 20 Jul 2013 13:39:41 +0000 (13:39 +0000)]
id_t is 64bit, provide the compat32 wrapper for clock_getcpuclockid2(2).

Reported and tested by: Petr Salinger <Petr.Salinger@seznam.cz>
PR: threads/180652
Sponsored by: The FreeBSD Foundation

10 years agoAllow the code to be compiled without warnings for any combination
tuexen [Sat, 20 Jul 2013 13:14:59 +0000 (13:14 +0000)]
Allow the code to be compiled without warnings for any combination
of INET, INET6 and SCTP_DEBUG defines.
The issue was reported by Lally Singh.

MFC after: 2 weeks

10 years agoStart adding support to build bits of our code using the Thumb-2
andrew [Sat, 20 Jul 2013 09:24:48 +0000 (09:24 +0000)]
Start adding support to build bits of our code using the Thumb-2
instruction set. Thumb-2 requires an if-then instruction to implement
conditional codes.

When building for ARM mode the it-then instructions do not generate any
assembled instruction as per the ARMv7-A Architecture Reference Manual, and
are safe to use.

While this allows the atomic instructions to be built, it doesn't mean we
fully support Thumb code. It works in small tests, but is still known to
fail in a large number of places.

While here add a check for the armv6t2 architecture.

10 years agoAdd support for upcoming BCM5725 (ASIC 5762) controller. This is a
yongari [Sat, 20 Jul 2013 07:58:03 +0000 (07:58 +0000)]
Add support for upcoming BCM5725 (ASIC 5762) controller.  This is a
new 1Gb server controller chip that will be going into production
soon.
BCM5725 combines MAC with triple-speed PHY, a Network Controller
Sideband Interface (NC-SI) and on-chip memory buffer in a single
device.  BCM5725 has an Application Processing Engine (APE) that is
capable of on-chip management and offloading features.  BCM5725
supports high-precision clock, time stamp registers for
receive/transmit packets and programmable trigger inputs and
watchdog timeouts. These new features are not yet supported by
bge(4).
Many thanks to Broadcom for continuing to support FreeBSD!

Submitted by: Geans Pin geanspin@Broacom (initial version)
Reviewed by: Geans Pin geanspin@Broacom
H/W donated by: Broadcom

10 years agoRecognize BCM5725C PHY.
yongari [Sat, 20 Jul 2013 07:24:01 +0000 (07:24 +0000)]
Recognize BCM5725C PHY.

10 years agoSetup the PCIE Fast Training Sequence (FTS) value to prevent
yongari [Sat, 20 Jul 2013 07:09:50 +0000 (07:09 +0000)]
Setup the PCIE Fast Training Sequence (FTS) value to prevent
transmit hangs for 57766 and non Ax versions of 57765.
While here, correct definition of BGE_CHIPREV_57765_AX.

10 years agoAdjust outsizes:
pfg [Sat, 20 Jul 2013 03:55:56 +0000 (03:55 +0000)]
Adjust outsizes:

Recalculate FUSE_COMPAT_ENTRY_OUT_SIZE and COMPAT_ATTR_OUT_SIZE.
These were wrong in the previous commit. They are actually unused
in FreeBSD though.

Pointed out by: Jan Beich

10 years agoAdjust outsizes:
pfg [Sat, 20 Jul 2013 03:08:50 +0000 (03:08 +0000)]
Adjust outsizes:

When birthtime was added (r253331) we missed adding the weight
of the new fields in FUSE_COMPAT_ENTRY_OUT_SIZE and
COMPAT_ATTR_OUT_SIZE. Adjust them accordingly.

Pointed out by: Jan Beich

10 years agoThere's nothing to free if the unit wasn't allocated.
np [Fri, 19 Jul 2013 21:54:48 +0000 (21:54 +0000)]
There's nothing to free if the unit wasn't allocated.

10 years agoAdd message when nvd disks are attached and detached.
jimharris [Fri, 19 Jul 2013 21:40:57 +0000 (21:40 +0000)]
Add message when nvd disks are attached and detached.

As part of this commit, add an nvme_strvis() function which borrows
heavily from cam_strvis().  This will allow stripping of
leading/trailing whitespace and also handle unprintable characters
in model/serial numbers.  This function goes into a new nvme_util.c
file which is used by both the driver and nvmecontrol.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

10 years agoAdd new Coleto Creek device support: SATA, SMBus, and Watchdog devices.
jfv [Fri, 19 Jul 2013 21:37:40 +0000 (21:37 +0000)]
Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices.

MFC after: 1 week

10 years agoFix nvme(4) and nvd(4) to support non 512-byte sector sizes.
jimharris [Fri, 19 Jul 2013 21:33:24 +0000 (21:33 +0000)]
Fix nvme(4) and nvd(4) to support non 512-byte sector sizes.

Recent testing with QEMU that has variable sector size support for
NVMe uncovered some of these issues.  Chatham prototype boards supported
only 512 byte sectors.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

10 years agoDo not call disk_create() until we have completed all initialization of our
jimharris [Fri, 19 Jul 2013 21:30:53 +0000 (21:30 +0000)]
Do not call disk_create() until we have completed all initialization of our
internal disk structure.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

10 years agoGet the code compiling without INET and INET6 being defined.
tuexen [Fri, 19 Jul 2013 21:16:59 +0000 (21:16 +0000)]
Get the code compiling without INET and INET6 being defined.
This is not possible in FreeBSD, but in the upstream code.

MFC after: 2 weeks

10 years agoBe more aggressive in using superpages in all mappings of objects:
jhb [Fri, 19 Jul 2013 19:06:15 +0000 (19:06 +0000)]
Be more aggressive in using superpages in all mappings of objects:
- Add a new address space allocation method (VMFS_OPTIMAL_SPACE) for
  vm_map_find() that will try to alter the alignment of a mapping to match
  any existing superpage mappings of the object being mapped.  If no
  suitable address range is found with the necessary alignment,
  vm_map_find() will fall back to using the simple first-fit strategy
  (VMFS_ANY_SPACE).
- Change mmap() without MAP_FIXED, shmat(), and the GEM mapping ioctl to
  use VMFS_OPTIMAL_SPACE instead of VMFS_ANY_SPACE.

Reviewed by: alc (earlier version)
MFC after: 2 weeks

10 years agoSince there's no defined schema for the XML that's generated by the
scottl [Fri, 19 Jul 2013 06:42:15 +0000 (06:42 +0000)]
Since there's no defined schema for the XML that's generated by the
kern.geom.confxml sysctl, it's silly to warn about tags in libgeom,
especially since libgeom exists simply to build a tree out of the conf
information.

Obtained from: Netflix
MFC after: 3 days

10 years agoCorrect ELF note decoding for non-core files
emaste [Fri, 19 Jul 2013 01:04:17 +0000 (01:04 +0000)]
Correct ELF note decoding for non-core files

Requested by: kib

10 years agoOverhaul error, information, and debug logging.
scottl [Fri, 19 Jul 2013 00:12:41 +0000 (00:12 +0000)]
Overhaul error, information, and debug logging.

Obtained from: Netflix
MFC after: 3 days

10 years agoUse _PATH_DEV (from paths.h) for the "/dev/" string, rather than
jimharris [Thu, 18 Jul 2013 23:25:57 +0000 (23:25 +0000)]
Use _PATH_DEV (from paths.h) for the "/dev/" string, rather than
hard-coding it.

Sponsored by: Intel
Suggested by: kib
Reviewed by: kib, carl
MFC after: 3 days

10 years agoSimplify open_dev() by returning errno values rather than just 0 or 1.
jimharris [Thu, 18 Jul 2013 23:12:44 +0000 (23:12 +0000)]
Simplify open_dev() by returning errno values rather than just 0 or 1.

Also remove stat() call and just rely on errno from open() call to discern
whether dev node exists or not.

Sponsored by: Intel
Reviewed by: kib, carl
MFC after: 3 days

10 years agoClose uniq(1) in the capability mode sandbox and limit descriptors using
pjd [Thu, 18 Jul 2013 22:11:27 +0000 (22:11 +0000)]
Close uniq(1) in the capability mode sandbox and limit descriptors using
capability rights.

10 years ago- Make localtime(3) to work in sandbox.
pjd [Thu, 18 Jul 2013 21:56:10 +0000 (21:56 +0000)]
- Make localtime(3) to work in sandbox.
- Move strerror(3) initialization to its own function.

10 years agoDecode PCIe ASPM capability and status.
jkim [Thu, 18 Jul 2013 20:59:58 +0000 (20:59 +0000)]
Decode PCIe ASPM capability and status.

10 years agoCorrect alignment in note output
emaste [Thu, 18 Jul 2013 20:36:21 +0000 (20:36 +0000)]
Correct alignment in note output

10 years agoRemove accidentally cut-and-pasted colons
emaste [Thu, 18 Jul 2013 19:17:58 +0000 (19:17 +0000)]
Remove accidentally cut-and-pasted colons

10 years agoSanity-check the vm exitcode, and exit the process if it's out-of-bounds
grehan [Thu, 18 Jul 2013 18:40:54 +0000 (18:40 +0000)]
Sanity-check the vm exitcode, and exit the process if it's out-of-bounds
or there is no registered handler.

Submitted by: Bela Lubkin   bela dot lubkin at tidalscale dot com

10 years agoHandle FreeBSD-specific ELF notes
emaste [Thu, 18 Jul 2013 17:25:50 +0000 (17:25 +0000)]
Handle FreeBSD-specific ELF notes

Add a function to return the specific type, when the note's Name field is
'FreeBSD'.

r249558 added FreeBSD-specific ELF note types that reuse type numbers of
existing generic / Linux types.  This caused 'readelf -n' to produce
incorrect output on FreeBSD core files.

Sponsored by: DARPA, AFRL
MFC after: 3 days

10 years agoProperly handle I/O windows in bridges with the ISA enable bit set. These
jhb [Thu, 18 Jul 2013 15:17:11 +0000 (15:17 +0000)]
Properly handle I/O windows in bridges with the ISA enable bit set.  These
beasts still exist unfortunately.  More details can be found in other
references, but the short version is that bridges with this bit set ignore
I/O port ranges that alias to valid ISA I/O port ranges.  In the driver
this requires not allocating these alias regions from the parent device
(so they are free to be acquired by ISA devices), and ensuring no child
devices use resources from these alias regions.
- Change the pcib_window structure to allow for an array of backing
  resources rather than a single resource and update the existing code
  to cope with this.  Some of the coping requires using the saved
  base and limit values in pcib_window instead of using rman operations
  on the backing resource.
- Add special handling for allocating and adjusting the I/O port window
  of an ISA-enabled bridge to only allocate the non-alias ranges and
  add those to the associated resource manager.
- Reject I/O port allocations for a fixed request that conflicts with an
  ISA alias range.
- Remove the "no prefected decode" verbose printf during boot.  The absence
  of a "prefetched decode" line is sufficient.
- Replace the "subtractively decoded bridge" verbose printf with a single
  printf that lists all the "special" decoding modes of a bridge: ISA,
  subtractive, and VGA.
- Add a custom bus_release_resource() method to the PCI bus driver so that
  it can properly free resources for I/O windows of PCI-PCI bridges.
  (These resources are not stored in the bridge device's resource list.)

PR: misc/179033
MFC after: 2 weeks

10 years agoRework the previous fix for the IB vs Ethernet sysctl handler to be more
jhb [Thu, 18 Jul 2013 14:06:01 +0000 (14:06 +0000)]
Rework the previous fix for the IB vs Ethernet sysctl handler to be more
generic and apply to all sysfs attributes:
- Use sysctl_handle_string() instead of reimplementing it.
- Remove trailing newline from the current value before passing it to
  userland and append a newline to the new string value before passing it
  to the attribute's store function.
- Don't leak the temporary buffer if the first error check triggers.
- Revert earlier change to mlx4 port mode handler.

PR: kern/174213
Submitted by: Garrett Cooper
Reviewed by: Shakar Klein @ Mellanox
MFC after: 1 week

10 years agoInclude stdint.h when use intmax_t.
kevlo [Thu, 18 Jul 2013 06:32:19 +0000 (06:32 +0000)]
Include stdint.h when use intmax_t.

Reported by: bde

10 years agoMinor mdoc fixes.
joel [Thu, 18 Jul 2013 05:46:33 +0000 (05:46 +0000)]
Minor mdoc fixes.

10 years ago- Fix a bug in ipv6_prefix_IF. It did not work with the 64-bit prefix
hrs [Thu, 18 Jul 2013 02:58:24 +0000 (02:58 +0000)]
- Fix a bug in ipv6_prefix_IF.  It did not work with the 64-bit prefix
  notation like 2001:db8:1:1.

- Use eui64 flag in ifconfig(8) instead of network6_getladdr()[*] for
  interface indentifier part.

Suggested by: ume [*]
MFC after: 3 days

10 years agoFix a gcc warning.
hrs [Thu, 18 Jul 2013 02:34:25 +0000 (02:34 +0000)]
Fix a gcc warning.

Pointy hat to: hrs

10 years agoReplace PRId64 with "jd" in a printf call. Cast the corresponding value to
kevlo [Thu, 18 Jul 2013 01:40:31 +0000 (01:40 +0000)]
Replace PRId64 with "jd" in a printf call. Cast the corresponding value to
intmax_t, because the original type is off_t.

Reported by: bde

10 years agoManually merge part of vendor import r238583 from Illumos.
delphij [Thu, 18 Jul 2013 00:22:42 +0000 (00:22 +0000)]
Manually merge part of vendor import r238583 from Illumos.

Illumos changeset: 13680:2bd022a765e2
Illumos ZFS issue:

    2671 zpool import should not fail if vdev ashift has increased

MFC after: 3 days

10 years agoMajor rework of the virtio code. Split out common parts, and modify
grehan [Wed, 17 Jul 2013 23:37:33 +0000 (23:37 +0000)]
Major rework of the virtio code. Split out common parts, and modify
the net/block devices accordingly.

Submitted by: Chris Torek   torek at torek dot net
Reviewed by: grehan

10 years agoReload font when syscons(4) is resuming without switching mode.
jkim [Wed, 17 Jul 2013 23:29:56 +0000 (23:29 +0000)]
Reload font when syscons(4) is resuming without switching mode.

Reported by: adrian (more than a year ago)
Prodded by: adrian (less than a month ago)

10 years agoUse pause() instead of DELAY() when polling for completion of admin
jimharris [Wed, 17 Jul 2013 23:26:56 +0000 (23:26 +0000)]
Use pause() instead of DELAY() when polling for completion of admin
commands during controller initialization.

DELAY() does not work here during config_intrhook context - we need to
explicitly relinquish the CPU for the admin command completion to
get processed.

Sponsored by: Intel
Reported by: Adam Brooks <adam.j.brooks@intel.com>
Reviewed by: carl
MFC after: 3 days

10 years agoDefine constants for the lengths of the serial number, model number
jimharris [Wed, 17 Jul 2013 23:23:38 +0000 (23:23 +0000)]
Define constants for the lengths of the serial number, model number
and firmware revision in the controller's identify structure.

Also modify consumers of these fields to ensure they only use the
specified number of bytes for their respective fields.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

10 years agoAlways initialize fd to 0 in open_dev().
jimharris [Wed, 17 Jul 2013 23:14:41 +0000 (23:14 +0000)]
Always initialize fd to 0 in open_dev().

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

10 years agoAdd bus_dmamap_load_bio and bus_dmamap_load_ccb to bus_dma(9).
jimharris [Wed, 17 Jul 2013 19:41:16 +0000 (19:41 +0000)]
Add bus_dmamap_load_bio and bus_dmamap_load_ccb to bus_dma(9).

Sponsored by: Intel
Reviewed by: kib
MFC after: 3 days

10 years agoIn this GRN, Marcel Moolenaar overhauled the logic for mounting
rodrigc [Wed, 17 Jul 2013 19:32:07 +0000 (19:32 +0000)]
In this GRN, Marcel Moolenaar overhauled the logic for mounting
the root file system on bootup:

   |------------------------------------------------------------------------
   |r214006 | marcel | 2010-10-17 22:01:53 -0700 (Sun, 17 Oct 2010) | 20 lines
   |
   | Re-implement the root mount logic using a recursive approach, whereby each
   |root file system (starting with devfs and a synthesized configuration) can
   |contain directives for mounting another file system as root.
   |------------------------------------------------------------------------

This commit adds a mount.conf(8) man page which documents
the root mount logic.  mount.conf(8) also provides some examples
for the /.mount.conf file, which can be used to change the root mount behavior.

Reviewed by: marcel bjk

10 years agoUse NET_RT_DUMP.0.FIB leaf node instead of setting td_proc->p_fibnum.
hrs [Wed, 17 Jul 2013 14:15:00 +0000 (14:15 +0000)]
Use NET_RT_DUMP.0.FIB leaf node instead of setting td_proc->p_fibnum.

10 years ago- Add support of MK_INET_SUPPORT=no.
hrs [Wed, 17 Jul 2013 14:05:20 +0000 (14:05 +0000)]
- Add support of MK_INET_SUPPORT=no.
- Fix a bug in sodump() which prevented struct sockaddr_in6 from displaying.
- Fix a bug in in fiboptlist_csv() which could cause free() of uninitialized
  pointer.
- Style cleanups:
 . Add missing "static" keywords.
 . Use an array of struct sockaddr_storage instead of sockunion for rtmsg.
 . Use err() and errx() instead of pair of fprintf(stderr, "...") + exit(1).
 . Use nitems() macro.
 . Various style(9) fixes.

10 years agoDo not overwrite the new UTF-8 files with the old ISO one
bapt [Wed, 17 Jul 2013 14:00:51 +0000 (14:00 +0000)]
Do not overwrite the new UTF-8 files with the old ISO one

10 years agoSimplify keywords.h generation.
hrs [Wed, 17 Jul 2013 13:47:13 +0000 (13:47 +0000)]
Simplify keywords.h generation.

10 years agoRemove check forbidding requests that would result in one port being set
jhb [Wed, 17 Jul 2013 13:41:54 +0000 (13:41 +0000)]
Remove check forbidding requests that would result in one port being set
to Ethernet and the subsequent port being set to IB.

Submitted by: Shakar Klein @ Mellanox
Tested by: Morgan Robertson <morganrobertson@gmail.com>
MFC after: 1 week

10 years agoFix typo.
glebius [Wed, 17 Jul 2013 13:13:44 +0000 (13:13 +0000)]
Fix typo.

Submitted by: ae

10 years agoImprove example, so that it doesn't dump core when example module
glebius [Wed, 17 Jul 2013 12:28:48 +0000 (12:28 +0000)]
Improve example, so that it doesn't dump core when example module
isn't loaded.

10 years agoChange Eu to the proper UTF-8 symbol this was missed in r253414
bapt [Wed, 17 Jul 2013 11:51:24 +0000 (11:51 +0000)]
Change Eu to the proper UTF-8 symbol this was missed in r253414

10 years agoClear the vnode knotes before destroying vpollinfo.
kib [Wed, 17 Jul 2013 10:56:21 +0000 (10:56 +0000)]
Clear the vnode knotes before destroying vpollinfo.

Reported and tested by: Patrick Lamaiziere <patfbsd@davenulle.org>
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoFor all european contries using the euro currency, add an UTF-8 definition with the...
bapt [Wed, 17 Jul 2013 10:12:31 +0000 (10:12 +0000)]
For all european contries using the euro currency, add an UTF-8 definition with the proper Euro symbol

MFC after: 1 week

10 years ago[fix to r253380] __setenv: be explicit about placing '=' after name
avg [Wed, 17 Jul 2013 08:45:27 +0000 (08:45 +0000)]
[fix to r253380] __setenv: be explicit about placing '=' after name

This should a regression introduced in r253380 if malloc'ed memory
happens to have '=' at the right place.

Reported by: ache
Pointyhat to: me (avg)
MFC after: 1 day
X-MFC with: r253380

10 years agoImplement workaround for BCM5719/BCM5720 TX hang.
yongari [Wed, 17 Jul 2013 04:53:53 +0000 (04:53 +0000)]
Implement workaround for BCM5719/BCM5720 TX hang.
The read DMA request logic operation is based on having sufficient
available space in the transmit data buffer (TXMBUF) before a read
DMA can be requested.  There are four read DMA channels that use
the TXMBUF, and the logic checks if the available free space in the
TXMBUF is large enough for all the data in the four Send Buffers
for which buffer descriptors have been fetched.  The Enable_Request
signal is asserted only if the free TXMBUF space is larger than the
sum of the four DMA length registers.  The power-up default value
of BGE_RDMA_LSO_CRPTEN_CTRL register bit 25 (bit 21 on BCM5720) is
zero, which selects the DMA length registers to connect to the
input of the adder block.  The DMA length registers are
asynchronously reset following BCM5719/BCM5720 power-up, and due to
the lack of synchronous deassertion of the length registers reset
signal these resisters may contain uninitialized values following
the reset deassertion.
In the case of the failure the uninitialized DMA length register
values added up to more than the TXMBUF size, which prevented the
assertion of the Enable_Request signal and any subsequent read DMA
to start.  This lockup condition is the root cause of failing to
generate any transmit traffic.

To workaround the issue, select alternate output of multiplexers
and transmit the first four Ethernet frames. This overwrites the
DMA length registers with valid values.

Reported by: Geans Pin <geanspin@broadcom.com>
Reviewed by: Geans Pin <geanspin@broadcom.com>

10 years agoSpecify a timeout for the PL block.
np [Wed, 17 Jul 2013 02:37:40 +0000 (02:37 +0000)]
Specify a timeout for the PL block.

MFC after: 3 days

10 years agoAvoid magic constant.
yongari [Wed, 17 Jul 2013 01:34:25 +0000 (01:34 +0000)]
Avoid magic constant.
No functional change.

10 years ago o TxD ring requires 8 bytes alignment to work so change alignment
yongari [Wed, 17 Jul 2013 01:24:23 +0000 (01:24 +0000)]
 o TxD ring requires 8 bytes alignment to work so change alignment
   constraint to 8. Previously it may have triggered watchdog
   timeouts.
 o Check whether interrupt is ours or not.
 o Enable interrupts before attemping to transmit queued packets.
   This will slightly improve TX performance.
 o No need to clear IFF_DRV_OACTIVE in a loop. AE_FLAG_TXAVAIL is
   used to know whether there are enough available TxD ring space.
 o Added missing bus_dmamap_sync(9) in ae_rx_intr() and rearranged
   code to avoid unncessary register access.
 o Make sure to clear TxD, TxS, RxD rings in driver initialization.
   Otherwise some data in these rings could be interpreted as
   'updated' which in turn will advance internally maintained
   pointers and can trigger watchdog timeouts.

PR: kern/180382

10 years agoAdd missing headers.
kevlo [Wed, 17 Jul 2013 00:58:23 +0000 (00:58 +0000)]
Add missing headers.

10 years agoUse PRId64 instead of %gd to print an int64_t.
kevlo [Wed, 17 Jul 2013 00:54:21 +0000 (00:54 +0000)]
Use PRId64 instead of %gd to print an int64_t.

10 years agoFix vfp:
andrew [Tue, 16 Jul 2013 23:19:05 +0000 (23:19 +0000)]
Fix vfp:
 - We should check is_d32 to see howmany registers we have
 - In vfp_restore mark vfpscr as an output register

Without the second part it appears we can return the incorrect value from
vfp_bounce if the VFP condition flags are set as it may override the
register holding the return value.

10 years agoAdd a tunable to force disable MSI use for xhci(4).
kib [Tue, 16 Jul 2013 20:14:23 +0000 (20:14 +0000)]
Add a tunable to force disable MSI use for xhci(4).

Requested and tested by: delphij
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoRegen.
andrew [Tue, 16 Jul 2013 19:20:50 +0000 (19:20 +0000)]
Regen.

10 years ago2 years, 10 months, 22 days after the projects/arm_eabi branch was created
andrew [Tue, 16 Jul 2013 19:15:19 +0000 (19:15 +0000)]
2 years, 10 months, 22 days after the projects/arm_eabi branch was created
make the ARM EABI the default ABI on arm, armeb, armv6 and armv6eb.

This is intended to be the default ABI from now on with the old ABI to be
retired. Because of this all users are strongly suggested to upgrade to the
ARM EABI.

As the two ABIs are incompatible it is unlikely upgrading in place will
work. Users should perform a full backup and either use an external machine
to upgrade, or install to an alternative location on their media. They
should also reinstall all ports or packages when these are available.

The only known issues are:
 - pkg incorrectly detects the ABI. This is fixed upstream, and will a
   patch will be made to the port.
 - GDB can have issues with executables built with clang.

__FreeBSD_version has been bumped.

10 years agoFree the non-fatal "timestamp missing" debug string manually as it is
andre [Tue, 16 Jul 2013 16:37:08 +0000 (16:37 +0000)]
Free the non-fatal "timestamp missing" debug string manually as it is
not covered by the catch-all free for the error cases.

Found by: Coverity

10 years agoDo not throw an error if the user requests to activate the image from
jimharris [Tue, 16 Jul 2013 15:45:37 +0000 (15:45 +0000)]
Do not throw an error if the user requests to activate the image from
an empty firmware slot, as long as the user has specified a firmware
image to download into the empty firmware slot.

Sponsored by: Intel
Reported by: Joe Golio <joseph.golio@emc.com>
MFC after: 3 days

10 years agoWorkaround some broken BIOSes that specify edge-sensitive but active-low
jhb [Tue, 16 Jul 2013 14:42:16 +0000 (14:42 +0000)]
Workaround some broken BIOSes that specify edge-sensitive but active-low
settings for ACPI-enumerated serial ports by forcing any IRQs that use
an ISA IRQ value with these settings to active-high instead of active-low.

This is known to occur with the BIOS on an Intel D2500CCE motherboard.

Tested by: Robert Ames <robertames@hotmail.com>, lev
Submitted by: Juergen Weiss weiss at uni-mainz.de (original patch)

10 years agoSweep unused nlist entries.
glebius [Tue, 16 Jul 2013 12:22:36 +0000 (12:22 +0000)]
Sweep unused nlist entries.

Sponsored by: Nginx, Inc.

10 years agoNeed to define NO_MAN here.
kevlo [Tue, 16 Jul 2013 09:40:59 +0000 (09:40 +0000)]
Need to define NO_MAN here.

10 years agoUse MAN= instead of NO_MAN=
kevlo [Tue, 16 Jul 2013 09:38:51 +0000 (09:38 +0000)]
Use MAN= instead of NO_MAN=

For some reason it still tries to install a priv.1 when using NO_MAN,
even though there isn't one yet.

10 years agoAdd missing header needed by sleep(3).
kevlo [Tue, 16 Jul 2013 09:22:50 +0000 (09:22 +0000)]
Add missing header needed by sleep(3).

10 years agolibc: name passed into __setenv is not necessarily NUL-terminated
avg [Tue, 16 Jul 2013 07:26:46 +0000 (07:26 +0000)]
libc: name passed into __setenv is not necessarily NUL-terminated

That's particularly true when __setenv is called from __merge_environ.

MFC after: 4 days

10 years agoAdd urtwnfw.
rpaulo [Tue, 16 Jul 2013 06:43:37 +0000 (06:43 +0000)]
Add urtwnfw.

10 years agoSilent warnings.
kevlo [Tue, 16 Jul 2013 03:12:31 +0000 (03:12 +0000)]
Silent warnings.

10 years agoAdd -n flag for compatibility with Linux version of mount(8).
rmh [Mon, 15 Jul 2013 21:57:21 +0000 (21:57 +0000)]
Add -n flag for compatibility with Linux version of mount(8).

Reviewed by: freebsd-fs, eadler, mckusick, jh, wblock

10 years agoMake some improvements to r253322 to really rescan target, not a bus.
mav [Mon, 15 Jul 2013 18:17:31 +0000 (18:17 +0000)]
Make some improvements to r253322 to really rescan target, not a bus.
Add there and in two more places checks for NULL on xpt_alloc_ccb_nowait().

10 years agoFix an argument reversal in calls to scsi_read_element_status().
ken [Mon, 15 Jul 2013 16:38:48 +0000 (16:38 +0000)]
Fix an argument reversal in calls to scsi_read_element_status().

Reported by: Ulrich Spoerlein <uqs@FreeBSD.org>
MFC after: 3 days

10 years agoInclude sys/systm.h after sys/param.h.
ae [Mon, 15 Jul 2013 15:40:57 +0000 (15:40 +0000)]
Include sys/systm.h after sys/param.h.

Suggested by: pluknet

10 years agoAdd IBM ServeRAID M5110 to the hardware list.
pluknet [Mon, 15 Jul 2013 14:28:59 +0000 (14:28 +0000)]
Add IBM ServeRAID M5110 to the hardware list.
This is a rebranded MegaRAID SAS 2208 [Thunderbolt] found e.g. on x3550 M4.

Reported by: Ilia Noskov <noskov@nic.ru>
MFC after: 3 days

10 years agoNuke mbstat. It wasn't used for mbuf statistics since FreeBSD 5.
glebius [Mon, 15 Jul 2013 12:18:36 +0000 (12:18 +0000)]
Nuke mbstat. It wasn't used for mbuf statistics since FreeBSD 5.

Now that r253351 moved sendfile() stats to a separate struct, the
last field used in mbstat is m_mcfail, which is updated, but never
read or obtained from userland.

10 years agoNuke "systat -mbuf". It was broken since FreeBSD 5, and since there
glebius [Mon, 15 Jul 2013 12:15:14 +0000 (12:15 +0000)]
Nuke "systat -mbuf". It was broken since FreeBSD 5, and since there
haven't been any complaints, no one used it.

10 years agoWhen stopping pfsync, remove the pfsync interface's syncpeer setting.
des [Mon, 15 Jul 2013 08:48:45 +0000 (08:48 +0000)]
When stopping pfsync, remove the pfsync interface's syncpeer setting.

MFC after: 3 days

10 years agoMove the Raspberry Pi low level options out of the kernel config and into
rpaulo [Mon, 15 Jul 2013 07:01:30 +0000 (07:01 +0000)]
Move the Raspberry Pi low level options out of the kernel config and into
std.rpi + std.bcm2835.

Reviewed by: imp

10 years agoMFi386: add ddb "show sysregs" command.
kib [Mon, 15 Jul 2013 06:30:57 +0000 (06:30 +0000)]
MFi386: add ddb "show sysregs" command.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoIntroduce new structure sfstat for collecting sendfile's statistics
ae [Mon, 15 Jul 2013 06:16:57 +0000 (06:16 +0000)]
Introduce new structure sfstat for collecting sendfile's statistics
and remove corresponding fields from struct mbstat. Use PCPU counters
and SFSTAT_INC() macro for update these statistics.

Discussed with: glebius

10 years agoFix compiler warnings.
hrs [Mon, 15 Jul 2013 05:09:13 +0000 (05:09 +0000)]
Fix compiler warnings.

10 years agoDocument options for .eli devices.
hrs [Mon, 15 Jul 2013 03:50:14 +0000 (03:50 +0000)]
Document options for .eli devices.

Submitted by: ADAM David Alan Martin

10 years agoPR: kern/168520
rodrigc [Mon, 15 Jul 2013 01:41:34 +0000 (01:41 +0000)]
PR: kern/168520

Revert GRN 253255.  It is not needed now that GRN 253346 is committed.

10 years agoPR: 168520 170096
rodrigc [Mon, 15 Jul 2013 01:32:55 +0000 (01:32 +0000)]
PR: 168520 170096
Submitted by: adrian, zec

Fix multiple kernel panics when VIMAGE is enabled in the kernel.
These fixes are based on patches submitted by Adrian Chadd and Marko Zec.

(1)  Set curthread->td_vnet to vnet0 in device_probe_and_attach() just before calling
     device_attach().  This fixes multiple VIMAGE related kernel panics
     when trying to attach Bluetooth or USB Ethernet devices because
     curthread->td_vnet is NULL.

(2)  Set curthread->td_vnet in if_detach().  This fixes kernel panics when detaching networking
     interfaces, especially USB Ethernet devices.

(3)  Use VNET_DOMAIN_SET() in ng_btsocket.c

(4)  In ng_unref_node() set curthread->td_vnet.  This fixes kernel panics
     when detaching Netgraph nodes.

10 years agoUpdate fuse_kernel header.
pfg [Mon, 15 Jul 2013 00:05:27 +0000 (00:05 +0000)]
Update fuse_kernel header.

Bring in the changes from the FUSE kernel interface 7.10
(available under a BSD license).

After 7.10 the linux FUSE developers added support for a
controversial CUSE driver and some linux especific
features that are unlikely to find its way into FreeBSD.

We currently don't implement any of the new features so we
are *not* bumping the FUSE_KERNEL_MINOR_VERSION. The header
should, nevertheless, serve  as a template to add the new
features in a compatible manner.

While here adopt some minor cleanups from the upstream version
like removing FUSE_MAJOR and FUSE_MINOR which were never
used. Also add multiple inclusion header guards,

10 years agoFix a grammatical error.
rpaulo [Sun, 14 Jul 2013 20:22:16 +0000 (20:22 +0000)]
Fix a grammatical error.

10 years agoUpdate to comments describing block allocation policy.
mckusick [Sun, 14 Jul 2013 18:44:33 +0000 (18:44 +0000)]
Update to comments describing block allocation policy.

Submitted by: Bruce Evans

10 years agoRevert r252725 as it breaks WPA.
rpaulo [Sun, 14 Jul 2013 18:26:47 +0000 (18:26 +0000)]
Revert r252725 as it breaks WPA.

We need to fix wpa_supplicant because it checks whether the card has
ic_cryptocaps set. Since net80211 can do software encryption this check in
wpa_supplicant is wrong.

10 years agoAdd some missing definitions to build a working FreeBSD's libusb under Linux.
hselasky [Sun, 14 Jul 2013 10:22:00 +0000 (10:22 +0000)]
Add some missing definitions to build a working FreeBSD's libusb under Linux.

10 years agoAdd some missing LIBUSB IOCTL conversion codes.
hselasky [Sun, 14 Jul 2013 10:13:01 +0000 (10:13 +0000)]
Add some missing LIBUSB IOCTL conversion codes.

10 years agoRe-implement $probe_only aspect of f_media_get_TYPE() (where TYPE is cdrom,
dteske [Sun, 14 Jul 2013 03:08:52 +0000 (03:08 +0000)]
Re-implement $probe_only aspect of f_media_get_TYPE() (where TYPE is cdrom,
nfs, ftp, http, httpproxy, etc.) and f_device_get() (abstract method for
calling aforementioned f_media_get_TYPE()).

Previously, if $probe_only was present and non-NULL, the TYPE functions
would check for $file and exit with an appropriate error status (success if
the file exists and readable, failure otherwise).

While this has been retained, a pair of globals has been introduced:
$PROBE_EXIST and $PROBE_SIZE (see `/usr/share/bsdconfig/media/common.subr')

The $PROBE_EXIST global can be used where you need the functionality of
simply testing for existence (previously the _only_ functionality).

Meanwhile, the new $PROBE_SIZE global can be used to cause the TYPE function
to print the size of the file (in bytes) on standard-out (or -1) if not
found or an error occurs. NOTE: If an error occurs, it is logged with the
dprintf function, which is visible with `-d' flag or debug=1.

In many cases, where you need to get the size of a file _and_ check for its
existence, you can use the return status of a $PROBE_SIZE call.

10 years agoAllow regular off-the-shelf keyboards to be overclocked like so-called
hselasky [Sat, 13 Jul 2013 22:39:56 +0000 (22:39 +0000)]
Allow regular off-the-shelf keyboards to be overclocked like so-called
"Gamers Keyboards" by adding a tunable, "hw.usb.ukbd.pollrate", which
can fix the polling rate of the attached USB keyboards in the range
1..1000Hz. A similar feature already exists in the USB mouse
driver. Use with care! Might leave you without keyboard input. This
feature is only available when the USB_DEBUG option is set in the
kernel configuration file.

Correct "unit" type to "int" while at it.

10 years agoAdd creation timestamp (birthtime) support for fuse.
pfg [Sat, 13 Jul 2013 22:06:41 +0000 (22:06 +0000)]
Add creation timestamp (birthtime) support for fuse.

I was keeping this #ifdef'd for reference with the MacFUSE change[1]
but on second thought, this is a FreeBSD-only header so the SVN
history should be enough.

Add missing padding while here.

Reference [1]:
http://code.google.com/p/macfuse/source/detail?spec=svn1686&r=1360

10 years agoWhen fiddling with options of which registers to copy out for
mjacob [Sat, 13 Jul 2013 21:24:25 +0000 (21:24 +0000)]
When fiddling with options of which registers to copy out for
a mailbox command and which registers to copy back in when
the command completes, the bits being set need to not only
specify what bits you want to add from the default from the
table but also what bits you want *subtract* (mask) from the
default from the table.

A failing ISP2200 command pointed this out.

Much appreciation to: marius, who persisted and narrowed down what
the failure delta was, and shamed me into actually fixing it.
MFC after: 1 week

10 years agoCreate a proper stack frame for i386 version of bcopy(), despite the
kib [Sat, 13 Jul 2013 19:42:52 +0000 (19:42 +0000)]
Create a proper stack frame for i386 version of bcopy(), despite the
function is leaf.  The frame allows ddb to not loose the direct caller
of bcopy() in backtrace.

Other functions from support.s would benefit from the same change as
well, but for now bcopy() is the most frequent offender.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAssert that runningbufspace does not underflow.
kib [Sat, 13 Jul 2013 19:36:18 +0000 (19:36 +0000)]
Assert that runningbufspace does not underflow.

Sponsored by: The FreeBSD Foundation