Commit Graph

29016 Commits

Author SHA1 Message Date
Mateusz Guzik
90f54cbfeb fd: remove filedesc argument from fdclose
Just accept a thread instead. This makes it consistent with fdalloc.

No functional changes.
2015-04-11 15:40:28 +00:00
Rui Paulo
d82f9014fa netmap: improve the netmap attach message on FreeBSD.
MFC after:	1 week
2015-04-11 06:20:46 +00:00
Jung-uk Kim
7cf3e94a41 Merge ACPICA 20150410. 2015-04-11 03:23:41 +00:00
Xin LI
e157d5973c Merge changes from vendor driver version 1.1.1:
v1.1.1 2015-03-26
 * Support 4Kn drive.
 * Change the SCSI target ID of the disk to be the index of physical
   connetion to the HBA.
 * Support staggered drive spin up.
 * Fix a bug that command would be timeout because of improper
   interrupt service routine.
 * Error handling to avoid scsi command lost which caused system
   hang up.
 * Fix a bug that fail to get the devcie's serial number via
   FreeNAS WebGUI.

Many thanks to HighPoint for continued support of FreeBSD!

MFC after:	2 weeks
2015-04-11 00:45:03 +00:00
Eitan Adler
f05e369aa2 iwn, wlan: fix typos
Fxi tow typos

Obtained from:	DragonFlyBSD
MFC after:	3 days
2015-04-10 20:55:17 +00:00
Ian Lepore
c441925e31 Use OF_getencpropalloc() to handle endianess of the properties.
Submitted by:	Michal Meloun
2015-04-10 13:50:57 +00:00
Ian Lepore
78261920b0 The "get latency" and "get bitmode" device commands are read operations,
not writes.
2015-04-10 13:20:31 +00:00
Marius Strobl
0f55f9d67b Don't enable RX and TX before their initial configuration is done, i. e.
after setting up interrupt moderation but before turning interrupts on.
This matches what Realtek's r8168 Linux driver does as of version 8.039.00
and fixes problems with certain incarnations of certain MAC revisions
like the interface requiring an extra up/down-cycle after boot to start
working or DMA configuration not being adhered to.

PR:		193743, 197535
MFC after:	1 week
2015-04-09 21:35:44 +00:00
Adrian Chadd
02d4991526 Do not access peripheral before clock stabilization.
Tested:

* Intel 3945ABG NIC, STA mode

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-04-09 04:56:24 +00:00
Adrian Chadd
655e8ba806 Fix buffer overflow introduced in previous commits (unbreaks 802.11a capable NICs).
Tested:

* PCIe Intel 3945ABG NIC

PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-04-09 04:51:39 +00:00
Jim Harris
3345ed9a55 nvme: use BUS_SPACE_MAXSIZE for bus_dma_tag_create maxsize parameter
This fixes i386 PAE build fallout from r281281.

Reported by:	bz
MFC after:	1 week
2015-04-09 00:37:55 +00:00
Jim Harris
36b0e4ee1f nvme: remove CHATHAM related code
Chatham was an internal NVMe prototype board used for
early driver development.

MFC after:	1 week
Sponsored by:	Intel
2015-04-08 21:52:06 +00:00
Jim Harris
eb4929fb41 nvme: add device strings for Intel DC series NVMe SSDs
MFC after:	1 week
Sponsored by:	Intel
2015-04-08 21:50:45 +00:00
Jim Harris
a6e3096392 nvme: create separate DMA tag for non-payload DMA buffers
Submission and completion queue memory need to use a
separate DMA tag for mappings than payload buffers,
to ensure mappings remain contiguous even with DMAR
enabled.

Submitted by:	kib
MFC after:	1 week
Sponsored by:	Intel
2015-04-08 21:49:45 +00:00
Jim Harris
e5ce537999 nvme: fall back to a smaller MSI-X vector allocation if necessary
Previously, if per-CPU MSI-X vectors could not be allocated,
nvme(4) would fall back to INTx with a single I/O queue pair.
This change will still fall back to a single I/O queue pair, but
allocate MSI-X vectors instead of reverting to INTx.

MFC after:	1 week
Sponsored by:	Intel
2015-04-08 21:46:18 +00:00
Andrew Turner
be3b046ce8 Get the fdt uart driver working on arm64, there is no machine/fdt.h, and
the default shift should be 2 for the SoCs we support.

