Commit Graph

1336 Commits

Author SHA1 Message Date
Adrian Chadd
0694aa7903 Add ar9300_get_next_tbtt().
Tested:

* AR9380, STA mode
2014-04-30 02:29:31 +00:00
Adrian Chadd
91e198f6a2 Only track the power state variable if the power state is changed,
not if the self-generated frame state is changed.
2014-04-30 02:03:47 +00:00
Adrian Chadd
17102f802f Note that the AR9380 and later hardware supports MYBEACON.
(Yes, I said AR5416 in the committed code.  It's still strictly true.)
2014-04-27 23:37:39 +00:00
Kevin Lo
28bc7834e0 Add preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets.
Committed over the TP-LINK TL-WN725N v2 (RTL8188EUS) on amd64 with WPA.
2014-04-25 08:01:22 +00:00
Cy Schubert
3e6034e2df Implement the final missing sysctls by moving ipf_auth_softc_t from
ip_auth.c to ip_auth.h. ip_frag_soft_t moves from ip_frag.c to
ip_frag.h. mlfk_ipl.c creates sysctl MIBs that reference control blocks
that are dynamically created when IP Filter is loaded. This necessitated
creating them on-the-fly rather than statically at compile time.

Approved by:	glebius (mentor)
2014-04-07 19:32:56 +00:00
Adrian Chadd
e6f2713747 Fix ah_powerMode setting.
Reported by:	sbruno
2014-03-29 18:56:11 +00:00
Adrian Chadd
bbd4b4346c Also tag the current HAL power mode in ar9300_set_power_mode(). 2014-03-10 06:05:26 +00:00
Xin LI
f0bd5302dd MFV r262756:
Import xz-embedded from git.

This is from commit hash '6a8a2364434763a033781f6b2a605ace9a021013'.

This makes it possible to use CRC64 but for now it's intentionally
not added to build.
2014-03-05 01:33:15 +00:00
Gleb Smirnoff
e3a7aa6f56 - Remove rt_metrics_lite and simply put its members into rtentry.
- Use counter(9) for rt_pksent (former rt_rmx.rmx_pksent). This
  removes another cache trashing ++ from packet forwarding path.
- Create zini/fini methods for the rtentry UMA zone. Via initialize
  mutex and counter in them.
- Fix reporting of rmx_pksent to routing socket.
- Fix netstat(1) to report "Use" both in kvm(3) and sysctl(3) mode.

The change is mostly targeted for stable/10 merge. For head,
rt_pksent is expected to just disappear.

Discussed with:		melifaro
Sponsored by:		Netflix
Sponsored by:		Nginx, Inc.
2014-03-05 01:17:47 +00:00
Warner Losh
8ec77e7a22 These file have a, possibly dubious, GPL claim. Until that's sorted, move to gnu. 2014-02-28 16:26:44 +00:00
Warner Losh
63950cce66 Correct initial import script 2014-02-28 01:33:03 +00:00
Warner Losh
d4c30e9dfe Initial import of DTS files from Linux 2014-02-28 01:32:44 +00:00
Warner Losh
2705fd8194 Initial import of Linux/Vendor DTS files for various embedded boards. 2014-02-28 01:31:35 +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
Gleb Smirnoff
8327c83319 Substitute flags from historical mbuf(9) allocator with modern ones.
Sponsored by:	Nginx, Inc.
2014-01-16 13:42:14 +00:00
Gavin Atkinson
e1a5283697 Add firmware for Intel Centrino Wireless-N 105 devices.
Committed from:	Centrino 105 device
2014-01-11 18:56:48 +00:00
Gavin Atkinson
fd71662513 Add firmware version 18.168.6.1 (API version 6) for Intel Centrino
Wireless-N 135 wireless adapters, soon to be supported by iwn(4).

Committed using:	Laptop with Centrino 135 chipset
Obtained from:	wireless.kernel.org firmware downloads
2014-01-05 01:07:14 +00:00
Ian Lepore
6a101ebe72 Remove 'inline' from ar9300_init_pll(), it's too big to inline.
Submitted by:	adrian@
2013-11-08 16:28:00 +00:00
Gleb Smirnoff
f8ba95a1a8 Fix build. We need to include systm.h before if_var.h.
Pointy hat to:	glebius
2013-10-28 15:11:37 +00:00
Gleb Smirnoff
3122bb3880 Include lock.h before mutex.h. 2013-10-27 17:12:31 +00:00
Gleb Smirnoff
75bf2db380 Move new pf includes to the pf directory. The pfvar.h remain
in net, to avoid compatibility breakage for no sake.

The future plan is to split most of non-kernel parts of
pfvar.h into pf.h, and then make pfvar.h a kernel only
include breaking compatibility.

Discussed with:		bz
2013-10-27 16:25:57 +00:00
Gleb Smirnoff
9dae57e134 Start splitting pfvar.h into internal and external parts.
- Provide pf_altq.h that has only stuff needed for ALTQ.
- Start pf.h, that would have all constant values and
  eventually non-kernel structures.
- Build ALTQ w/o pfvar.h, include if_var.h, that before
  came via pollution.
- Build tcpdump w/o pfvar.h.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-26 18:59:58 +00:00
Kevin Lo
24180b6a7d Update firmware for run(4) to version 0.33. 2013-10-18 07:40:50 +00:00
Navdeep Parhar
0082e6a570 Update krping to the latest upstream code. Move all the FreeBSD
specific parts to krping_dev.c, which leaves the other files as
close to their upstream versions as possible.
2013-10-14 23:02:05 +00:00
Navdeep Parhar
07992c1fed Delete all of the old RDMA code (except krping, which was switched to
use sys/ofed some time back).  This has been sitting around as dead code
in the tree for a very long time.
2013-10-14 22:39:08 +00:00
Dimitry Andric
b50a9b704b Initialize a variable in sys/contrib/ipfilter/netinet/ip_tftp_pxy.c, to
silence a gcc warning.

Approved by:	re (rodrigc)
X-MFC-With:	r255332
2013-10-10 07:23:11 +00:00
Dimitry Andric
209536b767 Initialize a variable in sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c, to
silence a gcc warning.

Approved by:	re (gjb)
X-MFC-With:	r255332
2013-10-09 17:07:50 +00:00
Alfred Perlstein
c9f432b7ba Update OFED to Linux 3.7 and update Mellanox drivers.
Update the OFED Infiniband core to the version supplied in Linux
version 3.7.

The update to OFED is nearly all additional defines and functions
with the exception of the addition of additional parameters to
ib_register_device() and the reg_user_mr callback.

In addition the ibcore (Infiniband core) and ipoib (IP over Infiniband)
have both been made into completely loadable modules to facilitate
testing of the OFED stack in FreeBSD.

Finally the Mellanox Infiniband drivers are now updated to the
latest version shipping with Linux 3.7.

Submitted by: Mellanox FreeBSD driver team:
                Oded Shanoon (odeds mellanox.com),
                Meny Yossefi (menyy mellanox.com),
                Orit Moskovich (oritm mellanox.com)

Approved by: re
2013-09-29 00:35:03 +00:00
Cy Schubert
6100a68654 Address double init of ip_log mutex, fixing a panic after ipfilter is
re-enabled following it being disabled.

Approved by:	glebius (mentor)
Approved by:	re (blanket)
2013-09-21 04:11:51 +00:00
Cy Schubert
152e0e40a0 Enable main ipfilter sysctl MIBs.
Approved by:	glebius (mentor)
Approved by:	re (blanket)
2013-09-21 04:08:52 +00:00
Cy Schubert
ea3022cbbd Convert ipfilter from timeout(9) to callout(9).
Submitted by:	jhb
Approved by:	glebius (mentor)
Approved by:	re (blanket)
2013-09-21 04:05:38 +00:00
Cy Schubert
a37a846869 Remove additional non-FreeBSD code.
Approved by:	glebius (mentor)
Approved by:	re (blanket)
2013-09-21 03:57:56 +00:00
Gleb Smirnoff
af85e9b0c4 Fix !INET6 build. 2013-09-07 09:47:18 +00:00
Cy Schubert
bfc88dcbf7 Update ipfilter 4.1.28 --> 5.1.2.
Approved by:		glebius (mentor)
BSD Licensed by:	Darren Reed <darrenr@reed.wattle.id.au> (author)
2013-09-06 23:11:19 +00:00
George V. Neville-Neil
06e8e46410 Add firmware for Centrino 2200-N wireless devices.
Driver software for this firmware will be updated in a following commit.
2013-08-28 15:12:51 +00:00
Jean-Sébastien Pédron
0adf4921fb drm/radeon: Import the Radeon KMS driver
This driver is based on Linux 3.8 and a previous effort by kan@.

More informations about this project can be found on the FreeBSD wiki:
    https://wiki.freebsd.org/AMD_GPU

The driver is split into:

  sys/dev/drm2:
    The driver sources.

  sys/modules/drm2/radeonkmw:
    The driver main kernel module's Makefile.

  sys/modules/drm2/radeonkmsfw:
    All firmware kernel module Makefiles. There's one directory and one
    Makefile for each firmware.

  sys/contrib/dev/drm2/radeonkmsfw:
    All firmware binary sources.

  tools/tools/drm/radeon
    Tools to update firmwares or regenerate some headers.

Merging the driver to FreeBSD 9.x may be possible but not a priority for
now.

Help from:	kib@, kan@
Tested by:	avg@, kwm@, ray@,
		Alexander Yerenkow <yerenkow@gmail.com>,
		Anders Bolt-Evensen <andersbo87@me.com>,
		Denis Djubajlo <stdedjub@googlemail.com>,
		J.R. Oldroyd <fbsd@opal.com>,
		Mikaël Urankar <mikael.urankar@gmail.com>,
		Pierre-Emmanuel Pédron <pepcitron@gmail.com>,
		Sam Fourman Jr. <sfourman@gmail.com>,
		Wade <wade-is-great@live.com>,
		(probably other I forgot...)
HW donations:	kyzh, Yakaz
2013-08-25 19:37:15 +00:00
Jung-uk Kim
79c6d94679 Merge ACPICA 20130823. 2013-08-23 23:25:58 +00:00
Navdeep Parhar
ea68a7142e Assorted fixes to krping. Disconnect the rest of sys/contrib/rdma from
the build while here.  sys/ofed has more recent RDMA code and should be
used instead.  We should probably move krping out of sys/contrib/rdma
and get rid of the rest of it.

Obtained from:	Chelsio
2013-08-23 19:12:29 +00:00
Adrian Chadd
aca5021d5f Add firmware for the Intel 2030 and variants.
Submitted by:	Cedric GROSS <cg@gross.info>
Obtained from:	Linux, Intel
2013-08-11 01:09:16 +00:00
Adrian Chadd
a887c8a18c Remove a now-unused firmware. 2013-08-11 01:04:07 +00:00
Adrian Chadd
0cdfe2ae89 Update the 6000g2a image.
Obtained from:	Linux, Intel
2013-08-11 01:03:32 +00:00
Rui Paulo
76e51bbc16 Realtek's RTL8712 firmware blob needed by the upcoming rsu(4) driver. 2013-07-29 06:53:42 +00:00
Jung-uk Kim
bf6fac21dc Merge ACPICA 20130725. 2013-07-26 21:34:09 +00:00
Cy Schubert
850b82f47b As per the developers handbook (5.3.1 step 1), prepare the vendor trees for
import of new ipfilter vendor sources by flattening them.

To keep the tags consistent with dist, the tags are also flattened.

Approved by:	glebius (Mentor)
2013-07-19 05:41:57 +00:00
Alexander Leidinger
19ca1aa0d4 Fix build for gcc users by declaring variables for unions in structs which
don't declare a variable. The size before/after this change of the structs
doesn't change with gcc/clang.

Noticed by:	several
Suggested by:	Gary Jennejohn <gljennjohn@googlemail.com>
2013-07-10 10:40:52 +00:00
Hiren Panchasara
3c9d5a037d Adding urtwn(4) firmware and related changes.
Reviewed by:	rpaulo
Approved by:	sbruno (mentor)
2013-07-10 08:21:09 +00:00
Alexander Leidinger
b85e1f7d05 - Move videodev headers from compat/linux to contrib/v4l (cp from vendor and
apply diff to compat/linux versions).
- The cp implies an update of videodev2.h to the linux kernel 2.6.34.14 one.

The update makes video in skype v4 work on FreeBSD.

Tested by:	Artyom Mirgorodskiy <artyom.mirgorodsky@gmail.com>
		(update of header only)
2013-07-06 19:59:06 +00:00
Adrian Chadd
8978a6a9da Check the return value from ath_hal_malloc()
Reported by:	uqs
2013-06-29 16:49:00 +00:00
Jung-uk Kim
b1ddd13145 Move definitions required by userland applications out of acpica_machdep.h. 2013-06-27 00:22:40 +00:00
Jung-uk Kim
8d744e473f Merge ACPICA 20130626. 2013-06-27 00:16:54 +00:00
Adrian Chadd
92b9076a70 If EEPROM data is provided by the AHB layer, copy it in.
This is required for the flash layer code to correctly work.

Tested:

* AR9330 SoC (carambola 2)
2013-06-26 04:53:33 +00:00
Adrian Chadd
860487123c Re-enable the channel set code for the AR933x.
This required a HAL change to map the 2GHz frequency back to an IEEE
channel number in order to fetch some value(s) to program in.
2013-06-26 04:46:43 +00:00
Adrian Chadd
9855e2aff2 In preparation to support AR933x SoC builds, allow the AH_SUPPORT_AR93(xx)
options to set the AR9300 HAL defines.

This enables the Wasp, Hornet (and later Scorpion) SoC code.
2013-06-26 04:34:45 +00:00
Adrian Chadd
a778f8a19a Add a stub AR93xx RF module just to keep the linker happy.
When building AR933x test images, I'd like to only build only the ar9300
HAL.  To do this, it needs to supply an RF linker entry or it won't compile.

Tested:

* AR933x test builds
2013-06-26 04:33:57 +00:00
Adrian Chadd
8ccb8e813f The AR9300 HAL uses this config to program AR_PHY_SWITCH_COM_2 on AR9485
NICs which have bluetooth coexistence enabled.

The WB225 NIC has the common antenna switch configuration set to 0x0 which
disables all external switch bit setting. This obviously won't work when
doing coexistence.

This value is a magic value from the windows .inf files. It _looks_ right
but I haven't yet verified it - unfortunately my AR9285+AR3012 BT combo
has an earlier BT device which doesn't actually _have_ firmware on it.
So I have to fix ath3kfw to handle loading in firmware into the newer
NICs before I can finish testing this.

This may not hold true for CUS198, which is another custom AR9485 board.
2013-06-14 08:15:28 +00:00
Adrian Chadd
429eba61c2 Flip on AH_PRIVATE_DIAG by default; this will include the AR9300 EEPROM
dump code that is worth having around.
2013-06-14 08:13:21 +00:00
Adrian Chadd
b5ddd8005c Add bluetooth setup method functions to the HAL. 2013-06-14 06:15:23 +00:00
Adrian Chadd
94d5d4ada1 If chan is NULL, don't derefrence it.
The bluetooth setup code actually does a channel lookup during setup,
even though we haven't yet programmed in a channel. Sigh.

Tested:

* WB225 (AR9485) + bluetooth
2013-06-14 06:14:49 +00:00
Adrian Chadd
d9006e5951 Set the FreeBSD capability bit to indicate that LNA diversity is enabled.
This is true for the AR9485 and AR933x SoC.
2013-06-13 02:20:45 +00:00
Adrian Chadd
f4af8a6a62 Return HAL_ANT_VARIABLE for now, until it's unstubbed.
This is needed by the slow antenna diversity logic for the AR9485/AR9462
as it's only engaged if the TX diveristy is set to VARIABLE.
2013-06-13 02:19:53 +00:00
Adrian Chadd
a987ae075f Tie in the LNA diversity configuration functions into the HAL. 2013-06-12 15:23:17 +00:00
Adrian Chadd
6ba04f0d20 Fix a false -> AH_FALSE.
Now, why this hasn't tripped _any_ tinderbox builds yet, I dunno.
It's been like this for a while.
2013-05-29 04:21:42 +00:00
Jung-uk Kim
a9d8d09c46 Merge ACPICA 20130517. 2013-05-20 23:52:49 +00:00
Warner Losh
7adaa27093 Turns out that there really isn't an RTC chip on this board, at all. 2013-05-12 01:29:18 +00:00
Warner Losh
474d77509e Make the read/write routines default to the newer DS1337 part, but keep
the supported bits board specific.
2013-05-10 06:28:01 +00:00
Warner Losh
3bec6ae787 As requested, move this back to opt-in and list my boards. 2013-05-10 04:49:40 +00:00
Warner Losh
6346a0d0f6 Remove the commented out code I just committed. If we need it, I'll
bring it back uncommented our, or rewrite it.
2013-05-10 04:30:14 +00:00
Warner Losh
856099a320 Add support from GE Intelligent Platform Cavium Octeon boards. Add
options OCTEON_VENDOR_GEFES to enable support for these boards, to
match changes that GE publishes to the Octeon Simple Executive. Since
board types overlap with other boards, it is unlikely that we will
properly boot on other Octeon boards with OCTEON_VENDOR_GEFES enabled.
Tested extensively on the WANIC 6354, but I retained support for all
the other models. Some features need changes in the base kernel, and
those are in progress.
2013-05-10 03:04:45 +00:00
Warner Losh
751d46b795 Both my EBH5200 and GE WANIC 6354 have a RTC as well. It looks from
the Linux tree that they always include this chip in their FDT, so
make support for the ds1337 opt-out rather than opt-in. Now my boards
boot with the correct time.
2013-05-10 02:57:46 +00:00
Jung-uk Kim
be4147dd7c MFV: r250336
Fix for _INI regression introduced in version 20130328.
2013-05-08 00:20:35 +00:00
Warner Losh
086e2ac533 Expose cvmx_mgmt_port_num_ports() as a wrapper to the static
__cvmx_mgmt_port_num_ports() mostly to avoid exporting a function
starting with __.
2013-05-02 19:45:53 +00:00
Adrian Chadd
0efc449468 Fix this code to compile without warnings - AH_DEBUG was pulling in
ichan, but OS_MARK was not using it.  It only uses it when
AH_DEBUG_ALQ is also defined.
2013-05-02 07:02:23 +00:00
Adrian Chadd
2f544eedb3 Add device identification and probe/attach support for the QCA9565.
The QCA9565 is a 1x1 2.4GHz 11n chip with integrated on-chip bluetooth.
The AR9300 HAL already has support for this chip; it just wasn't
included in the probe/attach path.

Tested:

* This commit brought to you over a QCA9565 wifi connection from
  FreeBSD.
* .. ie, basic STA, pings, no iperf or antenna diversity checking just yet.
2013-05-02 00:59:39 +00:00
Eitan Adler
7a48925d12 Fix incorrect sizeof() in bzero()
Submitted by:	swildner@DragonFlyBSD.org
Reviewed by:	alfred, jmallett
2013-05-01 04:37:45 +00:00
Adrian Chadd
a371ba805e Disable TXCONT, it's not here in FreeBSD. 2013-05-01 01:50:33 +00:00
Adrian Chadd
fffa0eea61 There's no HAL_EEPROM in FreeBSD - use ar9300_eeprom_t instead. 2013-05-01 01:49:00 +00:00
Adrian Chadd
d82f130e70 Sync from git - ah_config is in 'ath_hal', not 'ath_hal_private' on
FreeBSD.
2013-04-29 23:57:41 +00:00
Adrian Chadd
e113789bdc Bring over my FreeBSD modifications for the AR9300 HAL to make it
work in FreeBSD.

This is still heavily a work in progress but I'd rather it start
shipping in -HEAD sooner rather than later.

This doesn't (yet) link it into the build system either for a static
kernel or as a module; that will come later (after many, many make universe
tests.)
2013-04-28 00:57:47 +00:00
Adrian Chadd
76bd547b9c Copy the vendor branch ar9300 code from qcamain_open_hal into this
directory.

Only copy the ar9300 HAL, we don't want to grab everything.
2013-04-28 00:53:31 +00:00
Jung-uk Kim
895f26a936 Merge ACPICA 20130418. 2013-04-19 23:49:34 +00:00
Gleb Smirnoff
22e71d1cc4 Forcibly defining _KERNEL is bad idea. Toss some code so that ip_var.h
isn't included with forced _KERNEL define.
2013-04-08 19:20:27 +00:00
Jung-uk Kim
9c7c683c56 Merge ACPICA 20130328. 2013-04-04 22:11:30 +00:00
Gleb Smirnoff
fa0fbaece3 Simplify TAILQ usage and avoid additional memory allocations.
Tested by:	Eugene M. Zheganin <emz norma.perm.ru>
Sponsored by:	Nginx, Inc
2013-03-05 08:08:16 +00:00
Jung-uk Kim
9c48c75ed6 Merge ACPICA 20130214. 2013-02-15 20:36:28 +00:00
Jung-uk Kim
6f4860fc7d Merge two bug fixes from the vendor branch.
Reported by:	pjd
2013-01-28 20:37:32 +00:00
Jung-uk Kim
255334d108 Fix another build breakage for ia64. 2013-01-21 21:26:42 +00:00
Juli Mallett
a9e4eb6929 Fix packet reception and other issues arising from incorrect ASX clock
configuration on the physical ports of the Ubiquiti EdgeRouter Lite.
2013-01-21 06:47:06 +00:00
Jung-uk Kim
10c281ab92 Work around build breakage with GCC 4.2. 2013-01-19 00:37:17 +00:00
Jung-uk Kim
efcc2a3054 Merge ACPICA 20130117. 2013-01-17 23:56:43 +00:00
Juli Mallett
161aae1a7a Use the right USB clock type on the EdgeRouter Lite. This fixes USB. 2013-01-02 23:29:54 +00:00
Juli Mallett
b29648facd Add basic support for the Ubiquiti EdgeRouter Lite.
Note that USB does not currently work, and the flash is connected via USB, so
local storage is not working.
2013-01-02 23:17:50 +00:00
Juli Mallett
527ca1d99c Allow this file to build on FreeBSD. 2012-11-27 02:03:41 +00:00
Juli Mallett
ea716a4f24 o) Have the FreeBSD kernel option "INVARIANTS" trickle down into the Simple
Executive code where similar invariant knobs exist.
o) Make the Simple Executive's warning function print "WARNING: " on the same
   line as the warning it is displaying, rather than on a separate line.
