Commit Graph

106641 Commits

Author SHA1 Message Date
Ed Maste
5e74264452 Move dtrace/opensolaris/zfs module option to common section
These are not target-specific modules, so the logic to build them should
be common.  This also enables them for arm64.

Sponsored by:	The FreeBSD Foundation
2015-10-23 12:59:54 +00:00
Jason A. Harmening
7c989c156f Fix capitalization 2015-10-23 12:06:06 +00:00
Jason A. Harmening
a50730587b Remove unclear comment about address truncation in busdma. Add (hopefully much clearer) comment at declaration of PHYS_TO_VM_PAGE().
Noted by:	avg
2015-10-23 12:03:25 +00:00
Konstantin Belousov
3f8e071052 Add CLFLUSHOPT instruction wrappers.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-10-23 11:45:38 +00:00
Konstantin Belousov
c0db387d25 Decode new values for CPUID leaf 2 cache and TLB descriptors, from the
Intel SDM revision 56.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-10-23 11:43:56 +00:00
Konstantin Belousov
cd0a26c53f Fix build for the KTR-enabled kernels.
Sponsored by:	The FreeBSD Foundation
2015-10-23 11:41:55 +00:00
Hans Petter Selasky
74a24bbee6 Fix kernel build by restoring a temporary variable which was not yet
ripe for removal.
2015-10-23 11:00:35 +00:00
Alexander Motin
aeb1faa040 Fix LUN disable in CAM broken at r285155.
MFC after:	1 week
2015-10-23 10:39:43 +00:00
Alexander Motin
c07b9e0752 Disable full bus scan by CAM for FC adapters.
FC port database code already notifies CAM about all devices.  Additional
full scan is just a waste of time, that by definition won't find anything
that is not present in port database.
2015-10-23 08:53:32 +00:00
Andriy Voskoboinyk
74ee6e03d0 urtwn(4): add DBM_ANTNOISE radiotap field
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D3839
2015-10-23 08:44:40 +00:00
Alexander Motin
6ce548a105 Some polishing and unification in ISR code. 2015-10-23 08:26:45 +00:00
Andriy Voskoboinyk
e97705d4b7 - Split one 4-byte R92C_CR register into 2-byte R92C_CR and 1-byte R92C_MSR
registers (they are used for different purposes).
- Wrap R92C_MSR modifications into urtwn_set_mode().

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D3838
2015-10-23 08:26:26 +00:00
Andriy Voskoboinyk
1b65f30ffa urtwn(4): fix the RSSI calculation for RTL8188EU.
This change also reverts r252405 (causes integer underflow).

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D3820
2015-10-23 07:42:56 +00:00
Adrian Chadd
8f335b62c1 otus(4) - add missing ieee80211_free_node() call. 2015-10-23 02:09:23 +00:00
Adrian Chadd
b0f4d8f05a otus(4) - demagicify register names.
Obtained from:	Linux carl9170 hw.h
2015-10-23 02:08:47 +00:00
Adrian Chadd
5433f3578a otus(4): begin supporting raw transmit parameters in otus_tx()
* Add a comment about the parameters I should support, stolen shamelessly
  from iwn(4);
* Implement the rate bit for the raw transmit path;
* Print out the host-order versions of each of the transmit bits, so
  I have a hope in heck of debugging why things are going wrong.

This still doesn't fix 5GHz in the office but that's likely due to a lot
of other configuration parameters being 2GHz-specific.  That'll come next.

Tested:

* AR9170 + AR9103 (2/5GHz) 2x2, 5GHz association
2015-10-23 00:48:00 +00:00
Conrad Meyer
592fe72d77 ioat_test: Add a colon (':') for style
Missed in r289776.

Sponsored by:	EMC / Isilon Storage Division
2015-10-22 23:08:08 +00:00
Conrad Meyer
1c25420ea8 ioat: Clean up logging
Replace custom Linux-like logging with a thin shim around
device_printf(), when the softc is available.

In ioat_test, shim around printf(9) instead.

Sponsored by:	EMC / Isilon Storage Division
2015-10-22 23:03:33 +00:00
Conrad Meyer
f09b75d4b5 if_ntb: Use ffsll() now that it is broadly available
Sponsored by:	EMC / Isilon Storage Division
2015-10-22 23:03:24 +00:00
Conrad Meyer
0a7663c2c0 NTB: Add device introspection sysctl hierarchy
This should export all of the same information as the Linux ntb_hw_intel
debugfs info file, but with a bit more structure, in the sysctl tree
rooted at 'dev.ntb_hw.<N>.debug_info'.

Raw registers are marked as OPAQUE because reading them on some hardware
revisions may cause a hard lockup (NTB errata).  They can be read with
'sysctl -x dev.ntb_hw.<N>.debug_info.registers'.  On Xeon platforms,
some additional registers are available under 'registers.xeon_stats' and
'registers.xeon_hw_err'.  They are exported as big-endian values so that
the 'sysctl -x' output is legible.

Shrink the feature mask to 32 bits so we can use the %b formatter in
'debug_info.features'.

Sponsored by:	EMC / Isilon Storage Division
2015-10-22 23:03:15 +00:00
Conrad Meyer
c3220d0b6d Sysctl: Add common support for U8, U16 types
Sponsored by:	EMC / Isilon Storage Division
2015-10-22 23:03:06 +00:00
John Baldwin
f2264f5048 Regen for linux32 rename and linux64 systrace. 2015-10-22 21:33:37 +00:00
John Baldwin
ea7b054e99 Missing regen after last change to sys/kern/syscalls.master. 2015-10-22 21:30:39 +00:00
John Baldwin
2f99bcce1e Rename remaining linux32 symbols such as linux_sysent[] and
linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with
linux64.ko.  While here, add support for linux64 binaries to systrace.
- Update NOPROTO entries in amd64/linux/syscalls.master to match the
  main table to fix systrace build.
- Add a special case for union l_semun arguments to the systrace
  generation.
- The systrace_linux32 module now only builds the systrace_linux32.ko.
  module on amd64.
