Commit Graph

194285 Commits

Author SHA1 Message Date
hselasky
bb0a5fd29c MFC r259023 and r259095:
Improve the XHCI command timeout recovery handling code.
Fix some typos while at it.
2013-12-19 07:13:59 +00:00
truckman
fec40af990 MFC r258629, 258662:
r258629:
  Mention that devd will kldload the driver when the device is connected.

  Mention that the automatic mode switch from umass to u3g needed by some
  devices does not work unless the driver is loaded before the device is
  connected.

r258662 (by joel):
  mdoc: sort sections.
2013-12-19 07:12:34 +00:00
truckman
7331967f0c Regenerate after
r255238, r257044, r259453 (if_run)
	r255128 (ng_ubt)
	r259592 (u3g)
2013-12-19 06:39:48 +00:00
truckman
f4127526eb MFC r258363:
Add alternate ID for Novatel MiFi 2200 CDMA, which is used by my
Virgin Mobile branded device.  It needs the U3GINIT_SCSIEJECT quirk.
2013-12-19 05:36:06 +00:00
pfg
979b5f4974 MFC r258731:
gcc: Make use of TREE_OVERFLOW_P.

While it was brought in r258179 only to fix a build issue,
bringing the rest of the change has the advantage of fixing
GCC/19978.

Obtained from:	gcc 4.3 (rev. 120505; GPLv2)
2013-12-19 02:39:11 +00:00
pfg
43e2502361 MFC r258651, r258943:
gcc: Altivec register adjustments from Apple.
gcc: On rs6000 update sp_offset depending only on size.

Tested by:		Justin Hibbits
Obtained from:		gcc pre-4.3 (rev. 124763, 125116; GPLv2)
2013-12-19 02:32:07 +00:00
rodrigc
7d03904849 MFC r259571:
Add SVN revision numbers for Mellanox updates.

MFC r259573:

  Add SVN revision numbers for Chelsio updates.

MFC r259574:

  Indent.
2013-12-18 21:49:17 +00:00
pfg
6f93e9ad10 MFC r258428, r258445
gcc: another round of merges from the gcc pre-43 branch.

Bring The following revisions from the gcc43 branch[1]:

118360, 118361, 118363, 118576, 119820,
123906, 125246, and 125721.

They all have in common that the were merged long ago
into Apple's gcc and should help improve the general
quality of the compiler and make it easier to bring
new features from Apple's gcc42.

For details please review the additions to the files:
gcc/ChangeLog.gcc43
gcc/cp/ChangeLog.gcc43 (new, adds previous revisions)