Sponsored by:	The FreeBSD Foundation
2015-04-07 15:12:03 +00:00
Andrew Turner
7966cc995c Fix uart_fdt_get_clock. It should have beed using the cell variable passed
in, not value on the stack.
2015-04-07 12:42:06 +00:00
Kevin Lo
45440aa84e Add Lenovo ThinkPad OneLink GigaLAN.
PR:	199184
Submitted by:	Robin Karlsson
2015-04-07 01:47:36 +00:00
John Baldwin
44947d3aeb Move the message complaining about failed system resource allocations
under bootverbose.  Every example I've seen to date has been due to
an ACPI system resource device reserving a range that overlaps with
system memory (which ram0 attempts to reserve) or a local or I/O APIC
(which apic0 attempts to reserve).  These are always harmless but look
scary to users.

MFC after:	1 week
2015-04-06 17:39:36 +00:00
Rui Paulo
63f9a9fa26 ichsmb: add a device id for the Wildcat Point-LP.
MFC after:	1 week
2015-04-06 06:02:58 +00:00
Adrian Chadd
03ab093569 Return the correct HAL data type for HAL_DIAG_ANI_STATS.
I .. stupidly added code to return HAL_ANI_STATS to HAL_DIAG_ANI_STATS.
I discovered this in a noisy environment when the returned values were
enough to .. well, make everything terrible.

So - restore functionality.

Tested:

* AR5416 (uses the AR5212 HAL), in a /very/ noisy 2GHz environment.
  Enough to trigger ANI to get upset and generate useful data.
2015-04-06 01:12:53 +00:00
Rui Paulo
c282164d42 psm: print newer Synaptics Touchpad capabilities. 2015-04-06 01:04:08 +00:00
Rui Paulo
bc3464096a hwpmc: add initial Intel Broadwell support.
The full list of aliases and events will follow in a subsequent
commit.

MFC after:	1 month
2015-04-05 05:14:20 +00:00
Rui Paulo
03a24b7026 Remove whitespace. 2015-04-05 05:09:38 +00:00
Adrian Chadd
f6e6460dfc Add support for the MIPS74K SoC family performance counters events.
These are similar to the mips24k performance counters - some are
available on perfcnt0/3, some are available on perfcnt1/4.
However, the events aren't all the same.

* Add the events, named the same as from Linux oprofile.
* Verify they're the same as  "MIPS32(R) 74KTM Processor Core Family
  Software User's Manual"; Document Number: MD00519; Revision 01.05.
* Rename INSTRUCTIONS to something else, so it doesn't clash with
  the alias INSTRUCTIONS.  I'll try to tidy this up later; there
  are a few other aliases to add and shuffle around.

Tested:

* QCA9558 SoC (AP135 board) - MIPS74Kc core (no FPU.)
* make universe; where it didn't fail for other reasons.

TODO:

* It'd be nice to support the four performance counters
  in at least this hardware, rather than just two.

Reviewed by:	bsdimp ("looks good; don't break world".)
2015-04-05 02:57:02 +00:00
Edward Tomasz Napierala
aca050aaaa Remove icl_conn_connected(); was unused.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-04 22:11:38 +00:00
Andrew Turner
a8b295acf3 Move uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may
not build uart_cpu_fdt.c in all configs.
2015-04-04 18:45:25 +00:00
Andrew Turner
06d8b1ed6e Remove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While
here also use OF_getencprop in uart_fdt_get_clock.

Sponsored by:	The FreeBSD Foundation
2015-04-04 09:57:52 +00:00
Andrew Turner
3d2a63f5ac Use OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give
us the wrong data in the failure case if shift was not zero.

Sponsored by:	The FreeBSD Foundation
2015-04-04 09:21:56 +00:00
Rui Paulo
3d8e91f9ce urtwn: blink the LED when scanning.
Previously, the driver was trying to blink the LED in the newstate
function, but that only gets called once (unlike OpenBSD's net80211
stack).  Move the LED blinking to set_channel().

While there, don't try to set the channel when we switch to the SCAN
state.  This is already accomplished by the set_channel() function.

MFC after:	1 week
2015-04-04 08:41:02 +00:00
Rui Paulo
f13c5f5428 Remove whitespace. 2015-04-04 08:36:02 +00:00
Ruslan Bukin
db8a143a94 o Remove superfluous includes
o Avoid NULL pointer access
o Fix 'set but not used' warning

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
2015-04-03 11:37:23 +00:00
Peter Wemm
ed2b5a0aef Remove redundant mtx_lock/unlock in ciss_name_device. This is a guaranteed
insta-panic on device add/remove.  This is only called from the notify
thread which already holds the lock while calling this function.
2015-04-02 23:12:18 +00:00
David C Somayajulu
16a38a930d When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host net
work stack and is reused again on the receive ring.  Remaining received packets in the ring are not processed in that
invocation of bxe_rxeof() and defered to the task thread.

