]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoBump FreeBSD_version due to changed header for strcasecmp(3) family.
Pedro F. Giffuni [Fri, 30 May 2014 20:56:28 +0000 (20:56 +0000)]
Bump FreeBSD_version due to changed header for strcasecmp(3) family.

In r266865, strcasecmp_l() and strncasecmp_l() were moved from
<string.h> to <strings.h> for POSIX 2008 compliance.

Requested by: linimon

10 years agoUpdate default callchain depth to 16 to match kernel
Ed Maste [Fri, 30 May 2014 20:12:47 +0000 (20:12 +0000)]
Update default callchain depth to 16 to match kernel

MFC after: 1 week

10 years agoAdd missing libexec/bsdconfig subdirectories
Ed Maste [Fri, 30 May 2014 19:45:21 +0000 (19:45 +0000)]
Add missing libexec/bsdconfig subdirectories

10 years agoAllocate a zeroed LDT.
Neel Natu [Fri, 30 May 2014 18:59:37 +0000 (18:59 +0000)]
Allocate a zeroed LDT.

Failing to do this might result in the LDT appearing to run out of free
descriptors because of random junk in the descriptor's 'sd_type' field.

http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html

Reviewed by: kib
MFC after: 2 weeks

10 years agoEnable a login console on ttyu0 by default if it is a serial console. This
Nathan Whitehorn [Fri, 30 May 2014 16:53:53 +0000 (16:53 +0000)]
Enable a login console on ttyu0 by default if it is a serial console. This
prevents surprising effects post-installation on serial-only x86 systems
(e.g. bhyve) where the kernel messages will appear, rc scripts will run,
and then there will be no login prompt and you will be locked out of the
system.

Thanks to Devin Teske and Peter Grehan for ideas and testing. With this
patch, it may also be possible to unify all or most of the machine-specific
ttys files.

10 years agoUse own memory pool of 128K until further, hence that works the best.
Hans Petter Selasky [Fri, 30 May 2014 16:49:12 +0000 (16:49 +0000)]
Use own memory pool of 128K until further, hence that works the best.

Sponsored by: DARPA, AFRL

10 years agoAdd optional support for USB to BERI loader. Fix the linker script so
Hans Petter Selasky [Fri, 30 May 2014 16:47:54 +0000 (16:47 +0000)]
Add optional support for USB to BERI loader. Fix the linker script so
that the garbage collection feature can be used when linking.

Sponsored by: DARPA, AFRL

10 years agoIt appears the ISP/SAF1761 sometimes is busy when reading the status
Hans Petter Selasky [Fri, 30 May 2014 16:44:03 +0000 (16:44 +0000)]
It appears the ISP/SAF1761 sometimes is busy when reading the status
word of the PTD and simply returns a value of zero. Retry a few times
before giving up.

Sponsored by: DARPA, AFRL

10 years agoUse callout_*() rather than timeout()/untimeout().
John Baldwin [Fri, 30 May 2014 15:46:10 +0000 (15:46 +0000)]
Use callout_*() rather than timeout()/untimeout().

Reviewed by: imp

10 years agoResolve issue with resolving malloc() and free() functions at linking time.
Hans Petter Selasky [Fri, 30 May 2014 14:30:52 +0000 (14:30 +0000)]
Resolve issue with resolving malloc() and free() functions at linking time.

Sponsored by: DARPA, AFRL

10 years agoExport structure(s) properly.
Hans Petter Selasky [Fri, 30 May 2014 14:05:31 +0000 (14:05 +0000)]
Export structure(s) properly.

Sponsored by: DARPA, AFRL

10 years agoFix delay() function in the BERI loader code.
Hans Petter Selasky [Fri, 30 May 2014 13:53:37 +0000 (13:53 +0000)]
Fix delay() function in the BERI loader code.

Reviewed by: brooks @
Sponsored by: DARPA, AFRL

10 years agoMake driver detach code in USB mass storage test optional.
Hans Petter Selasky [Fri, 30 May 2014 13:45:20 +0000 (13:45 +0000)]
Make driver detach code in USB mass storage test optional.

Sponsored by: DARPA, AFRL

10 years agoAdd ISP/SAF1761 bootloader bus interface file.
Hans Petter Selasky [Fri, 30 May 2014 13:42:11 +0000 (13:42 +0000)]
Add ISP/SAF1761 bootloader bus interface file.

Sponsored by: DARPA, AFRL

10 years agoUSB boot library improvements:
Hans Petter Selasky [Fri, 30 May 2014 13:39:58 +0000 (13:39 +0000)]
USB boot library improvements:
- Make the USB boot library more configurable.
- Resolve compile issues when cross building.
- Allow use of separate malloc.
- Allow use of separate endian macros.

Sponsored by: DARPA, AFRL

10 years agoAdd support for USB mass storage to libusbboot.
Hans Petter Selasky [Fri, 30 May 2014 13:10:49 +0000 (13:10 +0000)]
Add support for USB mass storage to libusbboot.