- Add a new systrace_linux module that builds on both i386 and amd64.
  For i386 it builds the existing systrace_linux.ko.  For amd64 it
  builds a systrace_linux.ko for 64-bit binaries.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D3954
2015-10-22 21:28:20 +00:00
John Baldwin
5047105b71 Merge r289055 to amd64/linux32:
linux: fix handling of out-of-bounds syscall attempts

Due to an off by one the code would read an entry past the table, as
opposed to the last entry which contains the nosys handler.
2015-10-22 21:23:58 +00:00
Conrad Meyer
65327c21ed libkern: ffs, fls: s/4/3/ the 3rd BSD clause
Approved by:	emaste
Sponsored by:	EMC / Isilon Storage Division
2015-10-22 21:04:47 +00:00
Conrad Meyer
3d3e385e75 Add libkern ffsll() for parity with flsll()
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3962
2015-10-22 20:28:37 +00:00
Conrad Meyer
7afbb2638e ioat: Fix some attach/detach issues
Don't run the selftest until after we've enabled bus mastering, or the
DMA engine can't copy anything for our test.

Create the ioat_test device on attach, if so tuned.  Destroy the
ioat_test device on teardown.

Replace deprecated 'CALLOUT_MPSAFE' with correct '1' in callout_init().

Sponsored by:	EMC / Isilon Storage Division
2015-10-22 16:46:21 +00:00
Jason A. Harmening
0820c78e93 Use pmap_quick* functions in armv6 busdma, for bounce buffers and cache maintenance. This makes it safe to sync buffers that have no VA mapping associated with the busdma map, but may have other mappings, possibly on different CPUs. This also makes it safe to sync unmapped bounce buffers in non-sleepable thread contexts.
Similar to r286787 for x86, this treats userspace buffers the same as unmapped buffers and no longer borrows the UVA for sync operations.

Submitted by: 	Svatopluk Kraus <onwahe@gmail.com> (earlier revision)
Tested by:	Svatopluk Kraus
Differential Revision:	https://reviews.freebsd.org/D3869
2015-10-22 16:38:01 +00:00
Andriy Voskoboinyk
5a5461d8e0 urtwn(4): replace hardcoded rate indices with their names
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D3967
2015-10-22 15:42:53 +00:00
Andriy Voskoboinyk
f9e5b3821a wtap: remove some obsolete radiotap(9) code
This code is not needed since r192468.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D3975
2015-10-22 15:20:33 +00:00
Adrian Chadd
bd1df7e776 Commit the right board file - use the right name + hints. 2015-10-22 15:15:45 +00:00
Alexander Motin
ed8ba339fe Remove residual verbosity.
firmware_register() already reports errors.
2015-10-22 15:13:47 +00:00
Andriy Voskoboinyk
cc52232057 Initialize radiotap header fields before calling ieee80211_radiotap_rx()
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D3951
2015-10-22 12:15:40 +00:00
Ed Schouten
2ff069a7bc Add support for CloudABI on ARM64.
It turns out that it is pretty easy to make CloudABI work on ARM64. We
essentially only need to copy over the sysvec from AMD64 and ensure that
we use ARM64 specific registers.

As there is an overlap between function argument and return registers,
we do need to extend cloudabi64_schedtail() to only set its values if
we're actually forking. Not when we're creating a new thread.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D3917
2015-10-22 11:09:25 +00:00
Hans Petter Selasky
2da3897d01 Rename linuxapi[.ko] into linuxkpi[.ko], to reflect that it is a
kernel programming interface module, KPI, to avoid confusion with the
existing Linux userspace binary compatibility shims. Bump the
FreeBSD_version number.

Reviewed by:	np @
Suggested by:	dumbbell @
Sponsored by:	Mellanox Technologies
2015-10-22 09:50:45 +00:00
Ed Schouten
aff5735784 Add a way to distinguish between forking and thread creation in schedtail.
For CloudABI we need to initialize the registers of new threads
differently based on whether the thread got created through a fork or
through simple thread creation.

Add a flag, TDP_FORKING, that is set by do_fork() and cleared by
fork_exit(). This can be tested against in schedtail.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D3973
2015-10-22 09:33:34 +00:00
Ed Schouten
b78ef4bd86 Refactoring: move out generic bits from cloudabi64_sysvec.c.
In order to make it easier to support CloudABI on ARM64, move out all of
the bits from the AMD64 cloudabi_sysvec.c into a new file
cloudabi_module.c that would otherwise remain identical. This reduces
the AMD64 specific code to just ~160 lines.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D3974
2015-10-22 09:07:53 +00:00
Adrian Chadd
bb5c955e8d Add support for the TP-Link TL-WR740N v4.
This is an AR9331 part based on the AP121 reference design but with
32MB RAM.  Yes, it has 4MB flash and it has no USB, so clever hacks
are required to get it up and working.

But boot/work it does.
2015-10-22 08:08:06 +00:00
Adrian Chadd
73f96038d2 arge: use 1-byte TX and RX alignment for AR9330/AR9331.
This part seems to work bug-free with single byte TX/RX buffer alignment.

This drops the CPU requirement to bridge 100mbit iperf from 100% CPU
to ~ 50% CPU.

Tested:

* AP121 (AR9330) SoC, highly magic netbooted kernel + USB rootfs
  due to 4mb flash, 16mb RAM; doing bridging between arge0 and arge1.

Notes:

* Yes, I likely can also turn this on for the AR934x SoC family now.

  But since hardware design apparently follows similar branching
  strategies to software design, I'll go and make sure all the AR934x's
  that made it out into shipping products work before I flip it on.
2015-10-22 08:02:27 +00:00
Conrad Meyer
7c69db50df Improve flexibility of ioat_test / ioatcontrol(8)
The test logic now preallocates memory before running the test.

The buffer size is now configurable.  Post-copy verification is
configurable.  The number of copies to chain into one transaction (one
interrupt) is configurable.

A 'duration' mode is added, which repeats the test until the duration
has elapsed, reporting the B/s and transactions completed.

ioatcontrol.8 has been updated to document the new arguments.

Initial limits (on this particular Broadwell-DE) (and when the
interrupts are working) seem to be: 256 interrupts/sec or ~6 GB/s,
whichever limit is more restrictive.

