Commit Graph

216014 Commits

Author SHA1 Message Date
Wojciech Macek
988d9b3505 Add driver for PCIe root complex on Annapurna Alpine platform.
The driver subclasses pci-host-generic and additionally
performs configuration of vendor-specific PCIe registers.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           wma
Differential Revision: https://reviews.freebsd.org/D7571
2016-09-20 11:11:06 +00:00
Konstantin Belousov
65afaac0c3 Move pmap_p*e_index() inline functions from pmap.c to pmap.h.
They are already used in minidump code.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-09-20 09:38:07 +00:00
Wojciech Macek
eaa797943e Update Annapurna Alpine HAL
alpine-hal SerDes file was omitted in the previous commit.
Files added here.
All unnecessary (old) files were also removed.
Merge from vendor-sys, r306017
2016-09-20 09:19:22 +00:00
Edward Tomasz Napierala
0c4440c3aa Follow up r305988 by removing g_bio_run_task and related code.
The g_io_schedule_up() gets its "if" condition swapped to make
it more similar to g_io_schedule_down().

Suggested by:	mav@
Reviewed by:	mav@
MFC after:	1 month
2016-09-20 09:18:33 +00:00
Sepherosa Ziehau
fa8c981396 hyperv/storvsc: Fix SRB length setting.
This fixes disk discovery issue on WS2008R2 Hyper-V, which plagued
us since 10.2-release.

Reported by:	many
MFC after:	3 days
Sponsored by:	Microsoft
2016-09-20 08:52:45 +00:00
Sepherosa Ziehau
5260781e82 hyperv/hn: Let the caller of hn_nvs_doinit() do the error logging.
So that NVS version probing failure does not look too scary.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7950
2016-09-20 05:45:18 +00:00
Sepherosa Ziehau
a572f6042a hyperv/hn: Fix ifnet hwassist setup.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7948
2016-09-20 05:26:40 +00:00
Edward Tomasz Napierala
81eaa5685e Fix -media to not mount ufs with "async"; it doesn't make sense when
there is softupdates.

Suggested by:	imp@
MFC after:	1 month
2016-09-20 04:54:00 +00:00
Edward Tomasz Napierala
921bf145a6 Stop appending "noatime" in the autofs -media map, and instead add it
to auto_master, since all filesystems seem to support it.  It's cleaner
this way, and easier to customize.

MFC after:	1 month
2016-09-20 04:52:01 +00:00
Warner Losh
19b7fe02c4 Document existing practice and be more clear about sys/foo.h files
being alphabetical with sys/param.h or sys/types.h being first. Expand
the example to hopefully make this (slightly) clearer.

Noticed by: cem@
2016-09-20 04:50:53 +00:00
Edward Tomasz Napierala
554159ec95 Make autofs(5) -media map also use "async" and "noatime" for ext2fs(5).
Suggested by:	pfg@
MFC after:	1 month
2016-09-20 04:33:58 +00:00
Mark Johnston
feba6b4163 libdwarf: Add definitions for Apple's DWARF extension attributes.
Reviewed by:	emaste
MFC after:	1 week
2016-09-20 00:22:35 +00:00
Imre Vadász
bff11ce594 [iwm] Improve reliability of iwm_release on disassociation a bit.
* We need to first call ivp->iv_newstate(), to enqueue the deauth/deassoc
  mgmt frame, then flush the tx queue, before actually calling
  iwm_release().

* cycling a wlan connection via wpa_cli frontend to wpa_supplicant, by
  issuing disconnect and reconnect commandos works quite well.
  (There is still an issue when disconnecting/reconnecting too quickly)

* Reassociating or roaming via wpa_supplicant is still broken.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7943
2016-09-19 22:36:30 +00:00
Imre Vadász
e4dc86e060 [iwm] Remove dead fw_totlen from struct iwm_fw_sects; clean up struct iwm_nvm_data.
* No functional change, none of these values were ever read.

* The values removed from struct iwm_nvm_data are only used for old dvm
  devices in Linux iwlwifi, and irrelevant to iwm hence.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7945
2016-09-19 22:26:37 +00:00
Imre Vadász
0ba35431ee [iwm] Use IWM_DEFAULT_SCAN_CHANNELS define as default for sc_capa_n_scan_channels.
Approved by:	adrian (mentor)
Obtained from:	Linux iwlwifi
Differential Revision:	https://reviews.freebsd.org/D7938
2016-09-19 22:23:46 +00:00
Imre Vadász
22359652af [iwm] Remove deprecated scan API definitions.
* This removes deprecated scan API definitions, which have been unused
  since the upgrade to version 16 firmware in change r303327.

* Part of this change matches the header-file changes in Linux git commit
  1f9403863c080478ad78247c89b018e95bdfb027.

* No functional change.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7937
2016-09-19 22:20:46 +00:00
Imre Vadász
fbb27a30bf [iwm] Remove wrappers around iwm_dma_contig_free() calls.
No functional changes.