Sponsored by: DARPA, AFRL

10 years agoUse g_conf_printf_escaped() to escape symbols, which can break
Andrey V. Elsukov [Fri, 30 May 2014 10:35:51 +0000 (10:35 +0000)]
Use g_conf_printf_escaped() to escape symbols, which can break
an XML tree.

MFC after: 1 week

10 years agostyle(9) requires an empty line when function have no local variables.
Hans Petter Selasky [Fri, 30 May 2014 10:18:01 +0000 (10:18 +0000)]
style(9) requires an empty line when function have no local variables.

Suggested by: ae @
Sponsored by: DARPA, AFRL

10 years agoAdd support for snprintf() to libstand.
Hans Petter Selasky [Fri, 30 May 2014 09:43:32 +0000 (09:43 +0000)]
Add support for snprintf() to libstand.

Reviewed by: brooks @
Sponsored by: DARPA, AFRL

10 years agoWhitespace only.
Gleb Smirnoff [Fri, 30 May 2014 08:22:58 +0000 (08:22 +0000)]
Whitespace only.

10 years agoReset HSIC hub during EHCI initialization. This makes devices connected
Ruslan Bukin [Fri, 30 May 2014 07:48:55 +0000 (07:48 +0000)]
Reset HSIC hub during EHCI initialization. This makes devices connected
to external USB ports available to the system.

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoFix off-by-one error that makes 0-th pins of each bank unreachable.
Ruslan Bukin [Fri, 30 May 2014 07:43:55 +0000 (07:43 +0000)]
Fix off-by-one error that makes 0-th pins of each bank unreachable.

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoAdd support for basic read, write and read capacity disk operations to
Hans Petter Selasky [Fri, 30 May 2014 07:30:24 +0000 (07:30 +0000)]
Add support for basic read, write and read capacity disk operations to
the USB mass storage test utility file.

Sponsored by: DARPA, AFRL

10 years agoo Make keyboard-related properties to be compatible with vendor standard
Ruslan Bukin [Fri, 30 May 2014 06:45:50 +0000 (06:45 +0000)]
o Make keyboard-related properties to be compatible with vendor standard
o Allow setting keymap in FDT, use hardcoded one by default
o Represent fallback keymap as a list rather than directly usable M*N array

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoAdd common kernel config file for Rockchip RK3188 systems by splitting
Ganbold Tsagaankhuu [Fri, 30 May 2014 06:37:06 +0000 (06:37 +0000)]
Add common kernel config file for Rockchip RK3188 systems by splitting
current RADXA config. Radxa Rock (RR) boards have few types such as
RR (full version), RR Lite and some variants of RR engineering samples.
Add kernel config and FDT file for RR Lite board.

Approved by: stas (mentor)

10 years agoCleanup the RADXA kernel config file a bit and enable modules.
Rui Paulo [Fri, 30 May 2014 05:17:14 +0000 (05:17 +0000)]
Cleanup the RADXA kernel config file a bit and enable modules.

10 years agoMinor mdoc fix
Benjamin Kaduk [Fri, 30 May 2014 02:16:28 +0000 (02:16 +0000)]
Minor mdoc fix

Submitted by: hrs
Approved by: hrs (mentor, implicit)

10 years agoFix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.
Pedro F. Giffuni [Fri, 30 May 2014 01:09:07 +0000 (01:09 +0000)]
Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.

POSIX.1-2008 specifies that those two functions should be declared by
including <strings.h>, not <string.h> (the latter only has strcoll_l()
and strxfrm_l()):

http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html

Obtained from: DragonFlyBSD
Reviewed by: theraven
MFC after: 2 weeks

10 years agoCreate /var/unbound/conf.d for additional configuration files.
Dag-Erling Smørgrav [Thu, 29 May 2014 22:34:04 +0000 (22:34 +0000)]
Create /var/unbound/conf.d for additional configuration files.
Ensure that it is used if present.

MFH: 3 weeks

10 years agoCorrect vt(4) border calculations on font switch
Ed Maste [Thu, 29 May 2014 21:52:42 +0000 (21:52 +0000)]
Correct vt(4) border calculations on font switch

If a vt(4) font does not exactly fit the screen dimensions, the console
window is offset so that it is centered.  A rectangle is drawn at the
top, left, right, and bottom of the screen, to erase any leftovers that
are outside of the new usable console area.

If the x offset or y offset is 0 then the left border or top border
respectively is not drawn.  The right and bottom borders may be one
pixel larger than necessary due to rounding, and are always drawn.

Prior to this change a 0 offset would result in a panic when calling
vt_drawrect with an x or y coordinate of -1.

Sponsored by: The FreeBSD Foundation

10 years agoUpdate size in vt_grow if we don't have to reallocate
Ed Maste [Thu, 29 May 2014 21:10:33 +0000 (21:10 +0000)]
Update size in vt_grow if we don't have to reallocate