Unfortunately, it seems the interrupt-reset handling on Broadwell isn't
working as intended.  That will be fixed in a later commit.

Sponsored by:	EMC / Isilon Storage Division
2015-10-22 04:38:05 +00:00
Conrad Meyer
b81eee4a22 ioat: Define IOAT_XFERCAP_VALID_MASK and use in ioat_read_xfercap
Instead of ANDing a magic constant later.

Sponsored by:	EMC / Isilon Storage Division
2015-10-22 04:33:05 +00:00
Kevin Lo
92619f554a Fix IEEE80211_ADDR_COPY() usage.
Reviewed by:	adrian
2015-10-22 01:36:16 +00:00
Ian Lepore
b180eb215d Add FDT compatibility to the icee driver.
The FDT bindings for eeprom parts don't include any metadata about the
device other than the part name encoded in the compatible property.
Instead, a driver is required to have a compiled-in table of information
about the various parts (page size, device capacity, addressing scheme).  So
much for FDT being an abstract description of hardware characteristics, huh?

In addition to the FDT-specific changes, this also switches to using the
newer iicbus_transfer_excl() mechanism which holds bus ownership for the
duration of the transfer.  Previously this code held the bus across all
the transfers needed to complete the user's IO request, which could be
up to 128KB of data which might occupy the bus for 10-20 seconds.  Now the
bus will be released and re-aquired between every page-sized (8-256 byte)
transfer, making this driver a much nicer citizen on the i2c bus.

The hint-based configuration mechanism is still in place for non-FDT systems.

Michal Meloun contributed some of the code for these changes.
2015-10-22 01:04:31 +00:00
Ian Lepore
4c1e5d32b2 Add iicbus_transfer_excl(), a helper routine to do an i2c bus transaction
while holding exclusive ownership of the bus.  This is the routine most
slave drivers should use unless they have a need to acquire and hold the
bus across a series of related operations that involves multiple transfers.
2015-10-22 00:54:59 +00:00
John Baldwin
d836c868a8 i915_gem_do_execbuffer() holds the pages backing each relocation region for
various reasons while executing user commands.  After these commands are
completed, the pages backing the relocation regions are unheld.

Since relocation regions do not have to be page aligned, the code in
validate_exec_list() allocates 2 extra page pointers in the array of
held pages populated by vm_fault_quick_hold_pages().  However, the cleanup
code that unheld the pages always assumed that only the buffer size /
PAGE_SIZE pages were used.  This meant that non-page aligned buffers would
not unheld the last 1 or 2 pages in the list.  Fix this by saving the
number of held pages returned by vm_fault_quick_hold_pages() for each
relocation region and using this count during cleanup.

Reviewed by:	dumbbell, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3965
2015-10-21 20:49:45 +00:00
Ed Maste
40a02d00a5 if_tap: correct typo in sysctl description (Enably)
Sponsored by:	The FreeBSD Foundation
2015-10-21 19:56:16 +00:00
Jason A. Harmening
d394b026f6 Use pmap_quick* functions in arm64 busdma to make bounce buffer synchronization more flexible and avoid borrowing UVAs for userspace buffers. This is mostly equivalent to r286785 and r286787 for x86.
Differential Revision:	https://reviews.freebsd.org/D3870
2015-10-21 19:44:20 +00:00
Ian Lepore
2bd58a9fa5 Treat mbufs as cacheline-aligned. Even when the transfer begins at an
offset within the buffer to align the L3 headers we know the buffer itself
was allocated and sized on cacheline boundaries and we don't need to
preserve partitial cachelines at the start and end of the buffer when
doing busdma sync operations.
2015-10-21 19:24:20 +00:00
Ed Maste
598cd16442 arm64: Enable CTF for DTrace support
Sponsored by:	The FreeBSD Foundation
2015-10-21 19:08:16 +00:00
Ed Maste
41a95585a8 Build ofw_bus_if.h for modules that need it on arm64 2015-10-21 18:30:42 +00:00
Ian Lepore
2fca9311fc Free memory back into the categories it was allocated from.
Noticed by: sbruno
Pointy hat: ian
2015-10-21 17:41:20 +00:00
Alexander Motin
d775427348 Pass proper device to pci_read_config().
For some reason JMicron driver was different from others at this point.
2015-10-21 17:27:43 +00:00
Ed Schouten
810ec0efbc Add missing forward declaration of struct image_params. 2015-10-21 16:32:01 +00:00
Ian Lepore
9a2bb68894 Fix parsing of I2C addresses properties in fdt data. I2C address is
represented in 7-bits format in DT files, but system expect it in 8-bit
format.  Also, fix two drivers that locally hack around this bug.

Submitted by:	Michal Meloun <meloun@miracle.cz>
2015-10-21 15:41:16 +00:00
Alexander Motin
5124012aae Make some panic strings mode informative. 2015-10-21 15:31:26 +00:00
Ian Lepore
f9a5123470 Switch mips busdma to using the common busdma_buffalloc code. This amounts
to copying in some code from the armv4 busdma, and adapting a few variable
and flag names to match the surrounding mips code.

Instead of keeping a local cache of prealloced busdma_map structs on a
mutex-protected list, set up an uma zone to cache them.

Instead of all memory allocations using M_DEVBUF, use new categories
M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists),
and M_BOUNCE for bounce pages.

When buffers are allocated out of the busdma_bufalloc zones the alignment
and size of the buffers is known, and the code can skip doing any "partial
cacheline flush" logic to preserve data that may be adjacent to the DMA
buffer but contain non-DMA data.

Reviewed by:	adrian, imp
2015-10-21 15:06:48 +00:00
Ian Lepore
f4110e9110 Switch from a stub to a real implementation of pmap_page_set_attr() for mips,
and implement support for VM_MEMATTR_UNCACHEABLE.  This will be used in
upcoming changes to support BUS_DMA_COHERENT in bus_dmamem_alloc().