Fix crosscompilation (r258445 by andreast)
Reference:
[1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700

Obtained from:	gcc pre4.3 (GPLv2) branch
MFC after:	3 weeks
2013-12-18 19:07:29 +00:00
glebius
a70f2adf57 Merge r256868,257276-257277,257515,257913 from head. These are fixes
required to make Xen buтldable w/o INET.

Sponsored by:	Nginx, Inc.
2013-12-18 05:20:53 +00:00
grehan
e704ad0c2f MFC r259302,r259413
r259302
  bhyve(8) man page

r259413
  mdoc: sort SEE ALSO
2013-12-18 03:51:04 +00:00
gjb
4dddfdac35 MFC r259426, r259427:
r259426:
  Add a pkg(8) repository configuration file for cdrom-based package
  installation.

  As part of the 'pkg-stage' target, copy the configuration file
  to the 'packages/repos/' directory on the DVD filesystem.

r259427:
  Export 'REPOS_DIR' when the selected source medium for package
  installation is cdrom.  This enables bsdconfig(8) to make use
  of the on-disc pkg(8) repository configuration, which fixes
  package selection and installation from the dvd installer.

Sponsored by:	The FreeBSD Foundation
2013-12-18 01:14:25 +00:00
kib
2c4d831850 MFC DMAR busdma implementation.
MFC r257251:
Import the driver for VT-d DMAR hardware.  Implement the busdma(9) using DMARs.

MFC r257512:
Add support for queued invalidation.

MFC miscellaneous follow-ups to r257251.

MFC r257266:
Remove redundand assignment to error variable and check for its value.

MFC r257308:
Remove redundand declaration.

MFC r257511:
Return BUS_PROBE_NOWILDCARD from the DMAR probe method.

MFC r257860,r257896,r257900,r257902,r257903 (by dim):
Fixes for gcc compilation.
2013-12-17 13:49:35 +00:00
kib
3219a81518 MFC r257230:
Add a virtual table for the busdma methods on x86, to allow different
busdma implementations to coexist.
2013-12-17 13:39:50 +00:00
kib
5a15f697f5 MFC r257228:
Add bus_dmamap_load_ma() function to load map with the array of
vm_pages.
2013-12-17 13:38:21 +00:00
kib
3e0674d807 MFC r257541:
Fix several issues with the busdma(9) KPI use in the e1000 drivers.
2013-12-17 13:18:41 +00:00
kib
293c11687e MFC r258088:
Add check for buflen overflow by comparing the buflen with both offset
and resid.

MFC r258397:
Redo r258088 to avoid relying on signed arithmetic overflow.
2013-12-17 13:10:28 +00:00
kib
758e3a9934 MFC r258039:
Avoid overflow for the page counts.

MFC r258365:
Revert back to use int for the page counts.
Rearrange the checks to correctly handle overflowing address arithmetic.
2013-12-17 09:21:56 +00:00
rodrigc
e5df7f0316 MFC r259493:
Add OFED and Mellanox items to release notes.

  Submitted by: Meny Yossefi <menyy mellanox com>

MFC r259490:

  Add release note items from Chelsio.

  Submitted by: np
2013-12-17 04:26:20 +00:00
gjb
f7dc3ae900 MFC r258770 (hrs):
Add NOPKG to disable pkg-stage.

Sponsored by:	The FreeBSD Foundation
2013-12-17 04:16:20 +00:00
gjb
ab0c996d3f MFC r259246:
Prevent release build errors found during snapshot builds where if
  NOPORTS=1, pkg-stage.sh cannot build the ports-mgmt/pkg port if
  WITH_DVD=1.

Sponsored by:	The FreeBSD Foundation
2013-12-17 03:46:44 +00:00
asomers
34ade72d5f MFC r258311
opensolaris/uts/common/dtrace/fasttrap.c
        Fix several problems that can cause panics on kldload and kldunload.

        * kproc_create(fasttrap_pid_cleanup_cb, ...) gets called before
          fasttrap_provs.fth_table gets allocated.  This can lead to a panic
          on module load, because fasttrap_pid_cleanup_cb references
          fasttrap_provs.fth_table.  Move kproc_create down after the point
          that fasttrap_provs.fth_table gets allocated, and modify the error
          handling accordingly.

        * dtrace_fasttrap_{fork,exec,exit} weren't getting NULLed until
          after fasttrap_provs.fth_table got freed.  That caused panics on
          module unload because fasttrap_exec_exit calls
          fasttrap_provider_retire, which references
          fasttrap_provs.fth_table.  NULL those function pointers earlier.

        * There wasn't any code to destroy the
          fasttrap_{tpoints,provs,procs}.fth_table mutexes on module unload,
          leading to a resource leak when WITNESS is enabled.  Destroy those
          mutexes during fasttrap_unload().

Sponsored by:	Spectra Logic Corporation
2013-12-16 19:59:34 +00:00
nwhitehorn
d72da1522e MFC r258819,258928:
Add new sysctl, kern.supported_archs, containing the list of FreeBSD
MACHINE_ARCH values whose binaries this kernel can run. This patch provides
a feature requested for implementing pkgng ABI identifiers in a robust
way.

The list is designed to indicate whether, say, an i386 package can be run on
the current system. If kern.supported_abis contains "i386", then the answer
is yes. Otherwise, the answer is no.

At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we
gain support for more interesting combinations, this needs to become more
flexible, possibily through the sysent framework, along with the
hw.machine_arch emulation immediately preceding this code in kern_mib.c.

Reviewed by:	imp
2013-12-16 15:00:06 +00:00
hselasky
607fc1b0bd MFC r256718, r257410 and r257411:
- Fix RF registers for RT3070.
- Initialize BBP68 to improve RX sensitivity.
- Add RT2860_BCN_OFFSET1 and RT2860_MAX_LEN_CFG register initialization to
match with the vendor driver. While here, remove unused RT2860_DEF_MAC
definition.
2013-12-16 09:48:08 +00:00
hselasky
4d2c5784a5 MFC r238274, r246752, r256720, r256721, r256722, r256955, r257409
r257429, r257435, r257712, r257732, r257743, r257748, r257955
 r257957, r257958, r258082, r258641, r258643, r258732, r258733,
 r258840, r258919, r258921, r259029, r259030, r259031, r259032 and r259046:

- Add support for the MediaTek/Ralink RT5370/RT5372 chipset.
- Various minor USB WLAN fixes and improvements.

PR:     usb/182936
2013-12-16 08:10:38 +00:00
delphij
a12532878e MFC r258950:
Enable Hyper-V support in i386 GENERIC.
2013-12-16 06:41:31 +00:00
bjk
638d19cdfc MFC r259286,259424,259425:
Apply patch from upstream Heimdal for encoding fix

  RFC 4402 specifies the implementation of the gss_pseudo_random()
  function for the krb5 mechanism (and the C bindings therein).
  The implementation uses a PRF+ function that concatenates the output
  of individual krb5 pseudo-random operations produced with a counter
  and seed.  The original implementation of this function in Heimdal
  incorrectly encoded the counter as a little-endian integer, but the
  RFC specifies the counter encoding as big-endian.  The implementation
  initializes the counter to zero, so the first block of output (16 octets,
  for the modern AES enctypes 17 and 18) is unchanged.  (RFC 4402 specifies
  that the counter should begin at 1, but both existing implementations
  begin with zero and it looks like the standard will be re-issued, with
  test vectors, to begin at zero.)

  This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6,
  from 13 October, 2013:
  % Fix krb5's gss_pseudo_random() (n is big-endian)
  %
  % The first enctype RFC3961 prf output length's bytes are correct because
  % the little- and big-endian representations of unsigned zero are the
  % same.  The second block of output was wrong because the counter was not
  % being encoded as big-endian.
  %
  % This change could break applications.  But those applications would not
  % have been interoperating with other implementations anyways (in
  % particular: MIT's).

Bump __FreeBSD_version accordingly and add a note in UPDATING.

Approved by:	hrs (mentor, src committer)
2013-12-16 02:04:28 +00:00
eadler
607f8e622d MFC r259132,r259133,r259143:
Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'
	as a case insensitive flag.

	Add regression test for recently added 'i' flag in r259132.

	the i modifier was added in r259132 since POSIX recently agreed to add
	it. Switch uses of /I to /i.

PR:		standards/184641
2013-12-16 01:20:18 +00:00
pfg
45fa9cf452 MFC r258530;
libcpp: Keep a record of changes from upstream GCC (pre-43).
2013-12-15 04:27:49 +00:00
pfg
81b5297878 MFC rr258501, r258507;
gcc: Bring updates from Google's enhanced gcc-4.2.1.

Google released and enhanced version of gcc-4.2.1 plus their local
patches for Android[1].

The patches are owned by Google and the license hasn't been changed
from  the original GPLv2. We are only bringing a subset of the
available patches that may be helpful in FreeBSD, in other words,
changes specific to android are not included.

From the README.google file[1].

Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1:

gcc/Makefile.in
gcc/c-common.c
gcc/c-common.h
gcc/c-opts.c
gcc/c-typeck.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/flags.h
gcc/opts.c
gcc/tree-flow.h
gcc/tree-ssa-alias-warnings.c
gcc/tree-ssa-alias.c

 Backport of -Wstrict-aliasing from mainline.
  Silvius Rus <rus@google.com>

gcc/coverage.c:
  Patch coverage_checksum_string for PR 25351.
  Seongbae Park <spark@google.com>
  Not yet submitted to FSF.

gcc/c-opts.c
gcc/c-ppoutput.c
gcc/c.opt
gcc/doc/cppopts.texi
libcpp/Makefile.in
libcpp/directives-only.c
libcpp/directives.c
libcpp/files.c
libcpp/include/cpplib.h
libcpp/init.c
libcpp/internal.h
libcpp/macro.c
  Support for -fdirectives-only.
  Ollie Wild <aaw@google.com>.
  Submitted to FSF but not yet approved.

libstdc++-v3/include/ext/hashtable.h
  http://b/742065
  http://b/629994
  Reduce min size of hashtable for hash_map, hash_set from 53 to 5

libstdc++-v3/include/ext/hashtable.h
  http://b/629994
  Do not iterate over buckets if hashtable is empty.

gcc/common.opt
gcc/doc/invoke.texi
gcc/flags.h
gcc/gimplify.c
gcc/opts.c
  Add Saito's patch for -finstrument-functions-exclude-* options.

gcc/common.opt
gcc/doc/invoke.texi
gcc/final.c
gcc/flags.h
gcc/opts.c
gcc/testsuite/gcc.dg/Wframe-larger-than.c
  Add a new flag -Wframe-larger-than- which enables a new warning
  when a frame size of a function is larger than specified.
  This patch hasn't been integrated into gcc mainline yet.

gcc/tree-vrp.c
  Add a hack to avoid using ivopts information for pointers starting
  at constant values.

Reference:

[1]
https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/

Obtained from:	Google Inc.
2013-12-15 03:47:31 +00:00
gjb
452ca0b4a4 MFC r259400:
Reduce disc1.iso size by 74MB by removing lib32 libraries, sendmail,
  and atf.

Sponsored by:	The FreeBSD Foundation
2013-12-14 22:43:30 +00:00
gjb
e88772b06f MFC r256430:
Reduce disc1.iso image size by installing the userland with
  the WITHOUT_PROFILE=1 option set, trimming 56MB from the image.

This change was somehow lost during the 10.0-RELEASE cycle, and
is intended for MFC to releng/10.0.

Sponsored by:	The FreeBSD Foundation
2013-12-14 22:39:01 +00:00
gjb
1948707197 MFC r259113, r259115, r259144, r259148:
r259113 (dteske):
  Fix failed attempt to send pkg(8) stderr to /dev/null

r259115 (dteske):
  Prevent truncating /tmp/bsdinstall_log each time we
  exec a module.

r259144 (dteske):
  Fix a regression after successfully installing to encrypted
  ZFS root, the passphrase is not accepted and a message about
  "incorrect key" is displayed.

r259148 (dteske):
  Fix a regression resulting in mountroot prompt after attempting
  to install to encrypted ZFS root (caused by a typo in a
  variable name -- ZFSBOOT_BOOT_FSNAME -> ZFSBOOT_BOOTFS_NAME).

Sponsored by:	The FreeBSD Foundation
2013-12-14 20:55:53 +00:00
ae
1277739e09 MFC r257987:
Initialize prot variable.

  PR:		177417
2013-12-14 04:24:32 +00:00
ae
a210965c36 MFC r257965:
Add missing line breaks.

  PR:		181900
2013-12-14 04:16:27 +00:00
ian
38c5c4197f MFC r259212, r259220:
Fix one race and one fence post error. When the TX buffer was
  completely full, we'd not complete any of the mbufs due to the fence
  post error (this creates a large leak). When this is fixed, we still
  leak, but at a much smaller rate due to a race between ateintr and
  atestart_locked as well as an asymmetry where atestart_locked is
  called from elsewhere.  Ensure that we free in-flight packets that
  have completed there as well. Also remove needless check for NULL on
  mb, checked earlier in the loop and simplify a redundant if.
2013-12-14 01:35:57 +00:00
ian
6af39cbc39 MFC r259038, r259039:
Bump the maximum VM space from 3 * memory size to a fixed
  256MB. That's all we have room for since we map the hardware registers
  starting at 0xd0000000. This allows my 64MB AT91SAM9G20 to boot again
  after the unmmaped I/O changes were MFC'd at r251897. Other
  subplatforms may need similar treatment.

  Although not strictly required to boot a 64MB board, bump
  vm_max_virtual_address to be KERNVIRTADDR + 256MB. This allows some
  future shock protection since the KVA requirements have gone up since
  the unmapped changes have gone in, as well as preventing us from
  overlapping with the hardware devices, which we map at 0xd0000000,
  which we'd hit with anything more than 85MB...
2013-12-14 01:34:24 +00:00
ian
47bb9f823b MFC r258828:
Add a nand flash controller driver for Atmel at91 family.  Tested only
  on at91rm9200 so far.
2013-12-14 01:15:26 +00:00
ian
cbcef6d7b5 MFC r258820: Add definitions for the PIO pins found on recent AT91 SoCs. 2013-12-14 01:14:38 +00:00
ian
b37938a4e4 MFC r258392, r258412:
Call cpu_setup() immediately after the page tables are installed.  This
  enables data cache and other chip-specific features.  It was previously
  done via an early SYSINIT, but it was being done after pmap and vm setup,
  and those setups need to use mutexes.  On some modern ARM platforms,
  the ldrex/strex instructions that implement mutexes require the data cache
  to be enabled.

  Call cpu_setup() from the initarm() routine on platforms that don't use
  the common FDT-aware initarm() in arm/machdep.c.
2013-12-14 01:12:13 +00:00
ian
1185e66967 MFC r258393:
Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes.
2013-12-14 00:59:40 +00:00
ian
c3017e9225 MFC r258356:
Bugfixes... the host capabilties from FDT data are stored in host.caps, not
  host.host_ocr, examine the correct field when setting up the hardware.  Also,
  the offset for the capabilties register should be 0x140, not 0x240.
2013-12-14 00:58:13 +00:00
ian
af5e386ba3 MFC r258240:
In the data abort handler, don't panic if kdb is available and says it
  handled the condition.
2013-12-14 00:57:05 +00:00
ian
c6dcd8817f MFC r258740:
Look up a nand chip by id in the static table before trying to obtain
  ONFI parameters.  This allows a static table entry to provide valid data
  for chips known to provide invalid ONFI data.
2013-12-14 00:55:34 +00:00
ian
8b635cded3 MFC r257892, r258196, r258197, r258199, r258200, r258201, r258202:
Add ONFI signature check.

  Add Micron chip found in Freescale Vybrid Family Phytec COSMIC board.

  The vendor specified field is 88 bytes, not 8 bytes.

  Update the onfi_params struct to ONFI revision 3.2 (06 12 2013).

  Search for and validate the ONFI params as specified in the standard.

  ONFI parameters are little-endian, hence we must take care to convert them
  to native endianness.  We must also pay attention to unaligned accesses.

  Rework the routine that returns a pointer to the table of software ECC
  byte positions within the OOB area to support chips with unusual OOB
  sizes such as 218 or 224 bytes.
2013-12-14 00:54:05 +00:00
ian
3360970b01 MFC r258076, r258077:
This fixes 3 problems in syslogd related to sizing receive buffers...

  - A call was misplaced at the wrong level of nested if blocks, so that
    the buffers for unix domain sockets (/dev/log, /dev/klog) were never
    increased at all; they remained at a way-too-small default size of 4096.

  - The function that was supposed to double the size of the buffer
    sometimes did nothing, and sometimes installed a wildly-wrong buffer
    size (either too large or too small) due to an unitialized 'slen'
    variable passed to getsockopt().  Most often it doubled the UDP buffers
    from 40k to 80k because accidentally there would be harmless stack
    garbage in the unitialized variables.

  - The whole concept of blindly doubling a socket's buffer size without
    knowing what size it started at is a design flaw that has to be called a
    bug.  If the double_rbuf() function had worked at all (I.E., if the
    other two bugs didn't exist) this would lead to UDP sockets having an
    80k buffer while unix dgram sockets get an 8k buffer.  There's nothing
    about the problem being solved that requires larger buffers for UDP than
    for unix dgram sockets -- the buffering requirements are the same
    regardless of socket type.

  This change renames the double_rbuf() function to increase_rbuf() and
  increases the buffer size on all types of sockets to 80k.  80k was
  chosen only because it appears to be the size the original change was
  shooting for, and it certainly seems to be reasonably large (I might
  have picked 64k in the absence of any historical guidance).

  Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially
  transient and shouldn't result in closing the socket and giving up forever.
2013-12-14 00:25:57 +00:00
ian
2c66a0246a MFC r257924:
Apparently with "const uint32_t foo = 0x60;" gcc doesn't consider 'foo'
  to be a constant integer suitable for use in a case label, so use #defines.
2013-12-14 00:23:43 +00:00
ian
f1d49f684d MFC r257669, r257672, r257673, r257676, r257678:
Call initarm_lastaddr() later in the init sequence, after establishing
  static device mappings, rather than as the first of the initializations
  that a platform can hook into.  This allows a platform to allocate KVA
  from the top of the address space downwards for things like static device
  mapping, and return the final "last usable address" result after that and
  other early init work is done.

  Because some platforms were doing work in initarm_lastaddr() that needs to
  be done early, add a new initarm_early_init() routine and move the early
  init code to that routine on those platforms.

  Make PTE_DEVICE a synonym for PTE_NOCACHE on armv4, to make it easier to
  share the same code on both architectures.

  Add new helper routines for arm static device mapping.  The new code
  allocates kva space from the top down for the device mappings and builds
  entries in an internal table which is automatically used later by
  arm_devmap_bootstrap().  The platform code just calls the new
  arm_devmap_add_entry() function as many times as it needs to (up to 32
  entries allowed; most platforms use 2 or 3 at most).

  Remove imx local devmap code and use the essentially identical common
  code that got moved from imx_machdep.c to arm/devmap.c.
2013-12-14 00:16:08 +00:00
ian
eae48ec05e MFC r257648, r257649, r257660:
Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring
  out common code related to mapping device memory into a new devmap.c file.

  Remove the growing duplication of code that used pmap_devmap_find_pa() and
  then did some math with the returned results to generate a virtual address,
  and likewise in reverse to get a physical address.  Now there are a pair
  of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that.  The
  bus_space_map() implementations are rewritten in terms of these.

  Move remaining code and data related to static device mapping into the
  new devmap.[ch] files.  Emphasize the MD nature of these things by using
  the prefix arm_devmap_ on the function and type names (already a few of
  these things found their way into MI code, hopefully it will be harder to
  do by accident in the future).
2013-12-13 23:56:53 +00:00
ian
689fd5c390 MFC r257639:
Remove the duplicated implementations of some bus_space functions and use
  the essentially identical generic implementations instead.  The generic
  implementations differ only in the spelling of a couple variable names
  and some formatting differences.
2013-12-13 23:07:22 +00:00
ian
55d93a867d MFC r257603, r257604:
Rename WANDBOARD-COMMON to WANDBOARD.common and adjust the configs that
  include it accordingly.  The build machinery for universe and tinderbox
  tries to build every kernel config whose name begins and ends with [A-Z0-9]
  and the common include file that has most of the options isn't buildable
  by itself, so the new lowercase .common will avoid building it.
2013-12-13 22:52:59 +00:00