vt_grow may be called with a new size that's larger than previous but
does not require reallocation - for example, when the number of columns
is the same and new number of rows is less than the history size.
Prior to this change we would fail to update vb_scr_size, and then hit
a KASSERT when trying to write to the newly visible rows.

Sponsored by: The FreeBSD Foundation

10 years agoFix unintended KBI change from r264905. Add _fib versions of
Alan Somers [Thu, 29 May 2014 21:03:49 +0000 (21:03 +0000)]
Fix unintended KBI change from r264905.  Add _fib versions of
ifa_ifwithnet() and ifa_ifwithdstaddr()  The legacy functions will call the
_fib() versions with RT_ALL_FIBS, preserving legacy behavior.

sys/net/if_var.h
sys/net/if.c
Add legacy-compatible functions as described above.  Ensure legacy
behavior when RT_ALL_FIBS is passed as fibnum.

sys/netinet/in_pcb.c
sys/netinet/ip_output.c
sys/netinet/ip_options.c
sys/net/route.c
sys/net/rtsock.c
sys/netinet6/nd6.c
Call with _fib() functions if we must use a specific fib, or the
legacy functions otherwise.

tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
Improve the udp_dontroute test.  The bug that this test exercises is
that ifa_ifwithnet() will return the wrong address, if multiple
interfaces have addresses on the same subnet but with different
fibs.  The previous version of the test only considered one possible
failure mode: that ifa_ifwithnet_fib() might fail to find any
suitable address at all.  The new version also checks whether
ifa_ifwithnet_fib() finds the correct address by checking where the
ARP request goes.

Reported by: bz, hrs
Reviewed by: hrs
MFC after: 1 week
X-MFC-with: 264905
Sponsored by: Spectra Logic

10 years agoChange examples to have master skew above 0 to have ability to overwrite this
Dmitry Morozovsky [Thu, 29 May 2014 21:02:57 +0000 (21:02 +0000)]
Change examples to have master skew above 0 to have ability to overwrite this
from the slave (for example, when master is failing on disk IO and could not be
logged into or execute cronjob).

Commented out examples changed too to simplify future merging.

Idea by: kaa@zvuki.ru
Discussed with: glebius
MFC after: 1 week

10 years agoIn uart_bus_grab(), use the ier_mask instead of a custom hack for XScale.
Olivier Houchard [Thu, 29 May 2014 21:00:06 +0000 (21:00 +0000)]
In uart_bus_grab(), use the ier_mask instead of a custom hack for XScale.

Suggested by: jmg

10 years agoAdd rwlock to struct dadq. A panic could occur when a large number of
Hiroki Sato [Thu, 29 May 2014 20:53:53 +0000 (20:53 +0000)]
Add rwlock to struct dadq.  A panic could occur when a large number of
addresses performed DAD at the same time.

10 years agoCorrect KASSERT strings
Ed Maste [Thu, 29 May 2014 20:26:01 +0000 (20:26 +0000)]
Correct KASSERT strings

Rows refer to height and cols to width.

10 years agoIn the grab function, keep the bit 6 on in the IER, on XScale, using 0
Olivier Houchard [Thu, 29 May 2014 19:57:51 +0000 (19:57 +0000)]
In the grab function, keep the bit 6 on in the IER, on XScale, using 0
turns the UART off, which is unfortunate if one want to use it as a console.

10 years agoUpdate number of tests.
Pedro F. Giffuni [Thu, 29 May 2014 19:48:18 +0000 (19:48 +0000)]
Update number of tests.

Suggested by: jmmv

10 years agoMinor style knit.
Pedro F. Giffuni [Thu, 29 May 2014 19:43:43 +0000 (19:43 +0000)]
Minor style knit.

10 years agoFix pf(4) to build with MAXCPU set to 256. MAXCPU is actually a count,
John Baldwin [Thu, 29 May 2014 19:17:10 +0000 (19:17 +0000)]
Fix pf(4) to build with MAXCPU set to 256.  MAXCPU is actually a count,
not a maximum ID value (so it is a cap on mp_ncpus, not mp_maxid).

10 years agoAdd VGAROM 8x8, 8x14 and 8x16 fonts for vt(4)
Ed Maste [Thu, 29 May 2014 18:05:03 +0000 (18:05 +0000)]
Add VGAROM 8x8, 8x14 and 8x16 fonts for vt(4)

These are converted from syscons(4) cp437 fonts.

10 years agoDo not hand the VM the memory used for stacks/page tables/etc.
Olivier Houchard [Thu, 29 May 2014 16:56:39 +0000 (16:56 +0000)]
Do not hand the VM the memory used for stacks/page tables/etc.

10 years agoFor old CPUs, map the 64 first MB of RAM as it used to be. Some ports
Olivier Houchard [Thu, 29 May 2014 16:54:15 +0000 (16:54 +0000)]
For old CPUs, map the 64 first MB of RAM as it used to be. Some ports
(XScale mainly) expects the memory located before the kernel to be mapped,
and use it to allocate the page tables, the various stacks, etc.
A better fix would probably be to rewrite the various bla_machdep.c to stop
using that RAM, but I'm not so inclined to do it, especially since I don't
have hardware for all of them.