MFC after: 5 days
2015-04-02 21:55:03 +00:00
Oleksandr Tymoshenko
076562d0a9 Handle multiple "gpio-leds"-compatible nodes
There are cases when gpioled nodes in DTS come from different sources
(e.g. standard Beaglebone Black LEDs in main DTS + shield LEDs in
overlay DTS) so instead of handling only first compatible node go
through all child nodes
2015-04-02 02:43:48 +00:00
Eric Joyner
892406d827 Make changes to busdma code in tx/rx path similar to the ones made in r257541.
- bus_dmamap_create() does not take the BUS_DMA_NOWAIT flag
- properly unload maps
- do not assign NULL to dma map pointers

Submitted by:	Konstantin Belousov <kostikbel@gmail.com>
Approved by:	jfv (mentor)
MFC after:	1 week
2015-04-01 17:19:55 +00:00
Adrian Chadd
b3ab2271b9 Use the HAL API for returning ar5212AniState, rather than just dumping
AniState itself.
2015-04-01 04:56:22 +00:00
Adrian Chadd
a9e86008ae Start the process of migrating the ANI statistics out of the HALs and into
the top-level HAL.

The athstats program is blindly using a copy of the ar5212 ANI stats structure
to pull out ANI statistics/state and this is problematic for the AR9300
HAL.

So:

* Define HAL_ANI_STATS and HAL_ANI_STATE
* Use HAL_ANI_STATS inside the AR5212 HAL

This commit doesn't (yet) convert the ar5212AniState -> HAL_ANI_STATE when
exporting it to userland; that'll come in the next commit.
2015-04-01 03:42:46 +00:00
Ganbold Tsagaankhuu
562246dff8 Add necessary changes to support various Amlogic SoC devices
specially aml8726-m6 and aml8726-m8b SoC based devices.
aml8726-m6 SoC exist in devices such as Visson ATV-102.
Hardkernel ODROID-C1 board has aml8726-m8b SoC.

The following support is included:
  Basic machdep code
  SMP
  Interrupt controller
  Clock control driver (aka gate)
  Pinctrl
  Timer
  Real time clock
  UART
  GPIO
  I2C
  SD controller
  SDXC controller
  USB
  Watchdog
  Random number generator
  PLL / Clock frequency measurement
  Frame buffer

Submitted by:   John Wehle
Approved by:    stas (mentor)
2015-03-31 11:50:46 +00:00
Justin Hibbits
1c5d2c3dbc machine/fdt.h no longer exists for powerpc.
MFC after:	1 month
2015-03-31 05:26:30 +00:00
Navdeep Parhar
7ef00d7884 cxgbe/tom: return rx credits promptly if the socket buffer's low water
mark cannot be reached because the window advertised to the peer isn't
wide enough.  While here, tweak the normal credit return too.

MFC after:	1 month
2015-03-31 01:22:20 +00:00
Zbigniew Bodek
a83592093c Fix bug in xrefinfo_find() for 64-bit platforms
uintptr_t may be 64-bit on some platforms, therefore when
finding xrefinfo by pointer to device the high word is being
cut off due to cast to phandle_t which is 32-bit long by definition.
Due to that we loose the high word of the address to compare with
xi->dev's address.
To fix that, first argument of xrefinfo_find() is extended to
uintptr_t and is being cast to appropriate type (phandle_t)
when compared.

Submitted by:  Zbigniew Bodek <zbb@semihalf.com>
Reviewed by:   nwhitehorn
Obtained from: Semihalf
2015-03-30 09:49:54 +00:00
Eitan Adler
918057d9a9 And it turns out someone beat me to it....
PR:		199013
2015-03-30 08:54:59 +00:00
Eitan Adler
d930009250 Add support for "MosChip MCS9922 PCIe to Peripheral Controller" to uart
Submitted by:	<mlsemon35@gmail.com>
PR:		199013
MFC After:	1 month
2015-03-30 08:48:35 +00:00
Roger Pau Monné
df62b8a25f xen: add a handler for the debug interrupt
Handle the VIRQ_DEBUG signal and print a stack trace of each vCPU on the Xen
console. This is only used for debug purposes and is triggered by the
administrator of the Xen host.

Sponsored by: Citrix Systems R&D
MFC after: 1 week
2015-03-30 07:09:07 +00:00
Adrian Chadd
b0602bec18 Move the HAL channel survey support out to be in the top-level HAL,
rathe than private in each HAL module.

Whilst here, modify ath_hal_private to always have the per-channel
noisefloor stats, rather than conditionally.  This just makes
life easier in general (no strange ABI differences between different
HAL compile options.)

