Commit Graph

96972 Commits

Author SHA1 Message Date
Eitan Adler
b7d6c6b5e1 pcm(4): Permit non-root users to change default unit
Discussed with:	mav
2014-02-17 15:33:21 +00:00
Gleb Smirnoff
044ae9dbef Add my copyright to flowtable. 2014-02-17 12:07:17 +00:00
Gleb Smirnoff
47c8550576 Whitespace. 2014-02-17 12:02:44 +00:00
Gleb Smirnoff
5ec03c2bff Bring copyright notice to standard style. 2014-02-17 12:01:50 +00:00
Gleb Smirnoff
0ff96b4f55 o Remove at compile time the HASH_ALL code, that was never
tested and is unfinished. However, I've tested my version,
  it works okay. As before it is unfinished: timeout aren't
  driven by TCP session state. To enable the HASH_ALL mode,
  one needs in kernel config:

	options FLOWTABLE_HASH_ALL

o Reduce the alignment on flentry to 64 bytes. Without
  the FLOWTABLE_HASH_ALL option, twice less memory would
  be consumed by flows.
o API to ip_output()/ip6_output() got even more thin: 1 liner.
o Remove unused unions. Simply use fle->f_key[].
o Merge all IPv4 code into flowtable_lookup_ipv4(), and do same
  flowtable_lookup_ipv6(). Stop copying data to on stack
  sockaddr structures, simply use key[] on stack.
o Move code from flowtable_lookup_common() that actually works
  on insertion into flowtable_insert().

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-02-17 11:50:56 +00:00
John Hay
f37fafddd6 Make it possible to use the env kernel config file option for AVILA
and CAMBRIA boards that does not use loader to load the kernel. This
is basically how it was done for i386. This way tunables can also be
set. For example in config file:

env "/conf/AVILA.env"

And in AVILA.env:

vfs.unmapped_buf_allowed=0

MFC after:	2 weeks
2014-02-17 11:05:57 +00:00
Adrian Chadd
7307fbd10b The MDIO control register for the AR8327 has a different address to
previous chipsets.

Obtained from:	AR8327 datasheet
2014-02-17 05:54:24 +00:00
Adrian Chadd
1ee69b7d79 Add mmd declaration. 2014-02-17 05:51:37 +00:00
Adrian Chadd
7e1a619d03 Implement PHY bus MMD writes for arswitch.
This is used by the AR8327 PHY setup path.

Obtained from:	OpenWRT
2014-02-17 02:24:58 +00:00
Bryan Drewery
70f82cfbaf Fix M_FILEDESC leak in fdgrowtable() introduced in r244510.
fdgrowtable() now only reallocates fd_map when necessary.

This fixes fdgrowtable() to use the same logic as fdescfree() for
when to free the fd_map. The logic in fdescfree() is intended to
not free the initial static allocation, however the fd_map grows
at a slower rate than the table does. The table is intended to hold
20 fd, but its initial map has many more slots than 20.  The slot
sizing causes NDSLOTS(20) through NDSLOTS(63) to be 1 which matches
NDSLOTS(20), so fdescfree() was assuming that the fd_map was still
the initial allocation and not freeing it.

This partially reverts r244510 by reintroducing some of the logic
it removed in fdgrowtable().

Reviewed by:	mjg
Approved by:	bapt (mentor)
MFC after:	2 weeks
2014-02-17 00:00:39 +00:00
Bryan Drewery
88812f91aa Remove redundant memcpy of fd_ofiles in fdgrowtable() added in r247602
Discussed with:	mjg
Approved by:	bapt (mentor)
MFC after:	2 weeks
2014-02-16 23:10:46 +00:00
Dimitry Andric
ea4e0ab0cc After r261980, the local ptr variable in xbox_init() is no longer used,
breaking the LINT build.