10 years agoAdd support for the unmapped i/o to mfi(4).
Konstantin Belousov [Thu, 29 May 2014 16:20:34 +0000 (16:20 +0000)]
Add support for the unmapped i/o to mfi(4).

Tested by: Nicholas Esborn <nick@desert.net>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAdd missing , in converted font output
Ed Maste [Thu, 29 May 2014 16:18:46 +0000 (16:18 +0000)]
Add missing , in converted font output

Submitted by: Claude Buisson

10 years agoWhen usermode loaded non-default segment selector into the %gs,
Konstantin Belousov [Thu, 29 May 2014 16:18:31 +0000 (16:18 +0000)]
When usermode loaded non-default segment selector into the %gs,
correctly prepare KGSBASE msr to restore the user descriptor base on
the last swapgs during return to usermode.

Reported and tested by: peterj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoReorganize this Makefile so that all the bsd.*.mk bits are in one
John Baldwin [Thu, 29 May 2014 16:03:08 +0000 (16:03 +0000)]
Reorganize this Makefile so that all the bsd.*.mk bits are in one
section at the bottom.

Reviewed by: imp

10 years agoFix a typo.
Glen Barber [Thu, 29 May 2014 15:43:51 +0000 (15:43 +0000)]
Fix a typo.

Sponsored by: The FreeBSD Foundation

10 years agonetinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in strict POSIX
Jilles Tjoelker [Thu, 29 May 2014 15:23:37 +0000 (15:23 +0000)]
netinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in strict POSIX
mode.

Put the htonl(), htons(), ntohl() and ntohs() declarations under
__POSIX_VISIBLE >= 200112. POSIX.1-2001 and newer require these to be
exposed from <netinet/in.h> (as well as <arpa/inet.h>).

Note that it may be unnecessary to check __POSIX_VISIBLE >= 200112 because
older versions of POSIX and the C standard do not define this header.
However, other places in the same file already perform the check.

PR: 188316
Submitted by: Christian Neukirchen

10 years agoAdd gallant vt(4) font as an example of font loading for vt(4).
Aleksandr Rybalko [Thu, 29 May 2014 14:51:52 +0000 (14:51 +0000)]
Add gallant vt(4) font as an example of font loading for vt(4).

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agoEnable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps
Aleksandr Rybalko [Thu, 29 May 2014 14:39:25 +0000 (14:39 +0000)]
Enable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps
if vt(4) is present.

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agoAdd gallant vt(4) font as an example of font loading for vt(4).
Aleksandr Rybalko [Thu, 29 May 2014 13:41:07 +0000 (13:41 +0000)]
Add gallant vt(4) font as an example of font loading for vt(4).

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agomdoc: add missing paragraph macro.
Sergey Kandaurov [Thu, 29 May 2014 13:35:13 +0000 (13:35 +0000)]
mdoc: add missing paragraph macro.

10 years agoo Teach vidcontrol(1) how to load vt(4) font.
Aleksandr Rybalko [Thu, 29 May 2014 13:09:48 +0000 (13:09 +0000)]
o Teach vidcontrol(1) how to load vt(4) font.
o Teach vidcontrol(1) to distinct which virtual terminal system is running now.
o Load vt(4) fonts from different location.
o Add $FreeBSD$ tag for path.h.

Tested by: Claude Buisson <clbuisson@orange.fr>

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agoRemove driver as unused.
Aleksandr Rybalko [Thu, 29 May 2014 12:29:58 +0000 (12:29 +0000)]
Remove driver as unused.

MFC after: 7 days
Sponsored by: The FreeBSD Foundation

10 years agoFactor out kernel configuration for DWC OTG FDT attach code.
Hans Petter Selasky [Thu, 29 May 2014 11:13:40 +0000 (11:13 +0000)]
Factor out kernel configuration for DWC OTG FDT attach code.

10 years agoAdd some more spinlocks to protect the state of the USB transfer
Hans Petter Selasky [Thu, 29 May 2014 11:11:19 +0000 (11:11 +0000)]
Add some more spinlocks to protect the state of the USB transfer
queue. Rename some functions to indicate locking requirements.

MFC after: 1 week

10 years agoHook the ISP/SAF1761 driver into MIPS kernel builds.
Hans Petter Selasky [Thu, 29 May 2014 10:46:09 +0000 (10:46 +0000)]
Hook the ISP/SAF1761 driver into MIPS kernel builds.
- Update FDT file for BERI DE4 boards.
- Add needed kernel configuration keywords.
- Rename module to saf1761otg so that the device unit number does not
interfere with the hardware ID in dmesg.

Sponsored by: DARPA, AFRL