Inspired by:	OpenBSD
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7933
2016-09-19 22:16:03 +00:00
Imre Vadász
0cd7fa558e [iwm] Fix iwm_poll_bit() error value check in iwm_attach().
The iwm(4) iwm_poll_bit() function returns 1 on success, and 0 on failure,
whereas the iwl_poll_bit() in Linux iwlwifi returns < 0 on failure.

So the (ret < 0) check ended up ignoring any error returned by
iwm_poll_bit().

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7932
2016-09-19 22:13:08 +00:00
Imre Vadász
739e99ba69 [iwm] Fix off-by-one check in iwm_read_firmware().
This fixes a potential buffer overrun in the firmware parsing code.

Reported by:	Coverity
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7931
2016-09-19 22:11:34 +00:00
Imre Vadász
ef81578c9f [iwm] Remove unused field from iwm_rx_data. Use uint32_t instead of enum type.
The wantresp field in struct iwm_rx_data has never been used for anything,
so we can just delete it.

Apparently struct iwm_sf_cfg_cmd was compiled correctly (using a 32bit
value to represent the enum), but it still seems like a very bad idea to use
an enum type in a __packed struct.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7930
2016-09-19 22:08:47 +00:00
Imre Vadász
b47237ce60 [iwm] Use htole16 for policy field in struct iwm_time_event_cmd_v2.
The htole32 was working fine for little-endian machines, but would have
been broken on big-endian.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7929
2016-09-19 22:06:00 +00:00
Conrad Meyer
d36899d10f Move sys/capsicum.h includes after types.h or param.h
This is not actually documented or even implied in style(9).  Make the change
to match convention.  Someone should document this convention in style(9).

Reported by:	jhb
Sponsored by:	EMC Dell Isilon
2016-09-19 20:43:03 +00:00
Ed Maste
ac7715e39e revert unintended change from r305994 2016-09-19 18:45:57 +00:00
Ed Maste
df4336ddfa Catch up to sys/capability.h rename to sys/capsicum.h in r263232
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-09-19 18:44:43 +00:00
Pedro F. Giffuni
8967299b33 mount(1): Simplify by using asprintf(3)
Instead of strlen() + malloc() + snprintf, just use asprintf().
No functional change.

Obtained from:	OpenBSD (CVS Rev. 1.67)
2016-09-19 18:42:58 +00:00
Andriy Voskoboinyk
07fa0846ca dev/usb: add USB IDs for Realtek 802.11ac wireless adapters.
They are will be used by the updated rtwn(4) / urtwn(4) driver.

Suggested by:	adrian
2016-09-19 18:36:26 +00:00
Pedro F. Giffuni
0c9426b684 hexdump(1): Simplify by using asprintf(3)
Instead of strlen() + calloc() + snprintf, just use asprintf().
No functional change.

Obtained from:	OpenBSD (CVS Rev. 1.22)
2016-09-19 18:35:22 +00:00
Ed Maste
568415f29d tcpdump: remove sys/capability.h #include
sys/capability.h is just a backwards compatibility wrapper around
sys/capsicum.h, which is already #included.
2016-09-19 17:51:56 +00:00
Edward Tomasz Napierala
bbdd6614bd Remove unused bio_taskqueue().
MFC after:	1 month
2016-09-19 17:46:15 +00:00
Ed Schouten
cbf42683f8 Sync in latest vDSOs from upstream.
- Use conditional instruction to simplify the ARMv6 vDSO. This means
  that we no longer perform any branching. In the failure case, we
  simply slide over the assignments of the return values.

  The vDSO could be improved even further by using stmia to do
  assignments in parallel. Unfortunately, the script used to generate
  these is not smart enough for that (yet).

  Spotted by: andrew@.

- Make the style of the i686 vDSO more similar to the others by using
  decimal literals.
2016-09-19 17:31:05 +00:00
Navdeep Parhar
0459a175eb cxgbe(4): Fixes to wrq stats.
- Increment tx_wrs_copied in the correct place.
- Add tx_wrs_sspace to the sysctl MIB.

Sponsored by:	Chelsio Communications
2016-09-19 17:16:51 +00:00
Conrad Meyer
10cc720c25 indent(1): Capsicumify
This is a nice and trivial program for sandboxing.  One input file, one
output file.

Reviewed by:	pfg
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7920
2016-09-19 16:16:14 +00:00
Conrad Meyer
875cba632b tr(1): Capsicumify
This is a straightforward single input, single output program for
capsicum.

Reviewed by:	bapt
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7928
2016-09-19 16:14:38 +00:00
Conrad Meyer
e75a7302d3 cmp(1): Capsicumify
Reviewed by:	allanjude, bapt, oshogbo
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D7912
2016-09-19 16:13:00 +00:00
Ed Maste
bd24e9a105 uefisign: Remove backwards-compatibility sys/capability.h support
uefisign previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version in order to facilitate development on the stable
branch. The Capsicum header is now installed as sys/capsicum.h in
stable/10 and FreeBSD 10.3, so there's no need for the backwards
compatibility support.