Reviewed by:	adrian, imp
2015-10-21 14:57:59 +00:00
Ian Lepore
7b19ce31bb Move arm_gic_bind() out of the #ifdef SMP block to fix compile errors in
the not-SMP case.  This is safe because arm_irq_next_cpu() will return
the cpuid of the current/only core in the not-SMP case.

Submitted by:	 Bartosz Szczepanek @ semihalf
2015-10-21 13:59:00 +00:00
Roger Pau Monné
3778878d7c netfront: fix LINT-NOIP
r289587 broke LINT-NOIP kernels because the lro and queued local variables
are defined but not used. Add preprocessor guards around them.

Reported by:	emaste
Sponsored by:	Citrix Systems R&D
2015-10-21 13:53:07 +00:00
Roger Pau Monné
2f9ec994bc xen: Code cleanup and small bug fixes
xen/hypervisor.h:
 - Remove unused helpers: MULTI_update_va_mapping, is_initial_xendomain,
   is_running_on_xen
 - Remove unused define CONFIG_X86_PAE
 - Remove unused variable xen_start_info: note that it's used inpcifront
   which is not built at all
 - Remove forward declaration of HYPERVISOR_crash

xen/xen-os.h:
 - Remove unused define CONFIG_X86_PAE
 - Drop unused helpers: test_and_clear_bit, clear_bit,
   force_evtchn_callback
 - Implement a generic version (based on ofed/include/linux/bitops.h) of
   set_bit and test_bit and prefix them by xen_ to avoid any use by other
   code than Xen. Note that It would be worth to investigate a generic
   implementation in FreeBSD.
 - Replace barrier() by __compiler_membar()
 - Replace cpu_relax() by cpu_spinwait(): it's exactly the same as rep;nop
   = pause

xen/xen_intr.h:
 - Move the prototype of xen_intr_handle_upcall in it: Use by all the
   platform

x86/xen/xen_intr.c:
 - Use BITSET* for the enabledbits: Avoid to use custom helpers
 - test_bit/set_bit has been renamed to xen_test_bit/xen_set_bit
 - Don't export the variable xen_intr_pcpu

dev/xen/blkback/blkback.c:
 - Fix the string format when XBB_DEBUG is enabled: host_addr is typed
   uint64_t

dev/xen/balloon/balloon.c:
 - Remove set but not used variable
 - Use the correct type for frame_list: xen_pfn_t represents the frame
   number on any architecture

dev/xen/control/control.c:
 - Return BUS_PROBE_WILDCARD in xs_probe: Returning 0 in a probe callback
   means the driver can handle this device. If by any chance xenstore is the
   first driver, every new device with the driver is unset will use
   xenstore.

dev/xen/grant-table/grant_table.c:
 - Remove unused cmpxchg
 - Drop unused include opt_pmap.h: Doesn't exist on ARM64 and it doesn't
   contain anything required for the code on x86

dev/xen/netfront/netfront.c:
 - Use the correct type for rx_pfn_array: xen_pfn_t represents the frame
   number on any architecture

dev/xen/netback/netback.c:
 - Use the correct type for gmfn: xen_pfn_t represents the frame number on
   any architecture

dev/xen/xenstore/xenstore.c:
 - Return BUS_PROBE_WILDCARD in xctrl_probe: Returning 0 in a probe callback
   means the driver can handle this device. If by any chance xenstore is the
  first driver, every new device with the driver is unset will use xenstore.

Note that with the changes, x86/include/xen/xen-os.h doesn't contain anymore
arch-specific code. Although, a new series will add some helpers that differ
between x86 and ARM64, so I've kept the headers for now.

Submitted by:		Julien Grall <julien.grall@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3921
Sponsored by:		Citrix Systems R&D
2015-10-21 10:44:07 +00:00
Roger Pau Monné
6a306bff7f x86/xen: Consolidate xen-os.h in a single place
amd64 and i386 platform code contain very similar xen/xen-os.h

The only differences are:
 - Functions/variables/types which were unused in i386/xen/xen-os.h:
    * xen_xchg
    * __xchg_dummy
    * __xg
    * __xchg
    * atomic_t
    * atomic_inc
    * rdtscll

The functions/variables/types unused in xen-os.h can be dropped and there
is no more differences betwen amd64 and i386.

