Commit Graph

97918 Commits

Author SHA1 Message Date
Marius Strobl
d98052c4a2 Add quirk to configure headphones redirection on Intel DH87RL boards.
MFC after:	3 days
2014-04-23 19:25:59 +00:00
Neel Natu
c5d216b786 Change the vlapic timer frequency to be in the ballpark of contemporary
hardware. This also decouples the vlapic emulation from the host's TSC
frequency.

Requested by:	grehan@
2014-04-23 16:50:40 +00:00
Kevin Lo
66b8205e11 Oops, revert r264801. 2014-04-23 05:54:55 +00:00
Kevin Lo
0f009f73b9 Add a missing break. 2014-04-23 05:53:03 +00:00
Hans Petter Selasky
543b6e5899 - Get transmit loop more in line with the other serial drivers.
- Add a comment about FTDI and ZLPs.
- Correctly check odditiy of baud rate divisor.
- Correct IOCTL handling for "error" and "event" char.

MFC after:	1 weeks
2014-04-23 05:50:55 +00:00
Adrian Chadd
656380e725 Wrap the rate control re-init code in a lock, to serialise it with
concurrent updates from any completing transmits in other threads.

This was exposed when doing power save work - net80211 is constantly
doing reassociations and it's causing the rate control state to get
blanked out.  This could cause the rate control code to assert.

This should be MFCed to stable/10 as it's a stability fix.

Tested:

* AR5416, STA

MFC after:	7 days
2014-04-23 05:19:45 +00:00
Bryan Drewery
2809a6dfa4 Fix grammar error and trailing newline.
Submitted by:	danfe
MFC after:	3 days
2014-04-23 02:21:17 +00:00
George V. Neville-Neil
092a178372 Check that port is started when MAC filter is set
The MAC filter set may be called without softc_lock held in the case of
SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING
flag which implies port started, but it is not guaranteed to remain.
softc_lock shared lock can't be held in the case of these ioctls processing,
since it results in failure where kernel complains that non-sleepable
lock is held in sleeping thread.

Both problems are repeatable on LAG with LACP proto bring up.

Submitted by:   Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

MFC after:	2 weeks
2014-04-22 20:19:09 +00:00
Luiz Otavio O Souza
6f05733a1f Keep geom_uncompress(4) in line with geom_uzip(4), bring in the r264504 fix.
Make sure not to start I/O bigger than MAXPHYS bytes.

Quoting r264504:

When we detect the condition, we'll reduce the block count and perform
a "short" read.  In g_uncompress_done() we need to consider the original
I/O length and stop early if we're about to deflate a block that we didn't
read.  By using bio_completed in the cloned BIO and not bio_length to
check for this, we automatically and gracefully handle short reads that
our providers may be doing on top of the short reads we may initiate
ourselves.

Reviewed by:	marcel
2014-04-22 18:08:34 +00:00
Tycho Nightingale
82c2c89084 Factor out common ioport handler code for better hygiene -- pointed
out by neel@.

Approved by:	neel (co-mentor)
2014-04-22 16:13:56 +00:00
Rick Macklem
9eeef7464b Fixes mkdir for the NFSv2 client that was broken by r264705.
Reported by:	bdrewery
MFC after:	2 weeks
2014-04-22 04:42:46 +00:00
Rick Macklem
2aa76dba07 Add {} braces so that the code conforms to the indentation.
Fortunately, I don't think doing the assignment of cap->tsomax
unconditionally causes any problem.

Reviewed by:	glebius
MFC after:	2 weeks
2014-04-21 19:17:19 +00:00
Rick Macklem
c7b560b9b4 For an NFSv4 mount with the "nocto" option, don't get the
up to date file attributes upon close. This reduces the
Getattr RPC count by about 65% for software builds.

MFC after:	2 weeks
2014-04-21 19:10:23 +00:00
Adrian Chadd
f172ef758e Rewrite the cleanup code to, well, actually work right.
The existing cleanup code was based on the Atheros reference driver
from way back and stuff that was in Linux ath9k.  It turned out to be ..
rather silly.

Specifically:

* The whole method of determining whether there's hardware-queued frames
  was fragile and the BAW would never quite work right afterwards.