Reviewed by:	trasz
Sponsored by:	The FreeBSD Foundation
2016-09-19 16:07:32 +00:00
Konstantin Belousov
36596c2a29 Detect x2APIC mode on boot and obey it.
If BIOS performed hand-off to OS with BSP LAPIC in the x2APIC mode,
system usually consumes such configuration without a notice, since
x2APIC is turned on by OS if possible (nop).  But if BIOS
simultaneously requested OS to not use x2APIC, code assumption that
that xAPIC is active breaks.

In my opinion, we cannot safely turn off x2APIC if control is passed
in this mode.  Make madt.c ignore user or BIOS requests to turn x2APIC
off, and do not check the x2APIC black list.  Just trust the config
and try to continue, giving a warning in dmesg.

Reported and tested by:	Slawa Olhovchenkov <slw@zxy.spb.ru> (previous version)
Diagnosed by and discussed with:	avg
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-09-19 15:58:45 +00:00
Konstantin Belousov
bf9c87c813 Be more strict when selecting between snapshot/regular mount.
Reclaimed vnode type is VBAD, so succesful comparision like
devvp->v_type != VREG does not imply that the devvp references
snapshot, it might be due to a reclaimed vnode.  Explicitely check the
vnode type.

In the the most important case of ffs_blkfree(), the devfs vnode is
locked and its type is stable.  In other cases, if the vnode is
reclaimed right after the check, hopefully the buffer methods return
right error codes.

Reviewed by:	mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-09-19 15:58:33 +00:00
Andrew Turner
5a3a700931 Attach the cortex strings library to the build. Only a subset of functions
have been added as some don't seem to be improvements over the libc C
implementation.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-09-19 15:08:03 +00:00
Andrew Turner
27044e1770 Fix the asm on the memchr and strchr functions.
Add an alias from index to strchr as is done in the libc C implementation.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-09-19 14:36:16 +00:00
Andrew Turner
09a53ad8f1 Import the Linaro Cortex Strings library into contrib.
Sponsored by:	The FreeBSD Foundation
2016-09-19 13:12:09 +00:00
Enji Cooper
bddfc749fa Remove change accidentally committed via r305963 for upcoming tests/sys/fs/...
work

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2016-09-19 09:15:12 +00:00
Edward Tomasz Napierala
1f902c4a09 Make autofs use the "noatime" flag for msdosfs, ntfs, and ufs
filesystems mounted on /media.

MFC after:	1 month
2016-09-19 08:55:36 +00:00
Edward Tomasz Napierala
0d0d6e4842 Make autofs use the "async" flag for msdosfs and ufs filesystems mounted
on /media.

MFC after:	1 month
2016-09-19 08:51:27 +00:00
Sepherosa Ziehau
8377ced7ee hyperv/hn: Allow RSS capability flipping upon attach/reinit.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7927
2016-09-19 07:47:56 +00:00
Sepherosa Ziehau
12fe8fd761 hyperv/hn: Stringent RSS sysctl checks
- Don't change RNDIS RSS configuration for RSS key sysctl, if the
  interface is not capable of RSS yet.
- Don't change RSS indirect table (both cached one and RNDIS RSS
  configuration), if the interface is not capable of RSS yet.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7924
2016-09-19 07:39:42 +00:00
Sepherosa Ziehau
6be919751f hyperv/hn: Don't allow MTU change, if it is not supported by the NVS.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7923
2016-09-19 07:32:08 +00:00
Sepherosa Ziehau
ae75f7ee26 hyperv/hn: Save capabilities for later use.
And don't allow capability changes during reinitialization, which
breaks too much static configuration.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7922
2016-09-19 07:17:43 +00:00
Enji Cooper
34ccb11831 Reindent TESTSDIR definition for consistency/readability
MFC after:		3 days
Sponsored by:		Dell EMC Isilon
2016-09-19 07:07:55 +00:00
Sepherosa Ziehau
363b7d88f6 hyperv/hn: Don't allow NVS and NDIS version change upon reinitailization
NVS and NDIS version change would break too much assumption and static
configuration.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7919
2016-09-19 07:07:23 +00:00
Enji Cooper
b3ef7604b9 Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and add
it to lib/libc/tests/sys/Makefile [*]

Even though make -VPACKAGE and make -n install seem to do the right thing,
the effects are a bit different, depending on the build host.

MFC after:		1 week
Obtained from:		HardenedBSD (af602f0db) [*]
Reported by:		Oliver Pinter <oliver.pinter@hardenedbsd.org> [*]
Sponsored by:		Dell EMC Isilon
2016-09-19 06:59:17 +00:00