The new header is placed in x86/include/xen and each platform will have
dummy headers include x86/xen/*.h. This is to be able to include
machine/xen/*.h in the PV drivers.

Submitted by:		Julien Grall <julien.grall@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3880
Sponsored by:		Citrix Systems R&D
2015-10-21 10:04:35 +00:00
Hans Petter Selasky
03ae38081c Remove all comments deriving from Linux.
Minor rework of ilog2() function.

Suggested by:	emaste @
Sponsored by:	Mellanox Technologies
2015-10-21 09:37:34 +00:00
Hans Petter Selasky
6f2fc610dd Remove all comments deriving from Linux. Style file for FreeBSD.
Suggested by:	emaste @
Sponsored by:	Mellanox Technologies
2015-10-21 08:51:49 +00:00
Alexander Motin
b5024bfde9 Some more defines and polishing for INIT_FIRMWARE. 2015-10-21 08:23:19 +00:00
Hans Petter Selasky
29a2e474c0 Reimplement header file, remove all comments deriving from Linux and
update copyright to 2-clause BSD.

Suggested by:	emaste @
Sponsored by:	Mellanox Technologies
2015-10-21 07:59:46 +00:00
Kevin Lo
b020e15ebd Remove BUS_DMA_NOWAIT from bus_dma_tag_create() invocations as it's
no valid flag there.
2015-10-21 06:23:57 +00:00
Adrian Chadd
c358c04640 arge: Remove the debugging printf that snuck in.
This was triggering when using it as an AP bridge rather than an ethernet
bridge.

The code is unclear but it works; I'll fix it to be clearer and test
performance at a later stage.
2015-10-21 05:52:04 +00:00
Jason A. Harmening
845baf1922 Use pmap_quick* for out-of-context bounce buffers and (limited) cache maintenance of unmapped buffers in armv5 busdma.
Tested by:	Mattia Rossi <mattia.rossi.mailinglists@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3522
2015-10-21 04:53:34 +00:00
Kevin Lo
4b0d8bec6b Switch PCI register reads from using magic numbers to using the names
defined in pcireg.h
2015-10-21 02:50:22 +00:00
Adrian Chadd
240de6998b arge: don't do the rx fixup copy and just offset the mbuf by 2 bytes
The existing code meets the "alignment" requirement for the l3 payload
by offsetting the mbuf by uint64_t and then calling an rx fixup routine
to copy the frame backwards by 2 bytes.  This DWORD aligns the
L3 payload so tcp, etc doesn't panic on unaligned access.

This is .. slow.

For arge MACs that support 1 byte TX/RX address alignment, we can do
the "other" hack: offset the RX address of the mbuf so the L3 payload
again is hopefully DWORD aligned.

This is much cheaper - since TX/RX is both 1 byte align ready (thanks
to the previous commit) there's no bounce buffering going on and there
is no rx fixup copying.

This gets bridging performance up from 180mbit/sec -> 410mbit/sec.
There's around 10% of CPU cycles spent in _bus_dmamap_sync(); I'll
investigate that later.

Tested:

* QCA955x SoC (AP135 reference board), bridging arge0/arge1
  by programming the switch to have two vlangroups in dot1q mode:

# ifconfig bridge0 inet 192.168.2.20/24
# etherswitchcfg config vlan_mode dot1q
# etherswitchcfg vlangroup0 members 0,1,2,3,4
# etherswitchcfg vlangroup1 vlan 2 members 5,6
# etherswitchcfg port5 pvid 2
# etherswitchcfg port6 pvid 2
# ifconfig arge1 up
# ifconfig bridge0 addm arge1
2015-10-21 01:41:18 +00:00
Adrian Chadd
8f1cf028d3 AR8327: Fix up the ability to configure the vlangroup configuration for the CPU port
I messed up when doing the reset_vlans method - setting vid[0] = 1 here
was making it 'hidden' from configuration (as it needed ETHERSWITCH_VID_VALID
as well) and so there was no way to configure vlangroup0.

In per-port VLAN mode, vlangroup0 is for the CPU port (port0).
Now, it normally wouldn't really matter - the CPU port thus sees
all other ports. However there are two CPU ports on the AR8327 and
so port0 (arge0) was seeing all traffic on port6 (arge1).
If you thus tried to use arge1/port6 for anything (eg a WAN port)
in a bridge group then things would very upset very quickly.

Whilst here, add a comment to remind myself that yes, it'd be nice
if we could specify a boot-time switch config.

Tested:

* AP135 reference platform w/ AR8327N switch
2015-10-20 21:18:02 +00:00
Konstantin Belousov
8fc3db038e Trim spaces at end of line to record the proper commit message for
r289660:

Do not allow to execute ptrace(PT_TRACE_ME) when the process is
already traced.

Do not allow to execute ptrace(PT_TRACE_ME) when there is no parent
which can trace the process, i.e. when the parent is already init.
Note that after the PT_TRACE_ME request the process is unkillable and
non-continuable until a debugger is attached, or parent is killed, the
later clears P_TRACED state.  Since init clearly would not debug the
caller, and cannot be killed, disallow creation of unkillable
processes.

Reviewed by:	jhb, pho
Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D3908
2015-10-20 20:38:20 +00:00
Konstantin Belousov
1b253694f4 Mark struct thread zone as type-stable.
When establishing the locking state for several lock types (including
blockable mutexes and sx) failed, locking primitives try to spin while
the owner thread is running.  The spinning loop performs the test for
running condition by dereferencing the owner->td_state field of the
owner thread.  If the owner thread exited while spinner was put off
the processor, it is harmless to access reused struct thread owner,
since in some near future the current processor would notice the owner
change and make appropriate progress.  But it could be that the page
which carried the freed struct thread was unmapped, then we fault
(this cannot happen on amd64).

For now, disallowing free of the struct thread seems to be good
enough, and tests which create a lot of threads once, did not
demonstrated regressions.

Reviewed by:	jhb, pho
Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D3908
2015-10-20 20:29:21 +00:00
Konstantin Belousov
77b9bec37b Reviewed by: jhb, pho
Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D3908
2015-10-20 20:22:57 +00:00
Konstantin Belousov
1ed2e49b55 No need to dereference struct proc to pids when comparing processes
for equality.

Reviewed by:	jhb, pho
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-10-20 20:12:42 +00:00
Jean-Sébastien Pédron
238b89fcad iicbus: Use device_delete_children() instead of explicit child removal
If the bus is detached and deleted by a call to device_delete_child() or
device_delete_children() on a device higher in the tree, I²C children
were already detached and deleted. So the device_t pointer stored in sc
points to freed memory: we must not try to delete it again.

By using device_delete_children(), we let subr_bus.c figure out if there
are children to take care of.

While here, make sure iicbus_detach() and iicoc_detach() call
device_delete_children() too, to be safe.

Reviewed by:	jhb, imp
Approved by:	jhb, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3926
2015-10-20 19:52:59 +00:00
Jean-Sébastien Pédron
b90d6d94c1 iicbus: Remove trailing whitespaces
MFC after:	1 week
2015-10-20 19:47:08 +00:00
Sean Bruno
205bb74daa Disable SWAPPING as we don't do it on this board. 2015-10-20 19:32:26 +00:00
Conrad Meyer
a69ff5b1ee NTB: Revert r289645
Per Benno, this is a Linuxism we do not need in FreeBSD.

Suggested by:	benno
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:32:16 +00:00
Conrad Meyer
d9503a7fcd if_ntb: Diff-reduce with Linux; add queue index type
Add ntb_q_idx_t so it is more clear which struct members are of the same
type (some bogus uint64_ts snuck in that should have been unsigned int).

Add tx_err_no_buf and s/ENOMEM/EBUSY/ in tx_enqueue to match Linux.

Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:21:01 +00:00
Conrad Meyer
2d6501b281 NTB: MFV 8c9edf63: Fix zero size or integer overflow in ntb_set_mw
A plain 32 bit integer will overflow for values over 4GiB.

Change the plain integer size to the appropriate size type in
ntb_set_mw.  Change the type of the size parameter and two local
variables used for size.

Even if there is no overflow, a size of zero is invalid here.

Authored by:	Allen Hubbe
Reported by:	Juyoung Jung
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:20:52 +00:00
Conrad Meyer
4994fe1295 NTB: MFV da2e5ae5: Fix ntb_transport out-of-order RX update
It was possible for a synchronous update of the RX index in the error
case to get ahead of the asynchronous RX index update in the normal
case.  Change the RX processing to preserve an RX completion order.

There were two error cases.  First, if a buffer is not present to
receive data, there would be no queue entry to preserve the RX
completion order.  Instead of dropping the RX frame, leave the RX frame
in the ring.  Schedule RX processing when RX entries are enqueued, in
case there are RX frames waiting in the ring to be received.

Second, if a buffer is too small to receive data, drop the frame in the
ring, mark the RX entry as done, and indicate the error in the RX entry
length.  Check for a negative length in the receive callback in
ntb_netdev, and count occurrences as rx_length_errors.

Authored by:	Allen Hubbe
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:20:42 +00:00
Conrad Meyer
8a26cf17c6 if_ntb: Correct over-long lines, use qmin()
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:20:33 +00:00
Conrad Meyer
bbea13c586 if_ntb: Use if_printf instead of device_printf
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:20:24 +00:00
Conrad Meyer
eccd1f0a14 NTB: MFV 2f887b9a: Rename Intel code names to platform names
Mechanically replace "SOC" with "ATOM" to match Linux.  No functional
change.  Original Linux commit log follows:

Instead of using the platform code names, use the correct platform names
to identify the respective Intel NTB hardware.

Authored by:	Dave Jiang
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:20:15 +00:00
Conrad Meyer
3a8a0a9dfa NTB: Don't abort if setting a MW write-combine fails
Also log BAR mapping results more verbosely.

Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:20:06 +00:00
Conrad Meyer
217453caed NTB: Fix typo in bar5 tunables
Typo introduced in r289614.

Pointy-hat:	cem
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:19:57 +00:00
Conrad Meyer
43a191ed78 NTB: MFV 7eb38781: Print driver name in module init
Prints driver name to indicate what is being loaded.

Authored by:	Dave Jiang
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 19:19:48 +00:00
Hans Petter Selasky
382d6bebd3 Move location of RCS keyword according to style.
Suggested by:	jhb @
Sponsored by:	Mellanox Technologies
2015-10-20 19:08:26 +00:00
John Baldwin
c814b86843 Switch pl_child_pid from int to pid_t.
Reviewed by:	emaste, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3857
2015-10-20 17:58:21 +00:00
David C Somayajulu
467dcb5a1f ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE
ql_os.c: removed unnecessary debug printf
ql_ver.h: updated version number
MFC after:5 days
2015-10-20 17:27:11 +00:00
Hans Petter Selasky
f89453cfb9 Add missing FreeBSD RCS keyword and SVN properties.
Sponsored by:	Mellanox Technologies
2015-10-20 16:02:11 +00:00
Hans Petter Selasky
65324421da Add missing FreeBSD RCS keyword and SVN properties.
Sponsored by:	Mellanox Technologies
2015-10-20 15:28:02 +00:00
Ian Lepore
d891769473 Uncomment some rather important code that was commented out for benchmarking.
Normally this routine is supposed to loop until the PIC returns a "no more
interrupts pending" indication.  I had commented that out to do just one
interrupt per invokation to do some timing tests.

Spotted by:   	Svata Kraus
Pointy Hat:	ian
2015-10-20 15:15:30 +00:00
Ganbold Tsagaankhuu
ba27fc087c Include "opt_platform.h" to fix kernel build for amlogic devices. 2015-10-20 13:47:36 +00:00
Alexander Motin
21c2207ffc Update firmware images for Qlogic 24xx/25xx from 5.5.0 to 7.3.0.
This also removes separate "_multi" images, since this funcationality is
now in base, and there is simply no new images without it for years.
2015-10-20 12:27:59 +00:00
Hans Petter Selasky
c0a8182919 Add missing dash to copyright clause.
Sponsored by:	Mellanox Technologies
2015-10-20 11:42:00 +00:00
Hans Petter Selasky
77320fe897 Add missing FreeBSD RCS keyword and SVN properties.
Sponsored by:	Mellanox Technologies
2015-10-20 11:40:04 +00:00
Alexander Motin
b363245a31 Zero mbox[0] for INIT_FIRMWARE to fix version 7.3 firmware.
While there, add new fields to isp_icb_2400_t structure.
2015-10-20 10:16:03 +00:00
Hans Petter Selasky
3f862b56a1 Merge LinuxKPI changes from DragonflyBSD:
- Remove redundant NBLONG macro and use BIT_WORD()
  and BIT_MASK() instead.
- Correctly define BIT_MASK() according to Linux and
  update all users of this macro.
- Add missing GENMASK() macro.
- Remove all comments deriving from Linux.

Sponsored by:	Mellanox Technologies
2015-10-20 09:13:35 +00:00
Alexander Motin
261286a787 Decode more firmware attributes. 2015-10-20 08:29:30 +00:00
Ian Lepore
cabd1a7c40 Follow the advice of the misplaced comment and don't access the map struct
after freeing it.  Remove the comment whose uselessness has been revealed.
2015-10-20 03:27:59 +00:00
Ian Lepore
11ead989eb Fix printf format to allow for bus_size_t not being u_long on all platforms. 2015-10-20 03:25:17 +00:00
Conrad Meyer
5165422dff NTB: Clean up safely if attach fails early
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:54:52 +00:00
Conrad Meyer
98580c064c NTB: MFV 9891417d: Increase transport MTU to 64k from 16k
Benchmarking showed a significant performance increase with the MTU size
to 64k instead of 16k.  Change the driver default to 64k.

Authored by:	Dave Jiang
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:54:43 +00:00
Conrad Meyer
6a88fb3ef8 if_ntb: Fix typo in qp_link_work to match Linux
Throw away the result of the peer SPAD read.  The peer will write our
local SPAD and we need to keep the locally read SPAD value to check if
the remote side is up.

Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:54:34 +00:00
Conrad Meyer
d5bd08b091 NTB: MFV 42fefc86: Add parameters for Intel SNB B2B addresses
Add module parameters for the addresses to be used in B2B topology.

Authored by:	Allen Hubbe
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:54:25 +00:00
Conrad Meyer
25ff5df7c4 if_ntb: MFV 2849b5d7: Reset transport QP link stats on down
Reset the link stats when the link goes down.  In particular, the TX and
RX index and count must be reset, or else the TX side will be sending
packets to the RX side where the RX side is not expecting them.  Reset
all the stats, to be consistent.

Authored by:	Allen Hubbe
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:54:16 +00:00
Conrad Meyer
0326e4d6b5 NTB: Change Atom (BWD/SoC) pci_id name to match others
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:54:08 +00:00
Conrad Meyer
fb6531b056 NTB: MFV 5ae0beb6: Enable link for Intel root port mode in probe
We skip actually bringing up Rootport/Transparent configurations, so
most of this doesn't apply.  Original Linux commit log:

Link training should be enabled in the driver probe for root port mode.
We should not have to wait for transport to be loaded for this to
happen.  Otherwise the ntb device will not show up on the transparent
bridge side of the link.

Authored by:	Dave Jiang
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:46:14 +00:00
Conrad Meyer
6849146f9d NTB: enum-ify some HW constants
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:46:05 +00:00
Conrad Meyer
2d53c202a1 NTB: Pull copy of soc_link_is_err out of recover_soc_link
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:45:57 +00:00
Conrad Meyer
e638b59556 NTB: Drop some dead softc members
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:45:48 +00:00
Conrad Meyer
7452e26d14 NTB: Replace last reg_ofs with self_reg
Diff reduce with Linux driver.  No functional change.

Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-20 01:45:38 +00:00
Ian Lepore
935c21a18e Set the correct values in the arm aux control register, based on chip type.
The bits in the aux control register vary based on the processor type.  In
the past we've always just set the 'smp' and "broadcast tlb/cache ops' bits,
which worked fine for the first few SoCs we supported.  Now that we support
most of the cortex-a series processors, it's important to get the right bits
set based on the processor type.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>
2015-10-19 19:18:02 +00:00
Conrad Meyer
f1a516bcf9 NTB: Add ntb_db_vector_mask() missed in r289546
This is the last one.

Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-19 18:06:35 +00:00
Conrad Meyer
83f50830db NTB: Add ntb_db_valid_mask() missed in r289546
Another trivial one.

Pointy-hat:	cem
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-19 17:53:20 +00:00
Conrad Meyer
2ea07c645a NTB: Add ntb_mw_clear_trans() missed in r289546
It is just a trivial wrapper around ntb_mw_set_trans().

Authored by:	Allen Hubbe
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-10-19 17:41:22 +00:00
Hans Petter Selasky
49bc4fbc27 Bump the __FreeBSD_version to reflect the recent Linux KPI updates.
Sponsored by:	Mellanox Technologies
2015-10-19 16:25:41 +00:00
Hans Petter Selasky
a4b5fa85df The returned value from vm_fault_disable_pagefaults() must be stored
and passed to vm_fault_enable_pagefaults(). Else possible recursion on
the state can be lost.

Sponsored by:	Mellanox Technologies
Suggested by:	kib @
2015-10-19 16:03:08 +00:00
Roger Pau Monné
4955cbf300 xen-netfront: use "netfront" in lock description
Missed from r289585.

Submitted by:		Wei Liu <wei.liu2@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3937
Sponsored by:		Citrix Systems R&D
2015-10-19 15:34:24 +00:00
Roger Pau Monné
1a2928b740 xen-netfront: fix netfront create_dev error path
The failure path for allocating rx grant refs should not try to free tx
grant refs because tx grant refs were allocated after that. Also fix the
error path for xen_net_read_mac.

Submitted by:		Wei Liu <wei.liu2@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3891
Sponsored by:		Citrix Systems R&D
2015-10-19 14:47:37 +00:00
Roger Pau Monné
b31a0d731b xen-netfront: no need to set if_output
This is redundant because ether_ifattach will set that field.

Submitted by:		Wei Liu <wei.liu2@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3918
Sponsored by:		Citrix Systems R&D
2015-10-19 14:37:17 +00:00
Roger Pau Monné
08c9c2e0a1 xen-netfront: remove a bunch of FreeBSD version check
We're way beyond FreeBSD 7 at this point.

Submitted by:		Wei Liu <wei.liu2@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3892
Sponsored by:		Citrix Systems R&D
2015-10-19 14:34:45 +00:00
Roger Pau Monné
177e3f1366 xen-netfront: remove XN_LOCK_{INIT,DESTROY}
Multiqueue feature will make the number of queues dynamic, so XN_LOCK_INIT
won't be that useful. Remove the macro and call mtx_init directly.

XN_LOCK_DESTROY is just dead code.

Submitted by:		Wei Liu <wei.liu2@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3890
Sponsored by:		Citrix Systems R&D
2015-10-19 14:26:40 +00:00
Roger Pau Monné
9a7f9feaf5 xen-netfront: clean up netfront stats structure
Rename it with netfront_ prefix and purge a bunch of unused fields.

Submitted by:		Wei Liu <wei.liu2@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3889
Sponsored by:		Citrix Systems R&D
2015-10-19 14:22:57 +00:00
Roger Pau Monné
d0f3a8b902 xen-netfront: purge page flipping support
Currently neither Linux nor FreeBSD netback supports page flipping. NetBSD
still supports that. It is not sure how many people actually use page
flipping, but page flipping is supposed to be slower than copying nowadays.
It will also shatter frontend / backend address space.

Overall this feature is more of a burden than a benefit.

Submitted by:		Wei Liu <wei.liu2@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3888
Sponsored by:		Citrix Systems R&D
2015-10-19 14:20:06 +00:00
Roger Pau Monné
17374b6c3b xen-netfront: delete all trailing white spaces
Submitted by:		Wei Liu <wei.liu2@citrix.com>
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D3886
Sponsored by:		Citrix Systems R&D
2015-10-19 14:12:15 +00:00
Andrew Turner
80c4b9e575 Use 4 levels of page tables when enabling the MMU. This will allow us to
boot on an SoC that places physical memory at an address past where three
levels of page tables can access in an identity mapping.

Submitted by:   Wojciech Macek <wma@semihalf.com>,
                Patrick Wildt <patrick@bitrig.org>
Differential Revision:	https://reviews.freebsd.org/D3885 (partial)
Differential Revision:	https://reviews.freebsd.org/D3744
2015-10-19 13:20:23 +00:00
Hans Petter Selasky
2ca3cc5132 Merge LinuxKPI changes from DragonflyBSD:
- Redefine DIV_ROUND_UP as a function macro taking two arguments
  instead of none.
- Implement more Linux kernel functions related to various forms
  of DELAY() and basic mathematical operations.

Sponsored by:	Mellanox Technologies
2015-10-19 12:44:41 +00:00
Hans Petter Selasky
e490164bee Merge LinuxKPI changes from DragonflyBSD:
- Implement more Linux kernel functions.

Sponsored by:	Mellanox Technologies
2015-10-19 12:33:09 +00:00
Hans Petter Selasky
f556cede8a Merge LinuxKPI changes from DragonflyBSD:
- Define the kref structure identical to the one found in Linux.
- Update clients referring inside the kref structure.
- Implement kref_sub() for FreeBSD.

Reviewed by:	np @
Sponsored by:	Mellanox Technologies
2015-10-19 12:26:38 +00:00
Hans Petter Selasky
35d974cd0c Merge LinuxKPI changes from DragonflyBSD:
- Map more Linux compiler related defines to FreeBSD ones.

Sponsored by:	Mellanox Technologies
2015-10-19 12:08:06 +00:00
Hans Petter Selasky
f940cc8ffc Map two more Linux error return codes to FreeBSD ones.
Sponsored by:	Mellanox Technologies
2015-10-19 12:04:20 +00:00
Hans Petter Selasky
af5648c465 Implement IS_ERR_OR_NULL() function.
Sponsored by:	Mellanox Technologies
2015-10-19 12:00:52 +00:00
Hans Petter Selasky
2404bdddf1 Merge LinuxKPI changes from DragonflyBSD:
- Add more list related functions and macros.
- Update the hlist_for_each_entry() macro to take one less argument.

Sponsored by:	Mellanox Technologies
2015-10-19 11:57:33 +00:00
Hans Petter Selasky
64bda586e1 Merge LinuxKPI changes from DragonflyBSD:
- Reimplement ktime header file to distinguish more from Linux.
- Add new time header file to handle time related Linux functions.

Sponsored by:	Mellanox Technologies
2015-10-19 11:46:48 +00:00
Hans Petter Selasky
ecfc226c7d Fix compile warning.
Sponsored by:	Mellanox Technologies
2015-10-19 11:29:50 +00:00
Michael Tuexen
6e9c45e0ee Use __func__ instead of __FUNCTION__.
This allows to compile the userland stack without errors using gcc5.
Thanks to saghul for makeing me aware and providing the patch.

MFC after: 1 week
2015-10-19 11:17:54 +00:00
Hans Petter Selasky
1610bf8edf Merge LinuxKPI changes from DragonflyBSD:
- Reimplement math64 header file to distinguish more from Linux.

Sponsored by:	Mellanox Technologies
2015-10-19 11:16:38 +00:00
Hans Petter Selasky
96e8192d3c Merge LinuxKPI changes from DragonflyBSD:
- Whitespace fixes.

Sponsored by:	Mellanox Technologies
2015-10-19 11:11:15 +00:00
Hans Petter Selasky
b526833859 Merge LinuxKPI changes from DragonflyBSD:
- Avoid using PAGE_MASK, because Linux defines it differently.
  Use (PAGE_SIZE - 1) instead.
- Add support for for_each_sg_page() and sg_page_iter_dma_address().

Sponsored by:	Mellanox Technologies
2015-10-19 11:09:51 +00:00
Hans Petter Selasky
e6d1c6e382 Merge LinuxKPI changes from DragonflyBSD:
- Implement schedule_timeout().

Sponsored by:	Mellanox Technologies
2015-10-19 10:57:56 +00:00
Hans Petter Selasky
da7c18e051 Merge LinuxKPI changes from DragonflyBSD:
- Implement pagefault_disable() and pagefault_enable().

Sponsored by:	Mellanox Technologies
2015-10-19 10:56:32 +00:00
Hans Petter Selasky
dad154ab93 Merge LinuxKPI changes from DragonflyBSD:
- Added support for multiple new Linux functions.
- Properly implement DEFINE_WAIT() and init_waitqueue_head() macros.
- Removed FreeBSD specific __wait_queue_head structure definition.

Sponsored by:	Mellanox Technologies
2015-10-19 10:54:24 +00:00
Hans Petter Selasky
7c50bc1cf6 Merge LinuxKPI changes from DragonflyBSD:
- Some minor whitespace fixes.
- Added support for two new Linux functions.

Sponsored by:	Mellanox Technologies
2015-10-19 10:49:15 +00:00
Alexander Motin
6b513e2853 MFV r289561: 6328 Fix cstyle errors in zfs codebase
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@9a686fbc18
2015-10-19 08:25:37 +00:00
Hans Petter Selasky
4be283b9be Add quirk for USB 3.0 PCI device.
Submitted by:	philipp.maechler@mamo.li
PR:		203650
MFC after:	1 week
2015-10-19 07:21:57 +00:00
Adrian Chadd
02b3773ac4 otus(4) - use the local node alloc function so there's space for statistics.
* Use the correct malloc type for node allocation - M_80211_NODE - so
  the default node free method in net80211 will work correctly.
* Fix otus_node_alloc() to suit FreeBSD's net80211.
* .. and actually call otus_node_alloc() so there's space for the
  per-node tx statistics.  Otherwise, well, it will be scribbling over
  random memory.

Tested:

* AR9170, STA mode
2015-10-19 01:21:29 +00:00