* The cleanup path wouldn't correctly pull apart aggregate frames in the
  queue, so frames would not be freed and the BAW wouldn't be correctly
  updated.

So to implement this:

* Pull the aggregate frames apart correctly and handle each separately;
* Make the atid->incomp counter just track the number of hardware queued
  frames rather than try to figure it out from the BAW;
* Modify the aggregate completion path to handle it as a single frame
  (atid->incomp tracks the one frame now, not the subframes) and
  remove the frames from the BAW before completing them as normal frames;
* Make sure bf->bf_next is NULled out correctly;
* Make both aggregate session and non-aggregate path frames now be
  handled via the incompletion path.

TODO:

* kill atid->incomp; the driver tracks the hardware queued frames
  for each TID and so we can just use that.

This is a stability fix that should be merged back to stable/10.

Tested:

* AR5416, STA

MFC after:	7 days
2014-04-21 06:07:08 +00:00
Adrian Chadd
1771c64935 * Modify the debugging output from pause/resume to note the TID and STA
MAC
* Now that the paused < 0 bugs have been identified, make the DPRINTF()
  a device_printf() again.  Anything else that shows up here needs to be
  fixed immediately.

Tested:

* AR5416, STA mode

MFC after:	7 days
2014-04-21 02:09:14 +00:00
Adrian Chadd
706bb44485 Make sure bf_next is NULL'ed out when we're completing up an aggregate
frame through the cleanup path.

Whilst here, fix the indenting for something I messed up.

Tested:

* AR5416, STA mode
2014-04-21 02:05:51 +00:00
Adrian Chadd
59fbb5304d Fix a cleanup hang if cleanup gets called _during_ an active cleanup.
During power save testing I noticed that the cleanup code is being
called during a RUN->RUN state transition.  It's because the net80211
stack is treating that (for reasons I don't quitey know yet) as a
reassociation and this calls the node cleanup code.  The reason it's
seeing a RUN->RUN transition is because during active power save
stuff it's possible that the RUN->SLEEP and SLEEP->RUN transitions
happen so quickly that the deferred net80211 vap state code
"loses" a transition, namely the intermediary SLEEP transition.

So, this was causing the node reassociation code to sometimes be called
twice in quick succession and this would result in ath_tx_tid_cleanup()
to be called again.  The code calling it would always call pause, and
then only call resume if the TID didn't have "cleanup_inprogress" set.
Unfortunately it didn't check if it was already set on entry, so it
would pause but not call resume.  Thus, paused would be called more
than once (once before each entry into ath-tx_tid_cleanup()) but resume
would only be called once when the cleanup state was finished.

This doesn't entirely fix all of the issues seen in the cleanup path
but it's a necessary first step.

Since this is a stability fix, it should be merged to stable/10 at some
point.

Tested:

* AR5416, STA mode

MFC after:	7 days
2014-04-21 01:02:49 +00:00
Rick Macklem
c3e4a7261c Modify the NFSv4 client create/mkdir RPC so that it acquires
post-create/mkdir directory attributes. This allows the RPC to
name cache the newly created directory and reduces the lookup RPC
count for applications creating a lot of directories.

MFC after:	2 weeks
2014-04-20 22:19:00 +00:00
Michael Tuexen
eb67ee5fc6 Add consistency checks to ensure that fragments of a user message
have the same U-bit.

MFC after: 3 days
2014-04-20 21:11:39 +00:00
Ian Lepore
49f85c3edb Remove uncessary cache and TLB maintenance ops.
- These were needed on armv4/5 (VIVT cache), not needed on armv6.
 - The wbinv_all call can't be used on SMP systems; cache operations by
   set/way are not broadcast to other cores.
 - The TLB maintenance operations needed for pmap_growkernel() happen in
   pmap_grow_l2_bucket(), so there's no need to flush all TLB entries at
   the end.
 - There may not be any need for the TLB flush at the beginning of
   pmap_release(), but it's left in for now pending more investigation.

Pointed out by:	   Svatopluk Kraus <onwahe@gmail.com>
Discussed with:	   cognet@
2014-04-20 18:21:05 +00:00
Michael Tuexen
273351d497 Send also a packet containing an ABORT chunk in response to an OOTB packet
containing a COOKIE-ECHO chunk.

MFC after: 3 days
2014-04-20 18:15:23 +00:00
Ian Lepore
6afc723819 Fix a comment typo; conversion tables are for leap years, not leap seconds. 2014-04-20 13:37:22 +00:00
Martin Matuska
ecb47cf9c5 Backport from projects/pf r263908:
De-virtualize UMA zone pf_mtag_z and move to global initialization part.

The m_tag struct does not know about vnet context and the pf_mtag_free()
callback is called unaware of current vnet. This causes a panic.

MFC after:	1 week
2014-04-20 09:17:48 +00:00
Yoshihiro Takahashi
0f70759c12 MFi386: r257858 (by kib)
Fix signal delivery for the iBCS2 binaries.
2014-04-20 05:40:13 +00:00
Jilles Tjoelker
ddd2afd1f0 sys/capsicum.h: Remove not very useful visibility guards.
Since <sys/capsicum.h> does not comply to any standards, standards-compliant
applications do not include it and it is not useful to restrict what is
exposed depending on the requested standard.

In addition, the use of types like u_int makes the header fail in strict
standards compliance modes anyway.
2014-04-19 22:18:57 +00:00
Michael Tuexen
2dec1efc5a Use consistently debug output instead of an unconditional printf.
MFC after: 3 days
2014-04-19 20:55:51 +00:00
Rick Macklem
de1a42bd0c Modify the NFSv4 client open/create RPC so that it acquires
post-open/create directory attributes. This allows the RPC to
name cache the newly created file and reduces the lookup RPC
count by about 10% for software builds.

MFC after:	2 weeks
2014-04-19 19:40:20 +00:00
Michael Tuexen
32451da416 Send the correct error cause, when a DATA chunk with no user data
is received. This bug was reported by Irene Ruengeler.

MFC after: 3 days
2014-04-19 19:21:06 +00:00
John-Mark Gurney
de51fbd695 garbage collect something that hasn't been triggered in almost 5 years...
the last consumer was removed a couple years ago...
2014-04-19 19:08:08 +00:00
Rick Macklem
a6f8e64e74 Modify the Lookup RPC for NFSv4 so that it acquires directory
attributes. This allows the client to cache directory names
when they are looked up, reducing the Lookup RPC count by
about 40% for software builds.

MFC after:	2 weeks
2014-04-18 22:05:34 +00:00
Xin LI
18ab4bd8d9 MFV r264668:
4754 io issued to near-full luns even after setting noalloc threshold
4755 mg_alloc_failures is no longer needed

illumos/illumos@b6240e830b

MFC after:	2 weeks
2014-04-18 22:04:58 +00:00
Xin LI
d301d390a7 MFV r264667:
4752 fan out read zio taskqs

illumos/illumos-gate@1b497ab83e
2014-04-18 21:35:23 +00:00
Xin LI
613074ec08 MFV r264666:
4374 dn_free_ranges should use range_tree_t

illumos/illumos-gate@bf16b11e8d

MFC after:	2 weeks
2014-04-18 21:15:12 +00:00
Warner Losh
1bbf66051b Take out the hack to write -1's to non-NAND. Always do a BIO_DELETE on
the ranges we want to erase. This is nicer to SSDs that want TRIMs
anyway.
2014-04-18 17:03:43 +00:00
Warner Losh
875ac64f3e More properly account for free/reserved segments to avoid deadlock or
worse when filling up a device and then trying to erase files to make
space. Without enough space, you can't do that. Also, ensure that the
metadata writes don't generate ENOSPC. They will be retried later
since the buffers are still dirty...

Submitted by: mjg@
2014-04-18 17:03:35 +00:00
Warner Losh
77667fecbe Don't build EISA by default anymore. Remove from i386 GENERIC and
create an option that defaults to "no" on all platforms to not build
the EISA bits.

Discussed on: arch@
2014-04-18 16:53:06 +00:00
Hans Petter Selasky
ba2188af87 Add new USB quirk.
Submitted by:	kwm @
MFC after:	1 week
2014-04-18 16:19:33 +00:00
Tycho Nightingale
c46ff7fa0b Add support for the PIT 'readback' command -- based on a patch by grehan@.
Approved by:	grehan (co-mentor)
2014-04-18 16:05:12 +00:00
Tycho Nightingale
d6aa08c3ef Respect the destination operand size of the 'Input from Port' instruction.
Approved by:	grehan (co-mentor)
2014-04-18 15:22:56 +00:00
Bjoern A. Zeeb
cb18b57c6d Now that I figured out where the ethernet addresses come from
on NetFPGA-10G, assign one to the interface by default in a very
similar way.

MFC after:		6 days
X-Easter-Egg-Hunt:	yes
2014-04-18 14:21:10 +00:00
Hans Petter Selasky
491d5d0577 Add support for specifying USB controller mode via FDT.
Add FDT support to the DWC OTG kernel module.

Submitted by:	John Wehle <john@feith.com>
PR:		usb/188683
MFC after:	1 week
2014-04-18 08:31:55 +00:00
Justin Hibbits
8a00edea58 Enable and disable the PMC unit at load/unload time, respectively.
MFC after:	3 weeks
2014-04-18 06:39:00 +00:00
Tycho Nightingale
79d6ca331e Add support for reading the PIT Counter 2 output signal via the NMI
Status and Control register at port 0x61.

Be more conservative about "catching up" callouts that were supposed
to fire in the past by skipping an interrupt if it was
scheduled too far in the past.

Restore the PIT ACPI DSDT entries and add an entry for NMISC too.

Approved by:	neel (co-mentor)
2014-04-18 00:02:06 +00:00
Rick Macklem
209579aeac For NFS mounts using rsize,wsize=65536 over TSO enabled
network interfaces limited to 32 transmit segments, there
are two known issues.
The more serious one is that for an I/O of slightly less than 64K,
the net device driver prepends an ethernet header, resulting in a
TSO segment slightly larger than 64K. Since m_defrag() copies this
into 33 mbuf clusters, the transmit fails with EFBIG.
A tester indicated observing a similar failure using iSCSI.

The second less critical problem is that the network
device driver must copy the mbuf chain via m_defrag()
(m_collapse() is not sufficient), resulting in measurable overhead.

This patch reduces the default size of if_hw_tsomax
slightly, so that the first issue is avoided.
Fixing the second issue will require a way for the
network device driver to inform tcp_output() that it
is limited to 32 transmit segments.

Reported and tested by:	csforgeron@gmail.com, markus.gebert@hostpoint.ch
MFC after:	2 weeks
2014-04-17 23:31:50 +00:00
Jilles Tjoelker
edc63b46e0 fcntl.h: Make visible various POSIX.1-2008 features.
Also, remove #if __BSD_VISIBLE where it is redundant. When __BSD_VISIBLE is
defined to 1, __POSIX_VISIBLE, __XSI_VISIBLE and __ISO_C_VISIBLE are also
defined to the newest supported version.

PR:		188173
Reviewed by:	pluknet
2014-04-17 21:29:22 +00:00
Robert Watson
3bad806bc9 Fix typo and case inconsistency in MIPS CP0 register names.
MFC after:	3 days
2014-04-17 20:42:03 +00:00
Maksim Yevmenkin
080a4b9b1c use correct (integer) type for the temperature sysctl
Reviewed by:	np, scottl
Obtained from:	Netflix
MFC after:	3 days
2014-04-17 19:29:15 +00:00
Konstantin Belousov
beb4f781a5 Fix typo.
MFC after:	3 days
2014-04-17 18:13:23 +00:00
Alexander Motin
48ecfdc414 Correct AMD chipsets identification.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2014-04-17 14:16:02 +00:00
Bjoern A. Zeeb
0ef79eac83 Based on xlp_machdep.c and completed the list of options based on
boot/mips/beri/loader/metadata.c allow FDT configuration to set
command line options.
This leads to an interesting quesiton of future interactions with loader.
However for configurations without loader this allows bootverbose or boot
single user to be set by compiling a new kernel, which is good enough for
testing and debugging.

Reviewed by:	rwatson
MFC after:	1 week
2014-04-17 13:02:59 +00:00