Commit Graph

200087 Commits

Author SHA1 Message Date
Ganbold Tsagaankhuu
e4bc6b4c01 Disable WPI in case of aml8726-m3.
The aml8726-m3 SoC is identified as a Cortex A9-r2 rev 4 CPU and
it hangs sometimes during the boot when WFI is used by the kernel.

Differential Revision:	  https://reviews.freebsd.org/D2473
Submitted by:		  John Wehle
Suggested by:		  ian@
2015-05-12 08:53:54 +00:00
Michael Tuexen
fcbbf5af1d Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was
received over UDP.
Thanks to Felix Weinrank for makeing me aware of the problem and to
Irene Ruengeler for providing the fix.

MFC after: 1 week
2015-05-12 08:08:16 +00:00
Andrey V. Elsukov
eccfe69a5c Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated
packets on tunnel interfaces. Add support of these ioctls to gre(4),
gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use
if_fib value from ifnet structure, use proper value in gre(4) and me(4).

Differential Revision:	https://reviews.freebsd.org/D2462
No objection from:	#network
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2015-05-12 07:37:27 +00:00
Xin LI
0a23444a57 Revert r282775 for now. The added dependency would cause problems for
e.g. ports-mgmt/pkg and we would like to do an exp-build.

Requested by:	bdrewery
2015-05-12 05:42:13 +00:00
Hiroki Sato
1c27e6c39f Fix a panic when VIMAGE is enabled.
Spotted by:	Nikos Vassiliadis
2015-05-12 03:35:45 +00:00
Hiroki Sato
59333867ff - Remove ND6_IFF_IGNORELOOP. This functionality was useless in practice
because a link where looped back NS messages are permanently observed
  does not work with either NDP or ARP for IPv4.

- draft-ietf-6man-enhanced-dad is now RFC 7527.

Discussed with:	hiren
MFC after:	3 days
2015-05-12 03:31:57 +00:00
Glen Barber
6a1e2e9a1c Avoid polluting the filesystem when not necessary.
Sponsored by:	The FreeBSD Foundation
2015-05-12 01:27:58 +00:00
Glen Barber
1d4b5e16dd After the last influx of commits, and a REALLY BIG WARNING
to the top of the file.

Sponsored by:	The FreeBSD Foundation
2015-05-12 01:20:27 +00:00
Glen Barber
d44da388a9 Fix more paths to the actual files.
Sponsored by:	The FreeBSD Foundation
2015-05-12 01:14:21 +00:00
Glen Barber
635289e06b Fix more path variables.
Sponsored by:	The FreeBSD Foundation
2015-05-12 01:04:02 +00:00
Glen Barber
afeaf77134 Provide the correct path to the checksum file.
Sponsored by:	The FreeBSD Foundation
2015-05-12 00:58:17 +00:00
Glen Barber
dc5c69bdd1 Also symlink the CHECKSUM.{SHA256,MD5} files.
Sponsored by:	The FreeBSD Foundation
2015-05-12 00:55:28 +00:00
Glen Barber
32ade9ef5a Also copy CHECKSUM.{SHA256,MD5} files.
Sponsored by:	The FreeBSD Foundation
2015-05-12 00:46:32 +00:00
Glen Barber
a3ba37b499 Fix a few incorrect variables and/or hard-coded paths.
Sponsored by:	The FreeBSD Foundation
2015-05-12 00:39:01 +00:00
Glen Barber
0a87b16c59 Sigh. Fix more syntax errors introduced by the last commit.
Sponsored by:	The FreeBSD Foundation
2015-05-12 00:33:18 +00:00
Glen Barber
1baab0b301 Fix a make(1) syntax error.
Sponsored by:	The FreeBSD Foundation
2015-05-12 00:32:28 +00:00
Glen Barber
99f888885d Temporarily 'rm -rf $FTPDIR' during additional testing.
Sponsored by:	The FreeBSD Foundation
2015-05-12 00:30:56 +00:00
Neel Natu
4e43c1e8b5 Allow configuration of the sector size advertised to the guest.
The default behavior is to infer the logical and physical sector sizes from
the block device backend. However older versions of Windows only work with
specific logical/physical combinations:
- Vista and Windows 7:	512/512
- Windows 7 SP1:	512/512 or 512/4096