Add a couple of methods (clear/reset, add) rather than using
hand-rolled versions of things.
2015-03-29 21:50:21 +00:00
Adrian Chadd
5f63869372 Add a new field to HAL_ANISTATS - the extension channel busy count.
This is only used by the AR9300 HAL for now - but just be careful if
you decide to recompile the kernel with NO_CLEAN=1.
2015-03-29 21:45:48 +00:00
Adrian Chadd
9bbfde1eb9 Fix more ticks wrapping bugs exposed by the ticks wrapping bug check.
This symptom is "calibrations don't ever run", which may cause some
pretty spectacularly bad behaviour in noisy environments or with longer
uptimes.

Thanks to dtrace to make it easy to check if specific non-inlined functions
are getting called by things like the ANI and calibration HAL methods.
Grr.

Tested:

* AR9380, STA mode
2015-03-29 21:41:05 +00:00
Jean-Sébastien Pédron
7b5702f3df drm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri May 31 12:17:08 2013 +0000

    drm: Sort connector modes based on vrefresh

    Keeping the modes sorted by vrefresh before the pixel clock makes the
    mode list somehow more pleasing to the eye.

    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

PR:		198936
Obtained from:	Linux
MFC after:	1 month
MFC with:	r280183
2015-03-29 18:45:51 +00:00
Andrew Rybchenko
cfaf34ff99 sfxge: fix bug in TSO when a DMA segment has both header and data
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2163
2015-03-29 15:18:04 +00:00
Adrian Chadd
9cecaef7d6 Fix a long-standing bug with the early MAC address initialisation path,
which showed up after I started changing addresses this early.

It turns out that there's some other malarky going on behind the scenes
in the HAL and merely setting the net80211/ifp mac address this early
isn't enough.  If the MAC is set from kenv at attach time, the HAL
also needs to be programmed early.

Without this, the VAP wouldn't work enough for finishing association -
probe requests would be fine as they're broadcast, but association
request would fail.
2015-03-29 06:05:00 +00:00
Adrian Chadd
240b1f1dca Update if_ath(4) to check for "hint.ath.X.macaddr" for an override MAC address.
This is used by the AR71xx platform code to choose a local MAC based on
the "board MAC address", versus whatever potentially invalid/garbage
values are stored in the Atheros calibration data.
2015-03-28 23:41:23 +00:00
Adrian Chadd
012bc22a86 Turns out the AR933x looks like the AR7240/AR7241 switch as far as VLAN
configuration is concerned.

So, remove the now-erroneous comment.

Tested:

* AR9331 - Carambola2, with transmitting dot1q tagged packets around.
2015-03-28 23:20:46 +00:00
Bjoern A. Zeeb
54384e56c9 Remove all the handcrafted assembly in hwpmc_armv7.c and use the
common (autogenerated) versions.   Removes extra vertical space,
and makes it easier to grep for usage throughout the tree.
Conditionally compile only for arm6 [1] (yes sounds odd but is right).

Submitted by:	andrew [1]
Reviewed by:	gnn, andrew (ian earlier version I think)
Differential Revision: https://reviews.freebsd.org/D2159
Obtained from:	Cambridge/L41
Sponsored by:	DARPA, AFRL
2015-03-28 18:57:13 +00:00
Andrew Rybchenko
dcf085860a sfxge: set correct RSS hash type instead of opaque
Reviewed by:    adrian, gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2124
2015-03-28 10:20:20 +00:00
Ian Lepore
ecaecbc7d8 Make simplebus a base class of ofwbus. This allows the elimination of
duplicated code in the two classes, and also allows devices in FDT-based
systems to declare simplebus as their parent and still work correctly
when the FDT data describes the device at the root of the tree rather
than as a child of a simplebus (which is common for interrupt, clock,
and power controllers).

Differential Revision:	https://reviews.freebsd.org/D1990
Submitted by:	Michal Meloun
2015-03-27 23:10:15 +00:00
Bjoern A. Zeeb
0ede88a413 Rather than defining our own magic checks here use INKERNEL() for
the PMC_IN_KERNEL() macro definition.

Add missing macros to extract the return address (LR) from the trapframe.

Discussed with:	andrew
Obtained from:	Cambridge/L41
Sponsored by:	DARPA, AFRL
MFC after:	2 weeks
2015-03-27 08:47:16 +00:00
Navdeep Parhar
70ca622987 cxgbe(4): provide the exact RSS hash type instead of a catch-all value
to the upper layers.
2015-03-26 18:45:51 +00:00
Hans Petter Selasky
5c155f23d1 Add definition of the ISOCHRONOUS endpoint usage bits.
Refer to the USB v2.0 specification for more information.

