Commit Graph

211219 Commits

Author SHA1 Message Date
Conrad Meyer
039b7329c1 PRINT_BUF_FLAGS: Remove removed DIRTY/PERSIST flags
This is a follow-up to r298789, which removed the B_DIRTY and B_PERSISTENT
flags.  This changeset removes them from the associated %b bit description
string as well.

Reviewed by:	pfg
Sponsored by:	EMC / Isilon Storage Division
2016-04-29 17:56:16 +00:00
John Baldwin
0ef149024f Don't require write locks on the VM object for vm_page_prev/next.
Reviewed by:	kib
Sponsored by:	Chelsio Communications
2016-04-29 17:35:28 +00:00
Pedro F. Giffuni
f3b827f3ec bufs: make B_DIRTY and B_PERSISTENT flags available
It appears these flags were related to ext2fs but are completely
unused nowadays. Retire them.

Suggested by: mckusick
2016-04-29 16:32:28 +00:00
Pedro F. Giffuni
a96c9b30e2 NFS: spelling fixes on comments.
No funcional change.
2016-04-29 16:07:25 +00:00
Andriy Gapon
27b6c49726 add invpcid instruction to i386 dtrace disassembler tables
MFC after:	2 weeks
2016-04-29 15:45:22 +00:00
Alan Somers
663f649ff6 Refactor vdev_geom_attach and friends to reduce code duplication
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
	Move checks for provider's sectorsize and mediasize into a single
	location in vdev_geom_attach. Remove the zfs::vdev::taste class;
	it's ok to use the regular vdev class for tasting. Consolidate guid
	checks into a single location in vdev_attach_ok. Consolidate some
	error handling code from vdev_geom_attach into vdev_geom_detach,
	closing a resource leak of geom consumers in the process.

Reviewed by:	avg
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D5974
2016-04-29 15:23:51 +00:00
Baptiste Daroussin
7f5ddefe05 Add a savecore_enable variable support for the savecore rc script
By default set to 'YES' so it does not change the current behaviour for users,
this variable allows to decide to not extract crach dumps from the dump
device at boot time by setting it to "NO" in rc.conf.

Sponsored by:	Gandi.net
2016-04-29 12:23:56 +00:00
Hans Petter Selasky
d308a222e9 Regenerate usb.conf .
MFC after:	1 week
2016-04-29 12:00:36 +00:00
Hans Petter Selasky
83c5d190fe Correct some error codes to native FreeBSD ones.
Sponsored by:	Mellanox Technologies
Tested by:	Netflix
MFC after:	1 week
2016-04-29 11:01:06 +00:00
Hans Petter Selasky
21dd652701 Add function to detect the presence of a port module and use this
function to error out early when no port module is present and doing
eeprom access. This also prevents error codes from filling up in
dmesg.

Sponsored by:	Mellanox Technologies
Tested by:	Netflix
MFC after:	1 week
2016-04-29 11:00:12 +00:00
Sepherosa Ziehau
9340a8d5b9 tcp/syncache: Set flowid and hash type properly for SYN|ACK
So the underlying drivers can use it to select the sending queue
properly for SYN|ACK instead of rolling their own hash.

Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6120
2016-04-29 07:23:08 +00:00
Glen Barber
49dae58b28 Fix including Kyuafile in packaged base system.
Fix a related typo while here.

Note, this change results in the Kyuafile inclusion in the runtime
package, which needs to be fixed, however addresses the PR as far
as I can tell in my tests.

PR:		209114
Submitted by:	ngie
Sponsored by:	The FreeBSD Foundation
2016-04-29 05:28:40 +00:00
Adrian Chadd
ce725c8e00 [ath] Add LDPC transmit support.
LDPC adds better transmit reliability if both ends support it.

You in theory can do both STBC and LDPC at the same time.
If I see issues I'll disable it.

* Only enable it if both ends of a connection negotiate it.
* Disable it if any rate is non-11n.
* Count both LDPC TX and STBC TX.

Tested:

* AR9380, STA mode
2016-04-29 01:53:45 +00:00
Adrian Chadd
82525db1eb [ath] turn the BA hardware bug back into a printf().
I saw this happen a couple of times and all I saw was a dump of the
transmit descriptors.  Log the message for now so I can see whta happened.
2016-04-29 01:52:06 +00:00
Adrian Chadd
3c6b488b01 [ath] Add counters for STBC TX and LDPC TX.
This is a big no-op until the TX path changes to enable LDPC TX are
added.
2016-04-29 01:51:27 +00:00
Warren Block
d90f12e3c0 Clarify build(7) instructions for alternate object directory.
PR:		209062
Submitted by:	Shawn Debnath <sd@beastie.io>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6106
2016-04-28 22:14:09 +00:00
Enji Cooper
dc8a83a5b6 Remove logically impossible test in scsidoinquiry(..)
It was already done 4 lines prior and the value of error didn't change