Pointy hat to:	brueffer
2014-02-16 22:48:36 +00:00
Dimitry Andric
f785676f2a Upgrade our copy of llvm/clang to 3.4 release. This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3.  The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC after:	1 month
2014-02-16 19:44:07 +00:00
Ruslan Bukin
0beadc3c1c - Decrease buffer size.
- Handle eDMA interrupt on running channel only.
2014-02-16 19:21:44 +00:00
Ian Lepore
a6873fd141 After a timeout, reset the controller using SDHCI_RESET_CMD|SDHCI_RESET_DATA
rather than SDHCI_RESET_ALL; the latter turns off clocks and power, removing
any possibility of recovering from the error.

Also, double the timeout to 2 seconds.  Despite what the SD spec says about
all transactions completing in 250ms or less, I have a card which sometimes
takes more than a second to complete a write.
2014-02-16 17:22:49 +00:00
Ruslan Bukin
586a16c431 Add driver for Synchronous Audio Interface (SAI).
SAI supports full-duplex serial interfaces with frame
synchronization such as I2S, AC97, TDM, and codec/DSP
interfaces.
2014-02-16 16:49:54 +00:00
Hans Petter Selasky
77bea00c5e Add new PCI ID for hardware which needs port routing for USB 3.0.
PR:		usb/186811
MFC after:	1 week
Submitted by:	Philipp Maechler <philipp.maechler@mamo.li>
2014-02-16 14:37:23 +00:00
Christian Brueffer
5aabe0d7b8 Remove an nve(4)-specific workaround from the xbox port. nfe(4) doesn't
need it.

Reviewed by:	ed
2014-02-16 14:35:19 +00:00
Dimitry Andric
bc28228951 In sys/dev/usb/controller/musb_otg.c, fix a warning about musbotg_odevd
being unused, by adding it to the part that handles getting descriptors.

Reviewed by:	hselasky
MFC after:	3 days
2014-02-16 12:41:57 +00:00
Christian Brueffer
7f47cbd3ce Retire the nve(4) driver; nfe(4) has been the default driver for NVIDIA
nForce MCP adapters for a long time.

Yays:	jhb, remko, yongari
Nays:	none on the current and stable lists
2014-02-16 12:22:43 +00:00
Ian Lepore
a41679c945 Catch up with last-second name change. 2014-02-16 03:34:07 +00:00
Ian Lepore
49624653d5 Oops, remove some dregs of debugging. 2014-02-16 03:30:22 +00:00
Ian Lepore
f3639674b5 Make it possible to access the ocotp registers before the ocotp device
is attached, by establishing a temporary mapping of the registers when
necessary.  This is a temporary measure to keep progress moving; in the
long run we need better control over the order in which devices attach
(better than "the order they appear in the fdt dts source").
2014-02-16 03:09:39 +00:00
Ian Lepore
731ff010b9 Add a helper routine to depth-search the device tree for a node with a
matching 'compatible' property.  This probably has a short half-life (as
do most of the fdt_ functions), but it helps solve some near-term needs
until we work out the larger problems of device instantiation order
versus the order of things in the fdt data.
2014-02-16 03:00:59 +00:00
Ian Lepore
b6e466340b Sweep up a couple crumbs left over from the imx6->fsl renaming. 2014-02-15 21:59:00 +00:00
Ian Lepore
350badf9db It turns out Freescale cleverly made the ocotp device compatible across
several different families of SoCs, so move it to the freescale directory
and prefix everything with fsl rather than imx6.
2014-02-15 21:21:57 +00:00
Ian Lepore
e64f01a94a Add timeout logic to sdhci, separate from the timeouts done by the hardware.
If the hardware is not in a good state (like maybe clocks aren't running
because of a configuration glitch) its timeout clock may also not work
correctly, and the next command sent will hang that thread forever.  The
thread in question is usually the one and only thread (at init time) or
a bio queue worker thread whose lockup will eventually lead to the whole
system locking up when it runs out of buffers.