10 years agoOptimise the ISP/SAF1761 driver:
Hans Petter Selasky [Thu, 29 May 2014 10:06:18 +0000 (10:06 +0000)]
Optimise the ISP/SAF1761 driver:
- Use an interrupt filter for handling the data path interrupts. This
increases the throughput significantly.
- Implement support for USB suspend and resume in USB host mode.

Sponsored by: DARPA, AFRL

10 years agoCorrect the description of characters allowed. Based on pw_checkname in
Warren Block [Thu, 29 May 2014 02:26:12 +0000 (02:26 +0000)]
Correct the description of characters allowed.  Based on pw_checkname in
usr.sbin/pw/pw_user.c.  Modified version of patch submitted by
venture37.

PR: docs/47594
Submitted by: Fernando Schapachnik <fernando@mecon.gov.ar>, venture37 <venture37@geeklan.co.uk>
Reviewed by: allanjude, bcr, brueffer (on phabricator)
MFC after: 1 week

10 years agoCommit the rest of the changes that were intended to be part of r266826.
Mark Johnston [Thu, 29 May 2014 01:42:22 +0000 (01:42 +0000)]
Commit the rest of the changes that were intended to be part of r266826.

X-MFC-with: r266826

10 years agoMove some duplicated hook definitions from machine-dependent files to
Mark Johnston [Thu, 29 May 2014 01:41:19 +0000 (01:41 +0000)]
Move some duplicated hook definitions from machine-dependent files to
kern_dtrace.c.

Reviewed by: rpaulo
MFC after: 1 week

10 years agoUse IPv4 statistics in ipsec4_process_packet() rather than the IPv6
Bjoern A. Zeeb [Wed, 28 May 2014 23:01:20 +0000 (23:01 +0000)]
Use IPv4 statistics in ipsec4_process_packet() rather than the IPv6
version.  This also unbreaks the NOINET6 builds after r266800.

10 years ago- Actually, modules are built correctly when compiled along the kernel as
Marius Strobl [Wed, 28 May 2014 19:59:27 +0000 (19:59 +0000)]
- Actually, modules are built correctly when compiled along the kernel as
  they then pick up an opt_global.h from KERNBUILDDIR having PAE defined.
  Thus, build all modules by default except those which still really are
  defective as of r266799.
- Minor style cleanup.

MFC after: 1 week

10 years ago- Shrink the list of excluded modules to what actually still doesn't build
Marius Strobl [Wed, 28 May 2014 19:58:00 +0000 (19:58 +0000)]
- Shrink the list of excluded modules to what actually still doesn't build
  as of r266799.
- Some style cleanups.

MFC after: 1 week

10 years agoAdd a temporary hack to change the various non-build related special
John Baldwin [Wed, 28 May 2014 19:52:01 +0000 (19:52 +0000)]
Add a temporary hack to change the various non-build related special
targets like 'cscope' and 'glimpse' to not depend on src.opts.mk or
bsd.*.mk.

Reviewed by: imp

10 years agoInitialize r_flags the same way in all cases using a sanitized copy of
Don Lewis [Wed, 28 May 2014 16:57:17 +0000 (16:57 +0000)]
Initialize r_flags the same way in all cases using a sanitized copy of
flags that has several bits cleared. The RF_WANTED and RF_FIRSTSHARE
bits are invalid in this context, and we want to defer setting RF_ACTIVE
in r_flags until later.  This should make rman_get_flags() return
the correct answer in all cases.

Add a KASSERT() to catch callers which incorrectly pass the RF_WANTED
or RF_FIRSTSHARE flags.

Do a strict equality check on the share type bits of flags.  In
particular, do an equality check on RF_PREFETCHABLE.  The previous
code would allow one type of mismatch of RF_PREFETCHABLE but disallow
the other type of mismatch.  Also, ignore the the RF_ALIGNMENT_MASK
bits since alignment validity should be handled by the amask check.
This field contains an integer value, but previous code did a strange
bitwise comparison on it.

Leave the original value of flags unmolested as a minor debug aid.

Change the start+amask overflow check to a KASSERT() since it is just
meant to catch a highly unlikely programming error in the caller.

Reviewed by: jhb
MFC after: 1 month

10 years agoDon't break the legacy applications which set
Hajimu UMEMOTO [Wed, 28 May 2014 16:50:18 +0000 (16:50 +0000)]
Don't break the legacy applications which set
just 2 bytes to salt.

MFC after: 1 week

10 years agoFixes for ISP/SAF1761 host mode:
Hans Petter Selasky [Wed, 28 May 2014 16:28:22 +0000 (16:28 +0000)]
Fixes for ISP/SAF1761 host mode:
- Make the USB hardware skip PTDs which are not allocated.
- Peek host memory twice. Sometimes the PTD status is incorrectly
returned as zero.
- Ensure the host channel is always freed when software TD
is completing.
- Add correct configuration of interrupt polarity and type.
- Set CERR to 2 for asynchronous traffic to avoid having to
reactivate the PTD when a NAK token is received.
- Fix detection of STALL PID.