2012-11-24 02:55:05 +00:00
Juli Mallett
85129b4bd4 Use bootverbose to control debug printfs from the Cavium Simple Executive
code.  Also remove an unnecessary CVMX_ENABLE_DEBUG_PRINTS conditional around
what is already a cvmx_dprintf.
2012-11-24 02:12:24 +00:00
Juli Mallett
01a310bd57 o) Add support for specifying a model of Octeon to target at compile-time,
reducing the number of runtime checks done by the SDK code.
o) Group board/CPU information at early startup by subject matter, so that e.g.
   CPU information is adjacent to CPU information and board information is
   adjacent to board information.
2012-11-24 02:00:29 +00:00
Jung-uk Kim
ed17e06e2c Merge ACPICA 20121114. 2012-11-20 21:01:59 +00:00
Juli Mallett
b3a6fcb3b7 Return port numbers for ATCA-7220 SPI interfaces in a different place for
consistency reasons, and to ensure that CRC addition is disabled on output.
With this, transmit seems to be working properly on the ATCA-7220.
2012-11-19 08:35:58 +00:00
Juli Mallett
72d324fab6 Fix packet receive on the ATCA-7220 by disabling FCS-related checks, since the
FCS is stripped by the underlying hardware before it reaches the Octeon.
2012-11-19 05:24:33 +00:00
Juli Mallett
9dea12b4a2 Fix build for FreeBSD kernel. 2012-11-13 07:33:45 +00:00
Dimitry Andric
31edd45d7b In sys/contrib/ngatm/netnatm/msg/uni_ie.c, fix a few warnings from newer
versions of clang 3.2, about comparing enum uni_cause values against
integer constants which fall outside the enum range.  No functional
change.