MFC after:	1 week
2015-03-25 13:32:27 +00:00
Alexander Motin
cdc5836726 Remove from legacy ata(4) driver support for hardware, supported by newer
and more functional drivers ahci(4), siis(4) and mvs(4).

This removes about 3400 lines of code, unused since FreeBSD 9.0 release.
2015-03-24 18:09:07 +00:00
Hans Petter Selasky
32a0e5d55b Make all PCM core sysctls tunable and remove redundant TUNABLE()
statements. This allows for setting all PCM core parameters in the
kernel environment through loader.conf(5) or kenv(1) which is useful
for pluggable PCM devices like USB audio devices which might be
plugged after that sysctl.conf(5) is executed.
2015-03-24 16:31:22 +00:00
Andrew Rybchenko
cb552e880d sfxge: cleanup: fix index variable type to match upper boundary type
Sponsored by:   Solarflare Communications, Inc.
2015-03-24 11:33:34 +00:00
Andrew Rybchenko
919c8da4c5 sfxge: cleanup: add a blank line before each #if to improve readability
Sponsored by:   Solarflare Communications, Inc.
2015-03-24 11:25:19 +00:00
Bjoern A. Zeeb
69cfd6a666 Make ix_crcstrip a public symbol for the moment; it probably is not
the right solution but I will leave it to experts to untangle this
problem to properly stop the build failures.

At the moment only if_ix.c includes dev/netmap/ixgbe_netmap.h which is
good as ixgbe_netmap.h defines a couple of (file) static variables--thus
local to if_ix.c.
static int ix_crcstrip however now also got checked from ix_txrx.c
(as an extern) and should not be visible there.  In fact we do see
powerpc and powerpc64 build failures because of this.  It is unclear
to me why on other (clang built?) architectures this does not lead
to a reference of an undefined symbol and similar build breakage.
2015-03-24 09:46:47 +00:00
Hans Petter Selasky
87087b85a7 Use the feedback value from the synchronization endpoint as fallback
when there is no recording channel.

MFC after:	3 days
PR: 		198444
2015-03-24 09:21:53 +00:00
Navdeep Parhar
bb481a8edd cxgbe(4): Do not call sbuf_trim on an sbuf with a drain function.
MFC after:	1 week
2015-03-23 23:06:32 +00:00
Alexander Motin
3036de3c48 Reduce priority of ATA/SATA drivers.
Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY;  more functional ahci(4), siis(4),
mvs(4) -> BUS_PROBE_DEFAULT;  BUS_PROBE_VENDOR leave for vendor drivers.

MFC after:	2 weeks
2015-03-23 19:47:52 +00:00
Andrew Rybchenko
cc5a55a29d sfxge: remove unnecessary and wrong prediction
Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2085
2015-03-23 15:53:26 +00:00
Andrew Rybchenko
63424713e5 sfxge: do not check MCDI status word
This is a temporary workaround until we determine a reliable sequence
of operations for detecting MC reboots.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2084
2015-03-23 15:52:57 +00:00
Andrew Rybchenko
5dadbb64d0 sfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64
bus_space_*_8() are not always macros, so it is not correct to use
#ifndef.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2083
2015-03-23 15:52:05 +00:00
Andrew Rybchenko
f6222d7bd0 sfxge: add statistics for each Tx queue
Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2082
2015-03-23 15:49:11 +00:00
Andrew Rybchenko
a411fe4e80 sfxge: remove obsolete Tx non-multi queue support
Tx multi queue is added in FreeBSD 8.0. So, the changeset drops earlier
versions support.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2081
2015-03-23 15:47:37 +00:00
Andrew Rybchenko
1cc8febf4c sfxge: add barriers to BAR write macros
In theory the barriers are required to cope with write combining and
reordering. Two barriers are added (sometimes merged to one):
 1. Before the first write to guarantee that previous writes to the region
    have been done
 2. Before the last write to guarantee that write to the last dword/qword is
    done after previous writes
Barriers are inserted before in the assumption that it is better to
postpone barriers as much as it is possible (more chances that the
operation has already been already done and barrier does not stall CPU).

On x86 and amd64 bus space write barriers are just compiler memory barriers
which are definitely required.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2077
2015-03-23 15:45:39 +00:00
Andrew Rybchenko
87581ab817 sfxge: assert either kernel or internal copy of interface flags
ioctl to put interface down sets ifp->if_flags which holds the intended
administratively defined state and calls driver callback to apply it.
When everything is done, driver updates internal copy of
interface flags sc->if_flags which holds the operational state.
So, transmit from Rx path is possible when interface is intended to be
administratively down in accordance with ifp->if_flags, but not applied
yet and the operational state is up in accordance with sc->if_flags.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2075
2015-03-23 15:44:17 +00:00
Alexander Motin
6f954fb36b Remove MAXBSIZE use from drivers where it has nothing to do.
In some cases limits are just not needed, in others -- DFLTPHYS is the
right constant to use instead.