Sponsored by: DARPA, AFRL

10 years agoActually, just merge r233362 and do away with the unnecessary uint8_t
Marius Strobl [Wed, 28 May 2014 14:26:46 +0000 (14:26 +0000)]
Actually, just merge r233362 and do away with the unnecessary uint8_t
pointer casting altogether.

10 years agoUse M_WAITOK for the NGM_PIPE_SET_CFG control message. We expect it to
Gleb Smirnoff [Wed, 28 May 2014 13:15:14 +0000 (13:15 +0000)]
Use M_WAITOK for the NGM_PIPE_SET_CFG control message. We expect it to
arrive from userland only.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>

10 years agoRemove nop.
Hans Petter Selasky [Wed, 28 May 2014 12:58:37 +0000 (12:58 +0000)]
Remove nop.

MFC after: 1 week

10 years agoFixed IPv4-in-IPv6 and IPv6-in-IPv4 IPsec tunnels.
VANHULLEBUS Yvan [Wed, 28 May 2014 12:45:27 +0000 (12:45 +0000)]
Fixed IPv4-in-IPv6 and IPv6-in-IPv4 IPsec tunnels.
For IPv6-in-IPv4, you may need to do the following command
on the tunnel interface if it is configured as IPv4 only:
ifconfig <interface> inet6 -ifdisabled

Code logic inspired from NetBSD.

PR: kern/169438
Submitted by: emeric.poupon@netasq.com
Reviewed by: fabient, ae
Obtained from: NETASQ

10 years agoCommit the right version of r266793.
Marius Strobl [Wed, 28 May 2014 12:32:07 +0000 (12:32 +0000)]
Commit the right version of r266793.

10 years agoFix for big endian architectures. The "up_address" field is 8-bit and
Hans Petter Selasky [Wed, 28 May 2014 12:27:41 +0000 (12:27 +0000)]
Fix for big endian architectures. The "up_address" field is 8-bit and
does not need byte swapping.

MFC after: 1 week

10 years ago- Fix compilation with PAE support enabled by improving the casting of
Marius Strobl [Wed, 28 May 2014 09:01:35 +0000 (09:01 +0000)]
- Fix compilation with PAE support enabled by improving the casting of
  physical addresses.
- Nuke the unused softc of emujoy(4).
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoFix DMA handling in radeon_dummy_page_init():
Marius Strobl [Wed, 28 May 2014 08:59:23 +0000 (08:59 +0000)]
Fix DMA handling in radeon_dummy_page_init():
- Based on actual usage and on what Linux does, dummy_page.addr should
  contain the physical bus address of the dummy page rather than its
  virtual one. As a side-effect, correcting this bug fixes compilation
  with PAE support enabled by getting rid of an inappropriate cast.
- Also based on actual usage of dummy_page.addr, theoretically Radeon
  devices could do a maximum of 44-bit DMA. In reality, though, it is
  more likely that they only support 32-bit DMA, at least that is what
  radeon_gart_table_ram_alloc() sets up for, too. However, passing ~0
  to drm_pci_alloc() as maxaddr parameter translates to 64-bit DMA on
  amd64/64-bit machines. Thus, use BUS_SPACE_MAXSIZE_32BIT instead,
  which the existing 32-bit DMA limits within the drm2 code spelled as
  0xFFFFFFFF should also be changed to.

Reviewed by: dumbbell
MFC after:      1 week
Sponsored by:   Bally Wulff Games & Entertainment GmbH

10 years agoreference the correct variable in a comment
Luigi Rizzo [Wed, 28 May 2014 06:50:16 +0000 (06:50 +0000)]
reference the correct variable in a comment

MFC after: 3 days

10 years agoAdd simple polling mechanism that works for KDB.
Ruslan Bukin [Wed, 28 May 2014 06:15:45 +0000 (06:15 +0000)]
Add simple polling mechanism that works for KDB.

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoDocument support for Intel Centrino Wireless-N 105, added in r266770.
Christian Brueffer [Wed, 28 May 2014 06:11:16 +0000 (06:11 +0000)]
Document support for Intel Centrino Wireless-N 105, added in r266770.

MFC after: 2 weeks

10 years agoDescribe I2C arbitrator device in DTS and use it for Chromebook Snow only.
Ruslan Bukin [Wed, 28 May 2014 06:11:12 +0000 (06:11 +0000)]
Describe I2C arbitrator device in DTS and use it for Chromebook Snow only.

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoo Add kernel configuration for HP Chromebook 11
Ruslan Bukin [Wed, 28 May 2014 06:00:55 +0000 (06:00 +0000)]
o Add kernel configuration for HP Chromebook 11
o Use machine codename in filenames
o Add GEOM_PART_GPT kernel option

Submitted by: Maxim Ignatenko <gelraen.ua@gmail.com>