MFC after:	3 days
2012-11-05 19:00:25 +00:00
Juli Mallett
72a4047ca7 Handle the management port on the EBT5600 and disable loopback. The XAUI
port connected to the Broadcom switch does not seem operable, but it's unclear
if that's simply due to a lack of configuration information for the switch.
The switch does not seem to present any identifying information via MDIO,
and is a BCM56512.
2012-11-01 03:45:33 +00:00
Juli Mallett
684ba62e3f Speed feature tests and initialize helper configuration that some CPUs require. 2012-10-30 06:07:30 +00:00
Juli Mallett
1f51baaa92 Use Simple Executive LED display routines, which correctly use the LED base
address passed from the bootloader, rather than using a hard-coded value.

Make FreeBSD announce itself on the LED display similar to other kernels.

Remove uses of the previous LED routines, which were under-used and only used
in drivers for what seem like debugging purposes, despite those drivers being
widely-tested.

Remove several inlines for accessing memory that duplicate other functions
which are now used instead, as they are now entirely unused.
2012-10-29 00:51:53 +00:00
Juli Mallett
cb5add636f No MII on the RSYS4GBE (AMC-7211/ATCA-7220). 2012-10-26 02:09:55 +00:00
Juli Mallett
320a9376e9 Add support for Radisys as a vendor of Octeon hardware. Add some preliminary
support for what their boot loader refers to as the "RSYS4GBE", of which there
are two instances ("Data Processing Blocks") on the Radisys ATCA-7220.
2012-10-26 00:08:50 +00:00
Jung-uk Kim
8ef1a33100 Merge ACPICA 20121018. 2012-10-23 23:49:17 +00:00
Gleb Smirnoff
40dd089521 Fix defines in r241245. We actually don't define FreeBSD.
Reported & tested by:	Oleg Ginzburg
2012-10-14 15:03:06 +00:00
Kevin Lo
9823d52705 Revert previous commit...
Pointyhat to:	kevlo (myself)
2012-10-10 08:36:38 +00:00
Kevin Lo
a10cee30c9 Prefer NULL over 0 for pointers 2012-10-09 08:27:40 +00:00
Gleb Smirnoff
21d172a3f1 A step in resolving mess with byte ordering for AF_INET. After this change:
- All packets in NETISR_IP queue are in net byte order.
  - ip_input() is entered in net byte order and converts packet
    to host byte order right _after_ processing pfil(9) hooks.
  - ip_output() is entered in host byte order and converts packet
    to net byte order right _before_ processing pfil(9) hooks.
  - ip_fragment() accepts and emits packet in net byte order.
  - ip_forward(), ip_mloopback() use host byte order (untouched actually).
  - ip_fastforward() no longer modifies packet at all (except ip_ttl).
  - Swapping of byte order there and back removed from the following modules:
    pf(4), ipfw(4), enc(4), if_bridge(4).
  - Swapping of byte order added to ipfilter(4), based on __FreeBSD_version
  - __FreeBSD_version bumped.
  - pfil(9) manual page updated.