MFC after: 3 days
Reported by: Coverity
CID: 1011236
Sponsored by: EMC / Isilon Storage Division
2016-04-28 21:17:23 +00:00
Adrian Chadd
f466fcd2cd [net80211] fix indenting.
Sponsored by:	Eva Automation, Inc.
2016-04-28 20:30:49 +00:00
Adrian Chadd
9b40530293 [net80211] handle action frames in adhoc mode from the node that created the BSS.
We don't have a separate bss node; instead we dup the first node we saw
and turn that into the BSS node.  This means that action frames from
that node would be rejected.

So, check that the node is the bss node /and/ the MAC doesn't match ni_macaddr.
That's the "right" way for now to verify it's an unknown node.

This fixes handling action frames in adhoc mode, which includes negotiating
11n aggregation via ADDBA/DELBA.

This by itself isn't enough to correctly create 11n adhoc networks; but
it is required for aggregation to be negotiated.

Tested:

* AR9380, 11n adhoc mode
* broadcom 11ac adhoc (vendor platform)

Sponsored by:	Eva Automation, Inc.
2016-04-28 20:29:49 +00:00
Pedro F. Giffuni
310aef3257 sys/geom: spelling fixes.
These affect debugging messages.

MFC after:	2 weeks
2016-04-28 19:26:46 +00:00
John Baldwin
8d07a66d77 Only count CPU devices that are using the ACPI CPU driver.
Arguably we should only be doing the probe/attach to children of
these devices as well.

Tested by:	Michal Stanek <mst_semihalf.com> (arm64)
Differential Revision:	https://reviews.freebsd.org/D6133
2016-04-28 18:53:14 +00:00
Enji Cooper
2357dac430 Fix va_list handling
- Add missing va_end's after corresponding va_start's to cleanup state
- Eliminate questionable bzero'ing of va_list passed in to
  do_buff_decode(..) and do_encode(..) from buff_{de,en}code_visit(..)
  and csio_{de,en}code_visit(..). Make va_list a pointer instead and
  pass NULL into the underlying functions to handler this in a portable
  way.
- Do some minor style(9) clean up in affected functions.

Differential Revision: https://reviews.freebsd.org/D6072
MFC after: 3 days
Reported by: cppcheck, Coverity
CID: 1018500-1018503
Reviewed by: cem
Sponsored by: EMC / Isilon Storage Division
2016-04-28 18:41:55 +00:00
John Baldwin
9aa021d416 Add some notes about the implicit resource mapping for activated resources.
Specifically, mention that rman_get_bustag/handle/virtual are valid after
a resource is activated.  Also, mention the wrapper API that accepts a
struct resource instead of a bus tag and handle.
2016-04-28 18:23:18 +00:00
John Baldwin
9a1be350ea Document RF_PREFETCHABLE. 2016-04-28 18:01:25 +00:00
Enji Cooper
a08b636a9d Use a better idiom for finding UTC prefixed timezones
Instead of copy-pasting the string literal for "UTC" 3 times and using
strlen, use a static char[3] buffer and sizeof(..).

MFC after: 3 days
X-MFC with: r298507
Submitted by: kib
Sponsored by: EMC / Isilon Storage Division
2016-04-28 17:57:17 +00:00
John Baldwin
55c661caad Document PCI_RES_BUS as a possible resource type. 2016-04-28 17:50:16 +00:00
John Baldwin
de70bf980b Remove a stale reference to the removed RF_TIMESHARE flag. 2016-04-28 17:48:52 +00:00
Randall Stewart
abb901c5d7 Complete the UDP tunneling of ICMP msgs to those protocols
interested in having tunneled UDP and finding out about the
ICMP (tested by Michael Tuexen with SCTP.. soon to be using
this feature).

Differential Revision:	http://reviews.freebsd.org/D5875
2016-04-28 15:53:10 +00:00
Pedro F. Giffuni
0b33b55b01 Small typo. 2016-04-28 15:20:08 +00:00
Pedro F. Giffuni
e45a63ee67 Small typos. 2016-04-28 15:18:28 +00:00
Alan Somers
654399bfd4 Add PACKAGE fields to usr.sbin/extattr/tests/Makefile
usr.sbin/extattr/tests/Makefile
	Add boiler plate required by 298107 but omitted by 298483.  These
	two changes passed through CR in parallel.  I think this should get
	the full test suite running in Jenkins again.

MFC after:	22 days
X-MFC-with:	298483
Sponsored by:	Spectra Logic Corp
2016-04-28 15:13:50 +00:00
Randall Stewart
e5ad64562a This cleans up the timers code in TCP to start using the new
async_drain functionality. This as been tested in NF as well as
by Verisign. Still to do in here is to remove all the old flags. They
are currently left being maintained but probably are no longer needed.

Sponsored by:	Netflix Inc.
Differential Revision:	http://reviews.freebsd.org/D5924
2016-04-28 13:27:12 +00:00
Michal Meloun
329ee7e3dc TEGRA: Add interrupt support for Tegra GPIO controller. 2016-04-28 13:00:40 +00:00
Andrew Turner
4b6f23dfaf Stop using sbrk(2) with malloc. This helps reduce the number of places
within the tree where we call this legacy interface.