For this reason allow the sector size to be specified using the following
block device option: sectorsize=logical[/physical]

Reported by:	Leon Dang (ldang@nahannisys.com)
Reviewed by:	grehan
MFC after:	2 weeks
2015-05-12 00:30:39 +00:00
Glen Barber
be59bc7ae9 Always use the 'make install' directory as the source for images.
For RE purposes, we use the default (/R within the chroot), so
this helps avoid copying files multiple times and xz(1)-compressing
additional times when not needed.

Again, this Makefile is not for general consumption.

Sponsored by:	The FreeBSD Foundation
2015-05-12 00:27:52 +00:00
Glen Barber
2345494662 Add a new file, Makefile.mirrors, which is intended to replace
a 474-line kludge of a shell script to pre-create the directory
hierarchy on ftp-master.

This is not in any way connected to the build, and there is no
intention to do so.  This only intent here is to try to make
things a little bit easier for me.  But I've probably just made
things worse.

Sponsored by:	The FreeBSD Foundation
2015-05-11 22:14:03 +00:00
Peter Grehan
be80efd491 Handling indirect descriptors is a capability of the host and
not one that needs to be negotiated. Use the host capabilities
field and not the negotiated field when verifying that indirect
descriptors are supported.

Found with the Redhat Windows viostor driver, which clears
the indirect capability in the negotiated caps and then starts
using them.

Reported and tested by: Leon Dang (ldang@nahannisys.com)
MFC after:   2 weeks
2015-05-11 21:24:10 +00:00
Justin Hibbits
809923ca02 Add a PCI bridge for the Freescale PCIe Root Complex
Summary:
The Freescale PCIe Root Complex shows up as a Processor class device, PowerPC
subclass, so the generic PCI code ignores it for a bridge.  This adds support
for it.

As part of this, update the Freescale PCI hostbridge driver, to allow probing
beyond the root complex, instead of only allowing "proper" PCI-PCI bridges.

Reviewers: #powerpc, marcel, nwhitehorn

Reviewed By: nwhitehorn

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D2442

Relnotes:	yes
2015-05-11 20:58:05 +00:00
Andrew Turner
74de7730b7 Use the GOT_* macros to help simplify the code, these work with both pic
and non-pic code, and to build for Thumb.
2015-05-11 20:33:46 +00:00
Alan Cox
dfb378345f Retire pmap_lazyfix(). This function only existed in the new armv6 pmap
because the i386 pmap on which the new armv6 pmap is based had it, and in
r281707 pmap_lazyfix() was removed from the i386 pmap.

Discussed with:	kib
Submitted by:	Michal Meloun (via Svatopluk Kraus)
2015-05-11 19:55:01 +00:00
Andrew Turner
ae4fa2223a Add the kernel support for Thumb-2. It is only supported on ARMv7 as the
main ARMv6 target, the Raspberry Pi, doesn't support Thumb-2.

This as been tested with a Thumb-2 userland, however building one is
currently unsupported as there are known toolchain issues breaking some
binaries. Further work will also be needed to decide on the method of
selecting which instruction set to build for, and to benchmark both to
find how building everything as Thumb-2 will affect performance.

Relnotes:	yes
2015-05-11 19:20:30 +00:00
Andrew Turner
8465de8e6c Mark thumb entry points as such when building for thumb, otherwise mark
them as arm.
2015-05-11 19:04:32 +00:00
Andrew Turner
827422e3fd Use the Thumb compliant version of the add instruction. We can only use
"add Rd, Rn, Rm" from within an IT (if-then) block.
2015-05-11 19:00:02 +00:00
Andrew Turner
ec94f63bca List both registers to use in the 64-bit atomic instructions. We will need
these to build for Thumb-2.
2015-05-11 18:52:06 +00:00
Xin LI
f2626e0e62 Revert r281372, it's no longer needed after r282726 (fix for PR 199119) as the
symbol conflict between libmd and libcrypto have been solved.
2015-05-11 17:49:07 +00:00
Thomas Quinot
2dd0a89c26 Unbreak MIPS build following rev. 282726
Introduce further adjustments to the renaming of libmd
symbols: make sure that we do not generate dangling weak
aliases, as this causes build failures on MIPS.