Reviewed by:	ray, luigi, eri, melifaro
Tested by:	glebius (LE), ray (BE)
2012-10-06 10:02:11 +00:00
Max Khon
617643aaa6 Fix pseudo checksum calculation.
This fixes ipfilter w/ network controllers that implement only
partial rx csum offloading.

PR:			106438
Obtained from:		upstream
MFC after:		1 week
2012-09-27 18:15:01 +00:00
Gleb Smirnoff
486e090204 Fix panic introduced by me in r240835, when zero weight
was passed to wtab_alloc().

Reported by:	Kim Culhan <w8hdkim gmail.com>
2012-09-25 12:45:41 +00:00
Gleb Smirnoff
e9e4cb7345 Use M_NOWAIT in wtab_alloc(), too. Convert panic() to
a soft failure here. wtab_alloc() is used by red_alloc(),
which can fail.

Reported by:	Kim Culhan <w8hdkim gmail.com>
2012-09-22 18:47:14 +00:00
Pawel Jakub Dawidek
a6512306ce Fix an obvious typo. 2012-09-22 17:41:56 +00:00
Gleb Smirnoff
03fb709e1f Convert more M_WAITOK malloc() to M_NOWAIT.
Reported by:	Kim Culhan <w8hdkim gmail.com>
2012-09-22 12:49:36 +00:00
Rui Paulo
b0bf1a1836 Remove #ident macro. 2012-09-21 19:18:39 +00:00
Kevin Lo
b7e1113e8f Fix typo: s/pakcet/packet 2012-09-20 03:29:43 +00:00
Jung-uk Kim
042ff955b5 Merge ACPICA 20120913. 2012-09-19 23:25:24 +00:00
Gleb Smirnoff
32726fe911 Do more than r236298 did in the projects/pf branch: use M_NOWAIT in
altq_add() and its descendants. Currently altq(4) in FreeBSD is configured
via pf(4) ioctls, which can't configure altq(4) w/o holding locks.
Fortunately, altq(4) code in spife of using M_WAITOK is ready to receive
NULL from malloc(9), so change is mostly mechanical. While here, utilize
M_ZERO instead of bzero().