10 years agoIn r218101 I have not changed properly the futex syscall definition.
Dmitry Chagin [Wed, 28 May 2014 05:57:35 +0000 (05:57 +0000)]
In r218101 I have not changed properly the futex syscall definition.
Some Linux futex ops atomically verifies that the futex address uaddr
(uval) contains the value val. Comparing signed uval and unsigned val
may lead to an unexpected result, mostly to a deadlock.

So copyin uaddr to an unsigned int to compare the parameters correctly.

While here change ktr records to print parameters in more readable format.

Tested by eadler@

MFC after: 3 days

10 years agoRemove the assert which can be triggered by the userspace. The
Konstantin Belousov [Wed, 28 May 2014 00:45:35 +0000 (00:45 +0000)]
Remove the assert which can be triggered by the userspace.  The
situation checked by assert is verified to not take place in
vm_map_wire(), and protection permissions on the wired entry can be
revoked afterward.

Reported by: markj
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoadd '3wire' (no handshake lines) to gettytab and ttys so that after
Luigi Rizzo [Wed, 28 May 2014 00:30:32 +0000 (00:30 +0000)]
add '3wire' (no handshake lines) to gettytab and ttys so that after
svn 264175 bhyve etc. work -- without that, /usr/bin/login would stop
in getpass()

MFC after: 3 days

10 years agoRepair nested signal handling on PowerPC. The signal trampoline code
Nathan Whitehorn [Tue, 27 May 2014 23:57:22 +0000 (23:57 +0000)]
Repair nested signal handling on PowerPC. The signal trampoline code
was not allocating space for the parameter save area in the stack frame.
If the compiler chose to save the argument to the signal handler on the
stack, it would overwrite the first 32 bits of the sigaction struct with
it, corrupting it for a subsequent invocation.

PR: powerpc/183040
MFC after: 8 days

10 years agoMove libworker_event_done_cb() from libworker.h to worker.h.
Dag-Erling Smørgrav [Tue, 27 May 2014 23:39:28 +0000 (23:39 +0000)]
Move libworker_event_done_cb() from libworker.h to worker.h.

10 years agoRemove debugging printf that crept in in r266770.
Gavin Atkinson [Tue, 27 May 2014 23:05:12 +0000 (23:05 +0000)]
Remove debugging printf that crept in in r266770.

Submitted by: adrian, nwhitehorn
MFC after: 2 weeks

10 years agoEliminate the fake contig_dmamap and replace it with a new flag,
Scott Long [Tue, 27 May 2014 21:31:11 +0000 (21:31 +0000)]
Eliminate the fake contig_dmamap and replace it with a new flag,
BUS_DMA_KMEM_ALLOC.  They serve the same purpose, but using the flag
means that the map can be NULL again, which in turn enables significant
optimizations for the common case of no bouncing.

Obtained from: Netflix, Inc.
MFC after: 3 days

10 years agoimprove ifconfig(8) man page by describing special behaviour of -l ether
Allan Jude [Tue, 27 May 2014 20:45:15 +0000 (20:45 +0000)]
improve ifconfig(8) man page by describing special behaviour of -l ether

PR: docs/187644
Submitted by: Andrew Merenbach (original patch)
Approved by: bcr (mentor)

10 years agoFix a couple of size_t != int warnings.
John Baldwin [Tue, 27 May 2014 20:22:36 +0000 (20:22 +0000)]
Fix a couple of size_t != int warnings.

10 years agoVarious cleanups and fixes:
John Baldwin [Tue, 27 May 2014 19:56:02 +0000 (19:56 +0000)]
Various cleanups and fixes:
- Switch from timeout() to callout_*() for per-request timers.
- Use device_find_child() in the identify routine.
- Use device_printf() instead of passing device_get_nameunit() to
  printf().
- Expand the SBP_LOCK coverage simplifying the locking.
- Uninline STAILQ_FOREACH_SAFE().

Tested by: sbruno

10 years agoMFV r266766:
Xin LI [Tue, 27 May 2014 19:46:11 +0000 (19:46 +0000)]
MFV r266766:

Add a new zfs property, "redundant_metadata" which can have values "all" or
"most".  The default will be "all", which is the current behavior.  When set
to all, ZFS stores an extra copy of all metadata.  If a single on-disk block
is corrupt, at worst a single block of user data (which is recordsize bytes
long) can be lost.

Setting to "most" will cause us to only store 1 copy of level-1 indirect
blocks of user data files.  This can improve performance of random writes,
because less metadata has to be written.  In practice,  at worst about
100 blocks (of recordsize bytes each) of user data can be lost if a single
on-disk block is corrupt.

The exact behavior of which metadata blocks are stored redundantly may change
in future releases.

Illumos issue: 3835 zfs need not store 2 copies of all metadata

MFC after: 2 weeks

10 years agoAdd support for the Intel Centrino Wireless-N 105 chipset.
Gavin Atkinson [Tue, 27 May 2014 19:39:57 +0000 (19:39 +0000)]
Add support for the Intel Centrino Wireless-N 105 chipset.