MFC after:	1 month
2015-03-22 16:10:28 +00:00
Hans Petter Selasky
85bad58226 The synchronisation value returned by the so-called feedback endpoint
appears to be too inaccurate that it can be used to synchronize the
playback data stream. If there is a recording endpoint associated with
the playback endpoint, use that instead. That means if the isochronous
OUT endpoint is asynchronus the USB audio driver will automatically
start recording, if possible, to get exact information about the
needed sample rate adjustments. In no recording endpoint is present,
no rate adaption will be done.

While at it fix an issue where the hardware buffer pointers don't get
reset at the first device PCM trigger.

Make some variables 32-bit to avoid problems with multithreading.

MFC after:	3 days
PR: 		198444
2015-03-21 09:45:45 +00:00
Luiz Otavio O Souza
d7eb38c008 Add a driver for the Dallas/Maxim DS1307, another common i2c RTC.
Many thanks to ian who gently provided me the DS1307 breakout board.

Tested on:		Raspberry pi
Differential Revision:	https://reviews.freebsd.org/D2022
Reviewed by:		rpaulo
2015-03-20 19:51:24 +00:00
Andrew Turner
6c85c62d00 Fix building ixgbe with gcc, it doesn't like nested extern declarations.
The fix is to move the extern declaration ix_crcstrip out of
ixgbe_setup_hw_rsc.
2015-03-19 13:00:02 +00:00
Jack F Vogel
bff38d637c Fix i386 LINT build issues, and remove unused variable. 2015-03-18 20:11:59 +00:00
Adrian Chadd
a1edda90b2 Fix ixgbe(4) to compile - with RSS; with ix+ixv in the kernel.
* Fix the multiple same-named devclasses; the duplicate name
  trips up the linker.

* Re-do the taskqueue stuff to use the new cpuset API, not the old
  pinned API.

* Add includes for the new location of the RSS configuration routines.

This allows ixgbe to compile as a module /and/ linked into the kernel,
along with RSS working.

Sponsored by:	Norse Corp, Inc.
2015-03-18 05:05:30 +00:00
Jack F Vogel
bc2e8d79c7 Resolve a few build issues, add module directories back into Makefile,
then correct a NETMAP problem resulting from the split, and finally
temporarily disable the X550 functionality.
2015-03-17 22:40:50 +00:00
Gleb Smirnoff
0ac23e997d Fix build.
Reviewed by:	dumbbell
2015-03-17 19:13:11 +00:00
Zbigniew Bodek
731a8268c5 Introduce Annapurna Labs AHCI support
Overview:
* implemented quirk for forcing SATA interface enable
* restore value to status register - this enables link autonegotiation

Modifications:
* devid:vendorid field
* quirk for forcing PI setting (BIOS is doing that on PC-like systems)
* write to capabilites field to enable phy link initialization

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   imp, mav
Obtained from: Semihalf
2015-03-17 18:59:47 +00:00
Jean-Sébastien Pédron
455fa6518a drm: Update the device-independent code to match Linux 3.8.13
This update brings few features:
    o  Support for the setmaster/dropmaster ioctls. For instance, they
       are used to run multiple X servers simultaneously.
    o  Support for minor devices. The only user-visible change is a new
       entry in /dev/dri but it is useless at the moment. This is a
       first step to support render nodes [1].

The main benefit is to greatly reduce the diff with Linux (at the
expense of an unreadable commit diff). Hopefully, next upgrades will be
easier.

No updates were made to the drivers, beside adapting them to API
changes.

[1] https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Render_nodes

Tested by:	Many people
MFC after:	1 month
Relnotes:	yes
2015-03-17 18:50:33 +00:00
Jack F Vogel
758cc3dcd5 Update to the Intel ixgbe driver:
- Split the driver into independent pf and vf loadables. This is
	  in preparation for SRIOV support which will be following shortly.
	  This also allows us to keep a seperate revision control over the
	  two parts, making for easier sustaining.
	- Make the TX/RX code a shared/seperated file, in the old code base
	  the ixv code would miss fixes that went into ixgbe, this model
	  will eliminate that problem.
	- The driver loadables will now match the device names, something that
	  has been requested for some time.
	- Rather than a modules/ixgbe there is now modules/ix and modules/ixv
	- It will also be possible to make your static kernel with only one
	  or the other for streamlined installs, or both.