A large redesign needed to achieve M_WAITOK usage when configuring altq(4).
Or an alternative (not pf(4)) configuration interface should be implemented.

Reported by:	pluknet
2012-09-18 12:34:35 +00:00
Gleb Smirnoff
3b3a8eb937 o Create directory sys/netpfil, where all packet filters should
reside, and move there ipfw(4) and pf(4).

o Move most modified parts of pf out of contrib.

Actual movements:

sys/contrib/pf/net/*.c		-> sys/netpfil/pf/
sys/contrib/pf/net/*.h		-> sys/net/
contrib/pf/pfctl/*.c		-> sbin/pfctl
contrib/pf/pfctl/*.h		-> sbin/pfctl
contrib/pf/pfctl/pfctl.8	-> sbin/pfctl
contrib/pf/pfctl/*.4		-> share/man/man4
contrib/pf/pfctl/*.5		-> share/man/man5

sys/netinet/ipfw		-> sys/netpfil/ipfw

The arguable movement is pf/net/*.h -> sys/net. There are
future plans to refactor pf includes, so I decided not to
break things twice.

Not modified bits of pf left in contrib: authpf, ftp-proxy,
tftp-proxy, pflogd.

The ipfw(4) movement is planned to be merged to stable/9,
to make head and stable match.

Discussed with:		bz, luigi
2012-09-14 11:51:49 +00:00
Gleb Smirnoff
d6d3f01e0a Merge the projects/pf/head branch, that was worked on for last six months,
into head. The most significant achievements in the new code:

 o Fine grained locking, thus much better performance.
 o Fixes to many problems in pf, that were specific to FreeBSD port.

New code doesn't have that many ifdefs and much less OpenBSDisms, thus
is more attractive to our developers.

  Those interested in details, can browse through SVN log of the
projects/pf/head branch. And for reference, here is exact list of
revisions merged:

r232043, r232044, r232062, r232148, r232149, r232150, r232298, r232330,
r232332, r232340, r232386, r232390, r232391, r232605, r232655, r232656,
r232661, r232662, r232663, r232664, r232673, r232691, r233309, r233782,
r233829, r233830, r233834, r233835, r233836, r233865, r233866, r233868,
r233873, r234056, r234096, r234100, r234108, r234175, r234187, r234223,
r234271, r234272, r234282, r234307, r234309, r234382, r234384, r234456,
r234486, r234606, r234640, r234641, r234642, r234644, r234651, r235505,
r235506, r235535, r235605, r235606, r235826, r235991, r235993, r236168,
r236173, r236179, r236180, r236181, r236186, r236223, r236227, r236230,
r236252, r236254, r236298, r236299, r236300, r236301, r236397, r236398,
r236399, r236499, r236512, r236513, r236525, r236526, r236545, r236548,
r236553, r236554, r236556, r236557, r236561, r236570, r236630, r236672,
r236673, r236679, r236706, r236710, r236718, r237154, r237155, r237169,
r237314, r237363, r237364, r237368, r237369, r237376, r237440, r237442,
r237751, r237783, r237784, r237785, r237788, r237791, r238421, r238522,
r238523, r238524, r238525, r239173, r239186, r239644, r239652, r239661,
r239773, r240125, r240130, r240131, r240136, r240186, r240196, r240212.

I'd like to thank people who participated in early testing:

Tested by:	Florian Smeets <flo freebsd.org>
Tested by:	Chekaluk Vitaly <artemrts ukr.net>
Tested by:	Ben Wilber <ben desync.com>
Tested by:	Ian FREISLICH <ianf cloudseed.co.za>
2012-09-08 06:41:54 +00:00
Jung-uk Kim
1df130f1d4 Merge ACPICA 20120816. 2012-08-16 20:54:52 +00:00
Warner Losh
52baf267be Update to latest git version of dtc to get new dtsv2 support,
including the include directive.

Fix minor build issue corrected by converting yypush_buffer_state and
yypop_buffer_state to yy_set_buffer_state and a hard-coded 100-deep
stack.  It was easier to fix it here than to import that support into
our flex.

The new tools and test hardness remain unsupported at the moment.
2012-07-24 16:29:33 +00:00
Gleb Smirnoff
6aef0416fb Use M_NOWAIT while holding the pf giant lock. 2012-07-15 19:10:00 +00:00
Jung-uk Kim
e8241eabbb Merge ACPICA 20120711. 2012-07-11 23:18:35 +00:00
Jung-uk Kim
3e2c973410 MFV: r237650
Do not malloc(9) while holding a spin lock, to avoid panic.

Reported by:	kib (and many others)
Tested by:	kib (and many others)
2012-06-27 16:15:13 +00:00
Bernhard Schmidt
2289f9b47e Add new firmware for the g2a (6205) and g2b (623x) devices.
MFC after:	3 days
2012-06-27 16:14:28 +00:00
Jung-uk Kim
f38b0f210c Merge ACPICA 20120620. 2012-06-22 00:40:44 +00:00
Navdeep Parhar
09fe63205c - Updated TOE support in the kernel.
- Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs.
  These are available as t3_tom and t4_tom modules that augment cxgb(4)
  and cxgbe(4) respectively.  The cxgb/cxgbe drivers continue to work as
  usual with or without these extra features.

- iWARP driver for Terminator 3 ASIC (kernel verbs).  T4 iWARP in the
  works and will follow soon.

Build-tested with make universe.

30s overview
============
What interfaces support TCP offload?  Look for TOE4 and/or TOE6 in the
capabilities of an interface:
# ifconfig -m | grep TOE

Enable/disable TCP offload on an interface (just like any other ifnet
capability):
# ifconfig cxgbe0 toe
# ifconfig cxgbe0 -toe

Which connections are offloaded?  Look for toe4 and/or toe6 in the
output of netstat and sockstat:
# netstat -np tcp | grep toe
# sockstat -46c | grep toe

Reviewed by:	bz, gnn
Sponsored by:	Chelsio communications.
MFC after:	~3 months (after 9.1, and after ensuring MFC is feasible)
2012-06-19 07:34:13 +00:00
Gleb Smirnoff
40874f18de Merge revision 1.715 from OpenBSD:
date: 2010/12/24 20:12:56;  author: henning;  state: Exp;  lines: +3 -3
  in pf_src_connlimit, the indices to sk->addr were swapped.
  tracked down and diff sent by Robert B Mills <rbmills at sdf.lonestar.org>
  thanks, very good work! ok claudio

Impact is that the "flush" keyword didn't work.

Obtained from:	OpenBSD
MFC after:	1 week
2012-06-06 09:36:52 +00:00
Ermal Luçi
0ad5ef9c8f Correct table counter functionality to not panic.
This was caused by not proper initialization of necessary parameters.

PR: 168200
Reviewed by:	bz@, glebius@
MFC after:	1 week
2012-05-31 20:10:05 +00:00
Jung-uk Kim
a7a3b383f2 Merge ACPICA 20120518. 2012-05-24 23:12:30 +00:00
Alexander V. Chernikov
bdf942c3f0 Revert r234834 per luigi@ request.
Cleaner solution (e.g. adding another header) should be done here.

Original log:
  Move several enums and structures required for L2 filtering from ip_fw_private.h to ip_fw.h.
  Remove ipfw/ip_fw_private.h header from non-ipfw code.

Requested by:      luigi
Approved by:       kib(mentor)
2012-05-03 08:56:43 +00:00
Alexander V. Chernikov
7bd5e9b143 Move several enums and structures required for L2 filtering from ip_fw_private.h to ip_fw.h.
Remove ipfw/ip_fw_private.h header from non-ipfw code.

Approved by:        ae(mentor)
MFC after:          2 weeks
2012-04-30 10:22:23 +00:00
Jung-uk Kim
eef1b955be Merge ACPICA 20120420. 2012-04-23 23:05:14 +00:00
Dimitry Andric
a511762672 Fix the following compilation warnings in sys/contrib/rdma/rdma_cma.c:
sys/contrib/rdma/rdma_cma.c:1259:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
	      case ECONNRESET:
		   ^
  @/sys/errno.h:118:20: note: expanded from macro 'ECONNRESET'
  #define ECONNRESET      54              /* Connection reset by peer */
		      ^
  sys/contrib/rdma/rdma_cma.c:1263:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
	      case ETIMEDOUT:
		   ^
  @/sys/errno.h:124:19: note: expanded from macro 'ETIMEDOUT'
  #define ETIMEDOUT       60              /* Operation timed out */
		      ^
  sys/contrib/rdma/rdma_cma.c:1260:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
	      case ECONNREFUSED:
		   ^
  @/sys/errno.h:125:22: note: expanded from macro 'ECONNREFUSED'
  #define ECONNREFUSED    61              /* Connection refused */
		      ^