MFC after: 2 weeks
Relnotes: yes

10 years ago3835 zfs need not store 2 copies of all metadata
Xin LI [Tue, 27 May 2014 19:05:26 +0000 (19:05 +0000)]
3835 zfs need not store 2 copies of all metadata

illumos/illumos-gate@edf345e6b8342e8627ec20ce821a977a62cee19d

10 years ago- Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the
John Baldwin [Tue, 27 May 2014 19:04:38 +0000 (19:04 +0000)]
- Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the
  guest for which the rules regarding xsetbv emulation are known.  In
  particular future extensions like AVX-512 have interdependencies among
  feature bits that could allow a guest to trigger a GP# in the host with
  the current approach of allowing anything the host supports.
- Add proper checking of Intel MPX and AVX-512 XSAVE features in the
  xsetbv emulation and allow these features to be exposed to the guest if
  they are enabled in the host.
- Expose a subset of known-safe features from leaf 0 of the structured
  extended features to guests if they are supported on the host including
  RDFSBASE/RDGSBASE, BMI1/2, AVX2, AVX-512, HLE, ERMS, and RTM.  Aside
  from AVX-512, these features are all new instructions available for use
  in ring 3 with no additional hypervisor changes needed.

Reviewed by: neel

10 years ago4730 metaslab group taskq should be destroyed in metaslab_group_destroy()
Xin LI [Tue, 27 May 2014 19:02:25 +0000 (19:02 +0000)]
4730 metaslab group taskq should be destroyed in metaslab_group_destroy()

illumos/illumos-gate@be082110c08433beadb738ad3be035a73d995ea8

10 years ago4698 fix builds by gcc44 on sparc
Xin LI [Tue, 27 May 2014 19:01:10 +0000 (19:01 +0000)]
4698 fix builds by gcc44 on sparc

(This change is not applicable to FreeBSD)

illumos/illumos-gate@9c720e3bfb657054035cb780c4d222291b7d4917

10 years agoPortmgr no longer need the UL hack.
Simon J. Gerraty [Tue, 27 May 2014 18:39:13 +0000 (18:39 +0000)]
Portmgr no longer need the UL hack.

Reviewed by: obrien

10 years agocxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
Navdeep Parhar [Tue, 27 May 2014 18:18:41 +0000 (18:18 +0000)]
cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
Netmap gets its own hardware-assisted virtual interface and won't take
over or disrupt the "normal" interface in any way.  You can use both
simultaneously.

For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl<N> interface
(note the 'n' prefix) in the hardware to accompany each cxl<N>
interface.  These two ifnet's per port share the same wire but really
are separate interfaces in the hardware and software.  Each gets its own
L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.  You
should run netmap on the 'n' interfaces only, that's what they are for.

With this, pkt-gen is able to transmit > 45Mpps out of a single 40G port
of a T580 card.  2 port tx is at ~56Mpps total (28M + 28M) as of now.
Single port receive is at 33Mpps but this is very much a work in
progress.  I expect it to be closer to 40Mpps once done.  In any case
the current effort can already saturate multiple 10G ports of a T5 card
at the smallest legal packet size.  T4 gear is totally untested.

trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43:ab:cd:ef
881.952141 main [1621] interface is ncxl0
881.952250 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
881.952253 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
881.962540 main [1804] mapped 334980KB at 0x801dff000
Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus.
10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43:ab:cd:ef)
881.962562 main [1882] Sending 512 packets every  0.000000000 s
881.962563 main [1884] Wait 2 secs for phy reset
884.088516 main [1886] Ready...
884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1
884.088607 sender_body [996] start
884.093246 sender_body [1064] drop copy
885.090435 main_thread [1418] 45206353 pps (45289533 pkts in 1001840 usec)
886.091600 main_thread [1418] 45322792 pps (45375593 pkts in 1001165 usec)
887.092435 main_thread [1418] 45313992 pps (45351784 pkts in 1000834 usec)
888.094434 main_thread [1418] 45315765 pps (45406397 pkts in 1002000 usec)
889.095434 main_thread [1418] 45333218 pps (45378551 pkts in 1001000 usec)
890.097434 main_thread [1418] 45315247 pps (45405877 pkts in 1002000 usec)
891.099434 main_thread [1418] 45326515 pps (45417168 pkts in 1002000 usec)
892.101434 main_thread [1418] 45333039 pps (45423705 pkts in 1002000 usec)
893.103434 main_thread [1418] 45324105 pps (45414708 pkts in 1001999 usec)
894.105434 main_thread [1418] 45318042 pps (45408723 pkts in 1002001 usec)
895.106434 main_thread [1418] 45332430 pps (45377762 pkts in 1001000 usec)
896.107434 main_thread [1418] 45338072 pps (45383410 pkts in 1001000 usec)
...

Relnotes: Yes
Sponsored by: Chelsio Communications.