No sd card command should take longer than 250ms.  This new code establishes
a 1-second timeout to allow plenty of safety margin over that.
2014-02-15 20:45:53 +00:00
Ian Lepore
c4ec9d1887 If no compatible cards were found after probing the bus, say so. 2014-02-15 20:36:54 +00:00
George V. Neville-Neil
f850d57232 Summary: Two quick edits to the implementation notes as they're no
longer stored in netinet but in netpfil.
2014-02-15 18:36:31 +00:00
Ian Lepore
8775ab4589 Increase the wait time for acquiring the bus from 10 to 250ms.
Normally it never needs to wait here at all; waiting is done at the end
of the prior command.  When doing a crash dump, the normal interrupt
mechanism isn't used; instead the interrupt handler is called repeatedly
in a polling-like manner.  This can subvert hardware-specific drivers
and lead to trying to start a new command while the previous command is
still busy on the bus.  Since the SD spec says the longest a card can
take to execute any command is 250ms, use that as a timeout.
2014-02-15 17:59:32 +00:00
Ian Lepore
f1887a86aa Convert the "R1B fix" from a busy-loop in the interrupt handler to a callout. 2014-02-15 17:55:35 +00:00
Ian Lepore
844a97cdc2 Add a driver to provide access to imx6 on-chip one-time-programmble data.
Submitted by:	Steven Lawrance <stl@koffein.net>
2014-02-15 17:19:55 +00:00
Zbigniew Bodek
bccb7a02b5 Handle pmap_enter() on already promoted mappings for ARMv6/v7
Attempt to demote the superpage if trying to pmap_enter() on
one. Panic only when the particular superpage should
no longer exist for that pmap and address.
2014-02-15 13:27:45 +00:00
Zbigniew Bodek
6720dd234f Remove spurious assertion from pmap_extract_locked() on ARM
The condition under assertion is no longer valid since
superpages support is operating on section mappings.
2014-02-15 13:24:58 +00:00
Zbigniew Bodek
6be8284c66 Avoid redundant superpage promotion attempts on ARM
Because pmap_enter_locked() is called from few different functions
some redundancy in superpage promotion attempts can be observed.
Hence, avoid promotion in pmap_enter_object() (if the object can
be mapped by superpage it will be handled by pmap_enter_object()
itself) and also do not waste time in pmap_enter_quick().
From now on the promotion will be performed only in pmap_enter().
2014-02-15 13:22:37 +00:00
Zbigniew Bodek
bdd635e646 Fix superpage promotion on ARM with respect to RO/RW and wired attributes
It was possible to create RW superpage mapping even if
the base pages were RO due to wrong setting of the prot
flag passed to pmap_map_section().
Promotion attempt should be canceled in case of attributes
mismatch between any two base pages. Since we still use
pv_flags to maintain permission to write (PVF_WRITE) and
wired status (PVF_WIRED) for a page, it is also necessary
to take those variables into account.
2014-02-15 13:20:17 +00:00
Zbigniew Bodek
a7bd28f2cb Ensure proper TLB invalidation on superpage promotion and demotion on ARM
Base pages within newly created superpage need to be invalidated so that
new mapping is "visible" immediately after creation.
2014-02-15 13:17:51 +00:00
Zbigniew Bodek
807c947a43 Always clear L1 PTE descriptor when removing superpage on ARM
Invalidate L1 PTE regardles of existance of the corresponding
l2_bucket. This is relevant when superpage is entered via
pmap_enter_object() and will fix crash on entering page
in place of not properly removed superpage.
2014-02-15 13:13:00 +00:00
Dimitry Andric
216b991381 In sys/dev/xen/console/console.c, #if 0 an unused static function.
MFC after:	3 days
2014-02-15 12:37:26 +00:00
Dimitry Andric
a3043eeef2 Under sys/netpfil/ipfw, surround two IPv6-specific static functions with
#ifdef INET6, since they are unused when INET6 is disabled.