This is because the switch uses iw_cm_event::status, which is an enum
iw_cm_event_status, while ECONNRESET, ETIMEDOUT and ECONNREFUSED are
just plain defines from errno.h.

It looks like there is only one use of any of the enumeration values of
iw_cm_event_status, in:

  sys/contrib/rdma/rdma_iwcm.c: 	if (iw_event->status == IW_CM_EVENT_STATUS_ACCEPTED) {

So messing around with the enum definitions to fix the warning seems too
disruptive; the simplest fix is to cast the argument of the switch to
int.

Reviewed by:	kmacy
MFC after:	1 week
2012-04-20 21:52:57 +00:00
Andrey V. Elsukov
59894e4a44 Fix VIMAGE build. 2012-04-05 04:41:06 +00:00
Gleb Smirnoff
07b6b55dce Merge from OpenBSD:
revision 1.173
  date: 2011/11/09 12:36:03;  author: camield;  state: Exp;  lines: +11 -12
  State expire time is a baseline time ("last active") for expiry
  calculations, and does _not_ denote the time when to expire.  So
  it should never be added to (set into the future).

  Try to reconstruct it with an educated guess on state import and
  just set it to the current time on state updates.

  This fixes a problem on pfsync listeners where the expiry time
  could be double the expected value and cause a lot more states
  to linger.
2012-04-04 14:47:59 +00:00
Gleb Smirnoff
64484cf630 Since pf 4.5 import pf(4) has a mechanism to defer
forwarding a packet, that creates state, until
pfsync(4) peer acks state addition (or 10 msec
timeout passes).

This is needed for active-active CARP configurations,
which are poorly supported in FreeBSD and arguably
a good idea at all.

Unfortunately by the time of import this feature in
OpenBSD was turned on, and did not have a switch to
turn it off. This leaked to FreeBSD.

This change make it possible to turn this feature
off via ioctl() and turns it off by default.

Obtained from:	OpenBSD
2012-04-03 18:09:20 +00:00
Jung-uk Kim
3f8d720f87 MFV: r233615
Revert r233555 and apply a fix for the reference counting regressions.

Tested by:	andreast, lme, nwhitehorn,
		Sevan / Venture37 (venture37 at gmail dot com)
Submitted by:	Robert Moore (robert dot moore at intel dot com)
2012-03-28 17:21:59 +00:00
Jung-uk Kim
c708f80e7d MFV: r233551
Fix two possible memory leaks in error path.

Obtained from:	ACPICA
2012-03-27 15:27:20 +00:00
Jung-uk Kim
f19ebc89a3 MFV: r233550
Temporarily revert an upstream commit.  This change caused regressions for
too many laptop users.  Especially, automatic repair for broken _BIF caused
strange reference counting issues and kernal panics.  This reverts:

c995fed15a
2012-03-27 15:15:30 +00:00
Bernhard Schmidt
74ebfba7ca Update the firmware to version 0.236
Submitted by:	PseudoCylon
MFC after:	2 weeks
2012-03-21 19:09:52 +00:00
Jung-uk Kim
4c52cad2f9 Merge ACPICA 20120320. 2012-03-20 21:37:52 +00:00
Bernhard Schmidt
fd5c6edb78 Import the latest microcode.h which was used to generate the current
firmware files and adjust the Makefile.

Obtained from:	OpenBSD
2012-03-14 08:00:33 +00:00
Bernhard Schmidt
b1866dfea3 Update the rt2860's firmware and add a Makefile for the module. While
here remove the ucode header file which was used to generate the fw files
but by now is outdated.

Reviewed by:	ray
Obtained from:	OpenBSD
2012-03-13 21:25:25 +00:00
Juli Mallett
964fdce070 Remove some files not used by the FreeBSD kernel which have been adding quite
a bit of bloat to the kernel source tree's size.
2012-03-13 06:48:26 +00:00
Juli Mallett
b5acc0d618 Disable the Simple Executive's error decoding/reporting code. 2012-03-11 06:55:17 +00:00
Juli Mallett
9261550cf3 Do not try to use libfdt in FreeBSD. 2012-03-11 06:49:31 +00:00
Juli Mallett
57a8a8ff31 Remove files not needed by FreeBSD. 2012-03-11 06:18:38 +00:00