Enjoy!

Submitted by: jfv and erj
2015-03-17 18:32:28 +00:00
Hans Petter Selasky
89c481cfd4 Remove no longer used allocation type.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2015-03-17 11:07:59 +00:00
Hans Petter Selasky
5151af1dcb Use define instead of constant.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2015-03-17 08:42:09 +00:00
Andrew Rybchenko
22ff426cc2 sfxge: increase default put-list limit to 1024
Drops are observed under multi-stream TCP traffic due to put-list
overflow with limit equal to 64.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-03-17 08:23:46 +00:00
Andrew Rybchenko
06824d2c88 sfxge: prefetch txq->common if TxQ is started only
Transmit may be called when TxQ is not started yet (i.e. txq->common is
invalid). TxQ state is checked below when mbuf is processed and dropped
if TxQ is not started.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-03-17 08:23:15 +00:00
Andrew Rybchenko
ebfb5f2546 sfxge: adding version info to device description
The information is required for NIC update and config tools.

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-03-17 08:21:31 +00:00
Andrew Rybchenko
95caaf0f54 sfxge: move deferred packet list statistics to dedicated node
It is done to structure sysctl and do not mix with Tx queue statistics
to be added.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-03-17 08:16:37 +00:00
Andrew Rybchenko
245d157651 sfxge: add tunables to control LRO parameters on driver load time
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-03-17 08:14:46 +00:00
John Baldwin
b12c0a9eeb Move special DDP handling for closing a connection into a new
handle_ddp_close() function in t4_ddp.c as the logic is similar
to handle_ddp_data().  This allows all knowledge of the special
DDP mbufs to be private to t4_ddp.c as well.
2015-03-16 15:56:06 +00:00
Konstantin Belousov
69a2ec4a19 Fix build with clang 3.6, silence -Wcast-qual warning.
Sponsored by:	The FreeBSD Foundation
Acked by:	adrian
2015-03-15 23:05:36 +00:00
Adrian Chadd
e2ad437112 Add a new taskqueue (device specific, not net80211 ic->tq); use it for
device restart.

(Committers note - once scan overhaul and a few other things have been
fixed in net80211 to not block things in the taskqueue, this can disappear
and the device specific taskqueues in other drivers can also go away.)

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:32:11 +00:00
Adrian Chadd
a5403e3157 Workaround delays caused by vmem_check().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:30:20 +00:00
Adrian Chadd
2e79e29307 Fix scan timeouts with powersave enabled.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:29:36 +00:00
Adrian Chadd
fd06b53774 Don't unlock mutex in interrupt thread (except for wpi_rx_done() - for now) -
fixes various races between wpi_notif_intr() and wpi_stop_locked().

(attachment 154381)

Committers note: yes, unlock/if_input/lock has to go away, but that'll
have to be done later.

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:29:18 +00:00
Adrian Chadd
062c813943 Reformatting changes.
(attachment 154380)

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:27:50 +00:00
Adrian Chadd
b52207dbd2 Use correct types
(attachment 154379)

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:27:03 +00:00
Adrian Chadd
5effcbfd6c Add another lock for the TX path.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:26:22 +00:00
Adrian Chadd
fc5870b418 Add an extra mutex for qfullmsk / ring->queued variables.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:25:06 +00:00
Adrian Chadd
a6b6ca52c6 Regroup ring state checks in wpi_tx_done().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:24:11 +00:00
Adrian Chadd
84ad7b3667 Don't use sc->qfullmsk in wpi_start().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:23:45 +00:00
Adrian Chadd
d74e544a1d turn sc_tx_timeout into its own callout, rather than a global watchdog
timer.

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:22:03 +00:00
Adrian Chadd
446685e49c Add mutex for RXON structure; convert some callouts/lock use to use
RXON rather than the global WPI lock.

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:20:58 +00:00
Adrian Chadd
9e7aab73cd Use WPI_FILTER_BSS for checking current state.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:19:52 +00:00
Adrian Chadd
0bc39fc6f8 Split TX and scan timeouts; use a callout now for the scan timeout.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:19:15 +00:00
Adrian Chadd
726ddc2648 Add experimental HOSTAP support.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:18:18 +00:00
Adrian Chadd
8483c8c339 Merge wpi_start() and wpi_start_locked().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:17:58 +00:00
Adrian Chadd
7d4ee533d4 Minor optimisation in wpi_limit_dwell()
PR:		kenr/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:17:03 +00:00
Adrian Chadd
cfe9b1ceb2 Rearrange checks in wpi_send_rxon().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:12:57 +00:00
Adrian Chadd
cec45f0495 Fix some printfs(); add some debugging.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:12:05 +00:00
Adrian Chadd
39060fa992 Add more KASSERTs.
(Committer note: these checks will have to be re-established in a future
commit as /well/ as having the KASSERTs.)

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:11:00 +00:00
Adrian Chadd
0b90e84501 Disable powersave in IBSS mode (packet loss > 90%.)
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:09:29 +00:00
Adrian Chadd
e49a7038fc Do some cleanup before device startup.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:08:54 +00:00
Adrian Chadd
b9858d864a Acquire ifq lock when checking / modifying IFF_DRV_OACTIVE flag.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:08:24 +00:00
Adrian Chadd
77cf0b82c2 Merge wpi_init() and wpi_init_locked().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:07:43 +00:00
Adrian Chadd
5ca7739522 Refactor wpi_ioctl().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:06:36 +00:00
Adrian Chadd
0528191a1a Add WPI_DEBUG_NODE + some debugging.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:05:59 +00:00
Adrian Chadd
a6df6cfe65 * Add new debug category
* Refactor out / restructure / extend debugging information

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:04:55 +00:00
Adrian Chadd
32e4f2f7e9 Remove unrelated comment.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:03:48 +00:00
Adrian Chadd
419435b847 Remove unnecessary assignment.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:02:59 +00:00
Alexander Motin
61cefb9bcf Hide virtio features negotiation messages under bootverbose.
Those messages are noisy, but useless for average user.