MFC after:	3 days
2014-02-15 12:25:01 +00:00
Dimitry Andric
2de7ba0758 In sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function.
MFC after:	3 days
2014-02-15 11:42:56 +00:00
Adrian Chadd
a2c5809961 Make sure that the flowtable flowid is only set to m_flowid if there
isn't one already supplied.

The previous flowtable code also did this.

Reviewed by:	glebius
Sponsored by:	Netflix, Inc.
2014-02-15 07:57:01 +00:00
Luigi Rizzo
f0ea3689a9 This new version of netmap brings you the following:
- netmap pipes, providing bidirectional blocking I/O while moving
  100+ Mpps between processes using shared memory channels
  (no mistake: over one hundred million. But mind you, i said
  *moving* not *processing*);

- kqueue support (BHyVe needs it);

- improved user library. Just the interface name lets you select a NIC,
  host port, VALE switch port, netmap pipe, and individual queues.
  The upcoming netmap-enabled libpcap will use this feature.

- optional extra buffers associated to netmap ports, for applications
  that need to buffer data yet don't want to make copies.

- segmentation offloading for the VALE switch, useful between VMs.

and a number of bug fixes and performance improvements.

My colleagues Giuseppe Lettieri and Vincenzo Maffione did a substantial
amount of work on these features so we owe them a big thanks.

There are some external repositories that can be of interest:

    https://code.google.com/p/netmap
        our public repository for netmap/VALE code, including
        linux versions and other stuff that does not belong here,
        such as python bindings.

    https://code.google.com/p/netmap-libpcap
        a clone of the libpcap repository with netmap support.
	With this any libpcap client has access to most netmap
	feature with no recompilation. E.g. tcpdump can filter
	packets at 10-15 Mpps.

    https://code.google.com/p/netmap-ipfw
        a userspace version of ipfw+dummynet which uses netmap
        to send/receive packets. Speed is up in the 7-10 Mpps
        range per core for simple rulesets.

Both netmap-libpcap and netmap-ipfw will be merged upstream at some
point, but while this happens it is useful to have access to them.

And yes, this code will be merged soon. It is infinitely better
than the version currently in 10 and 9.

MFC after:	3 days
2014-02-15 04:53:04 +00:00
Dimitry Andric
e9e21b6e41 In cxgbe, conditionalize the t4_pgprot_wc() function, since it is only
used when DOT5 is defined.

Reviewed by:	np
MFC after:	3 days
2014-02-14 23:38:42 +00:00
Adrian Chadd
f44e2a4c0f Include the CPU id in the per-CPU timer swi thread descriptions.
Original patch by:	jhb
2014-02-14 23:19:51 +00:00
Dimitry Andric
177ccd3c47 Disable warning about unused static const variables for sys/pci/ncr.c.
MFC after:	3 days
2014-02-14 21:20:16 +00:00
Dimitry Andric
2a9874259c In r260111, in sys/conf/files, I disabled warning about unused functions
for the wrong mcg.c, the one in ofed/drivers/infiniband/hw/mlx4.
Disable the warning for ofed/drivers/net/mlx4/mcg.c instead.

MFC after:	3 days
2014-02-14 21:06:12 +00:00
Sergey Kandaurov
54bb553005 Preserve one character space for a trailing '\0'.
Found by:	Ivan Klymenko via cppcheck
Discussed with: ae
MFC after:	1 week
2014-02-14 20:54:03 +00:00
Dimitry Andric
b3448df413 Similar to r260026, disable warning about unused functions for
ieee80211_adhoc.c, ieee80211_hostap.c and ieee80211_sta.c.

MFC after:	3 days
2014-02-14 20:11:06 +00:00
Dimitry Andric
2367b4ddc4 After r251709, avoid a clang 3.4 warning about an unused static const
variable (uma_max_ipers), when asserts are disabled.

Reviewed by:	glebius
MFC after:	3 days
2014-02-14 17:47:18 +00:00