Tested by:	sbruno
2015-05-11 16:45:33 +00:00
Andrew Turner
8a56ddde27 Add the ofw_bus_subr.h change missed in r282770. 2015-05-11 15:47:55 +00:00
Glen Barber
ccbf25027e Fix virtual machine disk format creating by passing VMFORMAT
to mkimg(1)

PR:		200068
Submitted by:	Jeremy Norris
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-05-11 14:53:07 +00:00
Andrew Turner
044a49cd24 Hide code only used on i386 and amd64. 2015-05-11 14:36:34 +00:00
Andrew Turner
72a638c7f4 Add ofw_bus_find_compatible to find a compatible ofw node. This will be
used on ARM to help find the correct node to use to start secondary CPUs
as this happens before device enumeration.
2015-05-11 14:10:54 +00:00
Andrew Turner
6bd9126da9 cpu-v6.h should only be used in the kernel, add an error to enforce this. 2015-05-11 12:44:02 +00:00
Andriy Gapon
defce67748 zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget
This allows to ensure that we do not write to a file that was opened
for reading only or vice versa.

Also, use the correct capability in in zfs_ioc_send_new().

Differential Revision:	https://reviews.freebsd.org/D2382
Reviewed by:	delphij
MFC after:	17 days
Sponsored by:	ClusterHQ
2015-05-11 10:07:31 +00:00
Andrew Turner
f71b16e05e Move to use __ARM_ARCH in more places in the kernel. 2015-05-11 08:57:23 +00:00
Andrew Turner
a40f7273f1 Use the ACLE spelling of _ARM_ARCH_6: "__ARM_ARCH >= 6" 2015-05-11 08:51:24 +00:00
Enji Cooper
4f34db2d70 Use MIN from sys/param.h instead of handrolling the macro
Replace sys/types.h with sys/param.h per-style(9)

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-05-11 04:54:56 +00:00
Xin LI
1d79f30229 Revert r282672.
tr is in /usr and not available at the time hostid is run (must be run
before FILESYSTEMS).

Reported by:	def
2015-05-11 00:16:32 +00:00
Mark Johnston
5a9f9cb38e Remove some commented-out upstream code for handling traps from usermode
DTrace probes. This handling is already done in trap() on i386 and amd64.
2015-05-10 22:27:48 +00:00
Mark Johnston
760a181bb2 msecs_to_jiffies() is implemented using tvtohz(9), which always returns a
positive value since it adds the current tick to its result. This differs
from the behaviour in Linux, whose implementation does not add the extra
tick, so subtract the extra tick in the OFED compat layer implementation.
This addresses some incorrect handling of IB MAD timeouts, since some IB
code depends on msecs_to_jiffies(0) returning 0.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-05-10 22:21:00 +00:00
Adrian Chadd
2808a02bf4 Prepare for supporting driver-overridden curchan when submitting scan
results.

Right now the scan infrastructure assumes the channel is under net80211
control, and that when receiving beacon frames for scanning, the
current channel is indeed what ic_curchan is set to.

But firmware NICs with firmware scan support need more than this -
they can do background scans whilst hiding the off-channel behaviour
from net80211.  Ie, net80211 still thinks everything is associated
and on the main channel, but it's getting scan results from all the
background traffic.

However sta_add() pays attention to ic_curchan and discards scan
results that aren't on the right channel.  CCK beacon frames can be
decoded from adjacent channels so the receive path and sta_add
discard these as appropriate.  This is fine for software scanning
like for ath(4), but not for firmware NICs.  So with those, the
whole concept of background firmware scanning won't work without
major hacks (eg, overriding ic_curchan before calling the beacon
input / scan add.)

As part of my scan overhaul, modify sta_add() and the scan_add()
APIs to take an explicit current channel.  The normal RX path
will set it to ic_curchan so it's a no-op.  However, drivers may
decide to (eventually!) override the scan method to set the
"right" current channel based on what the firmware reports the
scan state is.

So for example, iwn, rsu and other NICs will eventually do this:

* driver issues scan start firmware command;
* firmware sends a "scan start on channel X" notify;
* firmware sends a bunch of beacon RX's as part of
  the scan results;
* .. and the driver will replace scan_add() curchan with channel X,
  so scan results are correct.
* firmware sends a "scan start on channel Y" notify;
* firmware sends more beacons...
* .. the driver replaces scan_add() curchan with channel Y.