MFC after:	2 weeks
2015-03-15 21:00:10 +00:00
Adrian Chadd
7b52621191 Remove unnecessary debug output.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:55:23 +00:00
Adrian Chadd
d29fcfb7c3 Add support for AES-CCMP group keys.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:54:40 +00:00
Adrian Chadd
735c606726 Encrypt frame if IEEE80211_BPF_CRYPTO is set.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:54:10 +00:00
Adrian Chadd
b56fed3da0 Use separate mutex for wv_bcbuf and wv_boff structures.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:53:46 +00:00
Adrian Chadd
d036bb20e3 Add prefixes to field names.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:52:47 +00:00
Adrian Chadd
6f8421f8a5 Use ieee80211_beacon_update() for dynamic beacon contents.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:51:56 +00:00
Adrian Chadd
21f6580ed8 Move beacon initialisation to wpi_init_beacon()
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:51:06 +00:00
Adrian Chadd
565248e2ad Use a static buffer in wpi_cmd - rather than alloc/free'ing the
beacon buffer frequently.

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:50:23 +00:00
Adrian Chadd
0b455e8fba Use WPI_RSSI_OFFSET instead of stat->noise (always 0 for me)
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:48:32 +00:00
Adrian Chadd
7e0d52321f Fix debug category in wpi_read_eeprom_band()
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:48:00 +00:00
Adrian Chadd
d138d3badc Move IBSS assocation processing to wpi_newassoc().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:46:24 +00:00
Adrian Chadd
4eaf2ee348 wpi_tx_done() shouldn't wait for wpi_start().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:45:43 +00:00
Adrian Chadd
7964dd56b7 Add node table lock - addresses LOR in wpi_node_free().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:44:52 +00:00
Adrian Chadd
f736d89885 Optimise sc->rev processing.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:43:58 +00:00
Adrian Chadd
45ac43f30f Use ring->queued for WPI_CMD_TX_DATA only.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:43:22 +00:00
Adrian Chadd
10550f6135 Move some code under WPI_LOCK().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:42:41 +00:00
Adrian Chadd
0b093122eb Remove unnecessary locking.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:41:57 +00:00
Adrian Chadd
ff62db1d9d Eliminate the WPI_FLAG_BUSY flag.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:40:59 +00:00
Adrian Chadd
63f576999e Add separate lock for TX queues.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:40:11 +00:00
Adrian Chadd
0ebca24555 Wrap node addition in STA mode into wpi_add_sta_node().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:35:25 +00:00
Adrian Chadd
eca2eb395c Replace kernel unit allocator with local set of functions.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:34:26 +00:00
Adrian Chadd
f15520d9b0 Move key processing in wpi_tx_data.
(This is in preparation for further work to support hardware encryption.)

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:33:13 +00:00
Adrian Chadd
f319a41c66 Remove some un-needed variables.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:32:12 +00:00
Adrian Chadd
7167f5fc02 Reformatting - break lines ~ 80 characters.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:31:21 +00:00
Adrian Chadd
7f1299c5cd wpi_intr(): remove duplicate code
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:30:03 +00:00
Adrian Chadd
8e4cf38ac7 Replace few numbers with named constants.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:29:22 +00:00