Reviewed by:	jasone
Obtained from:	brooks
Sponsored by:	ABT Systems Ltd
2016-04-28 12:24:58 +00:00
Michal Meloun
bdb02ec712 ARM: Use kernel pmap as intermediate mapping in context switch.
On ARM, we can directly switch between translation tables only when
the size of the mapping for any given virtual address is the same in
the old and new translation tables. The load of new TTB and subsequent
TLB flush is not atomic operation. So speculative page table walk can
load TLB entry from new mapping while rest of TLB entries are still the
old ones. In worst case, this can lead to situation when TLB cache can
contain multiple matching TLB entries. One (from old mapping) L2 entry
for VA + 4k and one (from new mapping) L1 entry for VA.

Thus, we must switch to kernel pmap translation table as intermediate
mapping because all sizes of these (old pmap and kernel pmap) mappings
are same (or unmapped). The same is true for switch from kernel pmap
translation table to new pmap one.
2016-04-28 12:05:07 +00:00
Michal Meloun
8442087f15 INTRNG: Define 'INTR_IRQ_INVALID' constant and use it consistently
as error indicator.
2016-04-28 12:04:12 +00:00
Michal Meloun
39f6c1bdf4 GPIO: Add support for gpio pin interrupts.
Add new function gpio_alloc_intr_resource(), which allows an allocation
of interrupt resource associated to given gpio pin. It also allows to
specify interrupt configuration.

Note: This functionality is dependent on INTRNG, and must be
implemented in each GPIO controller.
2016-04-28 12:03:22 +00:00
Andriy Gapon
f9ac50ac45 fix missing variable in r298736
Pointyhat to:	avg
Reported by:	Ivan Klymenko <fidaj@ukr.net>
MFC after:	2 weeks
X-MFC with:	r298736
2016-04-28 09:40:24 +00:00
Andriy Gapon
e5e4452078 ensure that initial local apic id is sane on AMD 10h systems
Summary:
The Initial Local APIC ID is returned by CPUID function 1 (in EBX).
On AMD Family 10h systems the way that ID is built is controlled by
an MSR bit (InitApicIdCpuIdLo).  BKDG instructs BIOS to set it in a
certain way, but a BIOS can be buggy.  In that case the ID can confuse
tools that use it, e.g. hwloc.
For example, on a system that I own real Local APIC IDs are configured
as 0, 1, 2, 3, but IDs reported via CPUID.1 are 0, 0x40, 0x80, 0xc0.
See: https://github.com/open-mpi/hwloc/issues/183

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D6060
2016-04-28 08:29:57 +00:00
Andrew Rybchenko
341134426f sfxge(4): do not use RxQ index as label
Labels are limitted by 32 on EF10. It is not sufficient on powerful hosts.
Since only one RxQ is running over each EvQ, zero label may be used.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
PR:             208267
Differential Revision:  https://reviews.freebsd.org/D6121
2016-04-28 06:20:43 +00:00
Pedro F. Giffuni
5fe2c518bd ndis(4): it's rather unrealistic to expect a size_t here.
int was actually OK, and u_int is more than enough.
2016-04-28 03:19:53 +00:00
Pedro F. Giffuni
a5b50fbc20 ipdivert: Remove unnecessary and incorrectly typed variable.
In principle n is only used to carry a copy of ipi_count, which is
unsigned, in the non-VIMAGE case, however ipi_count can be used
directly so it is not needed at all. Removing it makes things look
cleaner.
2016-04-28 02:46:08 +00:00
Pedro F. Giffuni
b114da42af sys/devfs: unsign an index to prevent signed integer overflow.
cdp_maxdirent in struct:cdev_priv is of type u_int.  Use the same
type for the corresponding index in devfs_revoke().

MFC after:	1 week
2016-04-28 02:39:43 +00:00
Pedro F. Giffuni
9119df34df ndis(4): unsign some indexes to prevent overflows.
The "len" parameter is uint32_t, indexing it with an int may
end up in a signed integer overflow.

strlen(3) returns an integer of size_t so the corresponding index should
have that size.

MFC after:	1 week
2016-04-28 01:58:56 +00:00
Sepherosa Ziehau
9b436b180c tcp/lro: Fix more typo
Noticed by:	hiren
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-28 01:43:18 +00:00
John Baldwin
164a37a55a Trim redundant message.
WITNESS_WARN() appends "with non-sleepable lock" to the caller's message.

Sponsored by:	Chelsio Communications
2016-04-27 21:51:24 +00:00
John Baldwin
1b424b5655 Adjust prototypes for NUMA-related functions to match the style of the
rest of this file.
2016-04-27 21:12:05 +00:00
Emmanuel Vadot
30c05743c4 Add support for the Non-maskable interrupt driver found in the Allwinner A20 and A31 SoCs.
This is normally used for the PMU.

Reviewed by:	andrew
Approved by:	andrew (mentor)
Differential Revision:	https://reviews.freebsd.org/D5663
2016-04-27 20:49:57 +00:00
Jung-uk Kim
f8628d5bf2 Fix build without ACPI_DEBUG. 2016-04-27 20:24:48 +00:00
John Baldwin
5e45663658 Fix build for systems without PCI_RES_BUS.
Submitted by:	vangyzen
2016-04-27 19:54:56 +00:00