Note:

* Eventually, net80211 should eventually grow the idea of a per-packet
  current channel.  It's possible in various modes (eg WAVE, P2P, etc)
  that individual frames can come in from different channels and that
  is under firmware control rather than driver/net80211 control, so
  we should support that.
2015-05-10 22:07:53 +00:00
Mark Johnston
979b8eaf4b find_next_bit() and find_next_zero_bit(): if the caller-specified offset
lies within the last block of the bit set and no bits are set beyond the
offset, terminate the search immediately instead of continuing as though
there are further blocks in the set and subsequently returning an incorrect
result.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-05-10 22:04:42 +00:00
Simon J. Gerraty
28a6bc8146 Merge bmake-20150505 improve detection of malformed conditionals. 2015-05-10 22:03:59 +00:00
Mark Johnston
3e5645b78f ctf_add_type(): when looking up an integer or floating point type in the
list of pending dynamic type definitions, a match on the type name is not
sufficient - we need to compare the type encodings as well. For example,
bitfields have their own distinct type definitions which share the name of
the underlying integer type, and these types aren't generally
interchangeable.

This bug was causing the following libdtrace error when attempting to trace
the th_flags member of a struct tcphdr:
  cg: bad field: off 104 type <32877> bits 539620016

Reported by:	rwatson
MFC after:	3 weeks
2015-05-10 21:39:24 +00:00
Thomas Quinot
55b130956d Unbreak build following rev. 282726
(Makefile.inc1): add dependency of xinstall on libmd to
avoid failure of parallel bootstrap.

(lib/libmd/*.h): do not redefine symbols if already
defined as macros (libcrypt uses the same sources internally,
redefining symbols with a prefix of its own).

Fixes build failures caused by previous change to libmd.

Reported by: ian
Pointy hat to: thomas
2015-05-10 21:21:52 +00:00
Adrian Chadd
def4ea7f78 Fix typo introduced in previous commit.
PR:		kern/199632
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-10 21:05:32 +00:00
Rui Paulo
017d485987 synaptics: more support for semi-MT trackpads.
Several improvements to the Synaptics driver to support
semi-multitouch trackpads and some other fixes:

- Two finger scrolling support for "semi-MT" touchpads. Those include
many of the older Synaptics touchpads before "true" multitouch support
(indicated by capMultiFinger). Semi-MT touchpads can report a second
finger position, but the X or Y coordinate may be swapped with some
coordinate of the first finger. This is a result of how the hardware
works internally. Therefore, all that can be reliably extracted is the
bounding box of the two finger positions. Semi-MT touchpads can be
recognized by the capAdvancedGestures capability bit. After setting the
mode byte, advanced gestures mode has to be enabled. Then, data packets
compatible with the capMultiFinger format are sent, so the same two
finger scrolling code can be leveraged. Enabling advanced gestures mode
on true multitouch touchpads should be harmless. Linux seems to always
enable advanced gestures mode.

- Put mode setting logic into own functions synaptics_preferred_mode()
and synaptics_set_mode() to have this in one place.
synaptics_passthrough_on() and synaptics_passthrough_off() currently
always use 0xc1 as the mode byte, which may be wrong for touchpads that
don't have capExtended.

- Expose X and Y resolution of touchpad to userland. Also expose minimum
and maximum X and Y coordinates. This is useful for programs in
userspace that read raw PSM packets (with PSM_LEVEL_NATIVE enabled) and
need to interpret the coordinates.

- Also send "extended w mode" packets (see section 3.2.9 of
511-000275-01_RevB.pdf) to userspace if PSM_LEVEL_NATIVE is enabled.
This is useful for userspace programs/drivers such as
xf86-input-synaptics that can handle these packets.

- Fix parsing of nExtendedQueries, and request extended/continued
capability bits depending on this value.

- capReportsMax, capClearPad, capAdvancedGestures and capCoveredPad must
be extracted from status[0] and not status[2], I think.

Submitted by:	Jan Kokemüller jan.kokemueller at gmail.com
2015-05-10 20:36:57 +00:00
Simon J. Gerraty
c21ae9a30b Import bmake-20150505 detect typo's in .if variable references. 2015-05-10 20:01:54 +00:00