Commit Graph

89580 Commits

Author SHA1 Message Date
Marius Strobl
6f9767ac27 - Replace partially incorrect function names in panic(9) strings with
__func__ and add some missing ones.
- Remove a stale comment.
- Remove unused NUM_ELEMENTS macro.
- Remove extra empty lines.
- Use DEVMETHOD_END.
- Use NULL rather than 0 for pointers.

MFC after:	3 days
2013-01-03 13:44:25 +00:00
Marius Strobl
dcceabd344 - Fix !SMP build.
- Replace incorrect function names in printf(9) strings with __func__.
- Make xctrl_shutdown_reasons table const.
- Use nitems() rather than rolling an own version.
- Use DEVMETHOD_END.
- Use NULL rather than 0 for pointers.

MFC after:	3 days
2013-01-03 13:42:45 +00:00
Peter Wemm
8a1163e82f Temporarily revert rev 244678. This is causing loopback problems with
the lo (loopback) interfaces.
2013-01-03 10:21:28 +00:00
Marius Strobl
9355088a94 Fix !INVARIANTS && !SMP build.
MFC after:	3 days
2013-01-03 01:09:50 +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
Jack F Vogel
e1d6f7b47b Add Intel Lynx Point PCH SATA Controller Device IDs 2013-01-02 22:26:46 +00:00
Jack F Vogel
cf40e447b9 Add Intel Lynx Point PCH SMBus Device IDs 2013-01-02 22:01:26 +00:00
Jack F Vogel
9e81697fdf Add Intel Lynx Point PCH HD Audio Device IDs 2013-01-02 21:56:58 +00:00
Jack F Vogel
5531f5a148 Add support for new Intel Lynx Point PCH - Watchdog Timer Device IDs 2013-01-02 21:45:20 +00:00
Hans Petter Selasky
558e8c9878 Add missing dependancy.
Submitted by:	Michael Butler
MFC after:	1 week
2013-01-02 07:33:43 +00:00
Adrian Chadd
aaa4568321 Link if_ath_spectral.c into the build. 2013-01-02 04:00:54 +00:00
Adrian Chadd
9af351f9e8 Add a new (skeleton) spectral mode manager module. 2013-01-02 03:59:02 +00:00
Adrian Chadd
bcd2a42f0b Fix the short repeat option code to not flip the option to 0 when
we call this w/ NOVAL set.
2013-01-02 03:56:20 +00:00
Adrian Chadd
1535a81e5e Add spectral HAL accessor methods. 2013-01-02 01:40:23 +00:00
Adrian Chadd
c9b690d37a Add a method to explicitly disable radar reporting if required. 2013-01-02 01:36:10 +00:00
Adrian Chadd
e9d8a3ab4b Add missing update to link ar5416_spectral.c into the build. 2013-01-02 01:24:36 +00:00
Adrian Chadd
973d40776c Bring over the basic spectral scan framework code from Qualcomm Atheros.
This includes the HAL routines to setup, enable/activate/disable spectral
scan and configure the relevant registers.

This still requires driver interaction to enable spectral scan reporting.
Specifically:

* call ah_spectralConfigure() to configure and enable spectral scan;
* .. there's currently no way to disable spectral scan... that will have
  to follow.
* call ah_spectralStart() to force start a spectral report;
* call ah_spectralStop() to force stop an active spectral report.

The spectral scan results appear as PHY errors (type 0x5 on the AR9280,
same as radar) but with the spectral scan bit set (0x10 in the last byte
of the frame) identifying it as a spectral report rather than a radar
FFT report.

Caveats:

* It's likely quite difficult to run spectral _and_ radar at the same
  time.  Enabling spectral scan disables the radar thresholds but
  leaves radar enabled.  Thus, the driver (for now) needs to ensure
  that only one or the other is enabled.

* .. it needs testing on HT40 mode.

Tested:

* AR9280 in STA mode, HT/20 only

TODO:

* Test on AR9285, AR9287;
* Test in both HT20 and HT40 modes;
* .. all the driver glue.

Obtained from:	Qualcomm Atheros
2013-01-02 00:38:01 +00:00
Robert Watson
d8c7c88283 Merge @219932 from Perforce:
FDT headers can't be included if the kernel is compiled without
  FDT support, due to dependence on generated kobj headers.  BERI
  supports both FDT and non-FDT kernels.

  Spotted by:	bz
2013-01-01 19:42:06 +00:00
Tim Kientzle
5bf325556b Overhauled CPSW driver for TI CPSW Ethernet module
(as used in AM335x SoC for BeagleBone).

Among other things:
 * Watchdog reset doesn't hang the driver.
 * Disconnecting cable doesn't hang the driver.
 * ifconfig up/down doesn't hang the driver
 * Out-of-memory no longer panics the driver.

Known issues:
 * Doesn't have good support for fragmented packets
   (calls m_defrag() on TX, assumes RX packets are never fragmented)
 * Promisc and allmulti still unimplimented
 * addmulti and delmulti still unimplemented
 * TX queue still stalls (but watchdog now consistently recovers in ~5s)
 * No sysctl monitoring
 * Only supports port0
 * No switch configuration support
 * Not tested on anything but BeagleBone

Committed from: BeagleBone
2013-01-01 18:55:04 +00:00
Antoine Brodin
dfa4d7fdb9 Remove unneeded semicolons.
Reviewed by:	md5 of the object files
2013-01-01 18:16:49 +00:00
Konstantin Belousov
f99cb34c4f The process_deferred_inactive() function locks the vnodes of the ufs
mount, which means that is must not be called while the snaplock is
owned.  The vfs_write_resume(9) does call the function as the
VFS_SUSP_CLEAN() method, which is too early and falls into the region
still protected by snaplock.

Add yet another flag for the vfs_write_resume_flags() to avoid calling
suspension cleanup handler after the suspend is lifted, and use it in
the ffs_snapshot() call to vfs_write_resume.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2013-01-01 16:14:48 +00:00
Andrew Turner
5c9e101707 Document the known values of the RTL release field in the cache is register 2013-01-01 03:48:39 +00:00
Oleksandr Tymoshenko
72b5255edf Add interrupt for PL310 controller 2012-12-31 22:48:54 +00:00
Oleksandr Tymoshenko
7c5338d71e PL310 driver update:
- Add pl310.disable tunable to disable L2 cache altogether. In
    order to make sure that it's 100% disabled we use cache event
    counters for cache line eviction and read allocate events
    and panic if any of these counters increased. This is purely
    for debugging purpose
- Direct access DEBUG_CTRL and CTRL might be unavailable in
    unsecure mode, so use platform-specific functions for
    these registers
- Replace #if 1 with proper erratum numbers
- Add erratum 753970 workaround
- Remove wait function for atomic operations
- Protect cache operations with spin mutex in order to prevent race condition
- Disable instruction cache prefetch and make sure data cache
    prefetch is enabled in OMAP4-specific intialization
2012-12-31 21:19:44 +00:00
Oleksandr Tymoshenko
28009afbb4 Merge r234561 from busdma_machdep.c to ARMv6 version of busdma:
Interrupts must be disabled while handling a partial cache line flush,
as otherwise the interrupt handling code may modify data in the non-DMA
part of the cache line while we have it stashed away in the temporary
stack buffer, then we end up restoring a stale value.

PR:             160431
Submitted by:   Ian Lepore
2012-12-31 21:00:38 +00:00
Bjoern A. Zeeb
3d4ff5e9f0 Happy New Year 2013! 2012-12-31 11:22:55 +00:00
Robert Watson
9eb71e68fe If FDT is compiled into a FreeBSD/beri kernel, initialise OpenFirmware.
Sponsored by:	DARPA, AFRL
2012-12-31 11:06:37 +00:00
Robert Watson
ff82fb46d4 When a partially initialised FDT-based device instance can't attach,
perhaps due to an interrupt configuration problem, do not try to free
device ivars that have not yet have been allocated.

MFC after:	1 week
Reviewed by:	gonzo
Sponsored by:	DARPA, AFRL
2012-12-30 21:10:48 +00:00
Adrian Chadd
29dbc48349 Add the initial HAL glue for the spectral analysis support.
* Finish adding the HAL capability to announce whether a NIC supports
  spectral scan or not;
* Add spectral scan methods to the HAL structure;
* Add HAL_SPECTRAL_PARAM for configuration of the spectral scan logic.

The capability ID and HAL_SPECTRAL_PARAM struct are from Qualcomm
Atheros.
2012-12-30 06:48:12 +00:00
Adrian Chadd
9cbc6f1595 Add spectral scan capability. 2012-12-30 06:46:11 +00:00
Hans Petter Selasky
92e2321883 Add new USB ID.
PR:		usb/174814
Submitted by:	Andy Balholm
MFC after:	1 week
2012-12-29 21:22:38 +00:00
Konstantin Belousov
91e9474552 Make it possible to atomically resume writes on the mount and account
the write start, by adding a variation of the vfs_write_resume(9)
which accepts flags.

Use the new function to prevent a deadlock between parallel suspension
and snapshotting a UFS mount.  The ffs_snapshot() code performed
vfs_write_resume() followed by vn_start_write() while owning the
snaplock.  If the suspension intervene between resume and
vn_start_write(), the deadlock occured after the suspending thread
tried to lock the snaplock, most typically during the write in the
ffs_copyonwrite().

Reported and tested by:	Andreas Longwitz <longwitz@incore.de>
Reviewed by:	mckusick
MFC after:	2 weeks
X-MFC-note:	make the vfs_write_resume(9) function a macro after the MFC,
	in HEAD
2012-12-28 23:08:30 +00:00
Baptiste Daroussin
661c81c3d6 Fix typo in comment.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2012-12-28 21:59:47 +00:00
Xin LI
1adb4ebd35 Add DEVICE_IDENTIFY method for wbwd(4), required on most of recent
Supermicro motherboards.

Tested on X8STi and X8DTH boards.

Sponsored by:	iXsystems, Inc.
MFC after:	2 weeks
2012-12-28 21:35:47 +00:00
Xin LI
e25fe6cdb9 Use DEVMETHOD_END.
MFC after:	2 weeks
2012-12-28 20:44:23 +00:00
Attilio Rao
85e43e9636 Improve bufring impl:
- Remove unused br_prod_bufs member
- Fixup r241037: buf_ring pads br_prod_* and br_cons_* members at 128
  bytes, assuming a fixed cache line size for all the architectures.
  However, the above mentioned revision broke the padding.
  Use explicit padding to the CACHE_LINE_SIZE on the members that
  mark the initial new padded sections. Of course, the padding is not
  important for performance reasons in the DEBUG_BUFRING case, leaving
  br_cons members to share the cache line with br_lock.
- Fixup r244732: by removing incorrectly added membar in
  buf_ring_dequeue_sc() where surrounding locking shoud be enough.
- Drastically reduce the number of membar used (pratically reverting
  r244732) by switching rmb() in buf_ring_dequeue_mc() and wmb() in
  buf_ring_enqueue() to be complete barriers.  This, along with
  br_prod_bufs departure, should fix ordering issues as explained in
  the provided comments.

This patch is not targeted for MFC.

Sponsored by:	EMC / Isilon storage division
Reviewed by:	glebius
2012-12-28 17:41:36 +00:00
Gleb Smirnoff
d8aa10cc35 In netpfil/pf:
- Add my copyright to files I've touched a lot this year.
  - Add dash in front of all copyright notices according to style(9).
  - Move $OpenBSD$ down below copyright notices.
  - Remove extra line between cdefs.h and __FBSDID.
2012-12-28 09:19:49 +00:00
Adrian Chadd
2720a0cbd9 Add the AR9280 and later spectral scan register definitions.
Obtained from:	Linux ath9k, Qualcomm Atheros (datasheet)
2012-12-28 08:00:31 +00:00
Adrian Chadd
00ba39c988 Add radar_bin_thresh_sel (bit 24:26), which defines when
to consider the radar FFT report bins as "strong".
2012-12-28 07:49:45 +00:00
Oleksandr Tymoshenko
7fc3ae51f3 Fix build on ARM (and probably other platforms) 2012-12-28 06:52:53 +00:00
Oleksandr Tymoshenko
3ada2d599e Add makeshift implementation for framebuffer console's cursor
Basically it's replica of VersatilePB code which is replica of XBox FB
code. All of them are linear framebuffers and should have common bits
moved to reusable framework.
2012-12-28 03:18:05 +00:00
David Xu
9d4bf0db7c Use strlcpy to NULL-terminate error message even if user provided a short
buffer.
2012-12-28 02:43:33 +00:00
Oleksandr Tymoshenko
0c093a7055 Fix event timer on Raspberry Pi
- Disable interrupt when updating compare value in order to
   make this operation atomical

- Increase minimum period for event timer. Systimer on BCM2835
    is compare timer, so if minimum period is too small it might
    be less then fraction of time between "read current value" and
    "set compare timer" operations. It means that when timer is armed
    actual counter value is more then compare value and it will take
    whole cycle (~32sec for 1MHz timer) to fire interrupt.

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
2012-12-28 01:38:43 +00:00
Oleksandr Tymoshenko
142043670b Add custom renderer for poor man's cursor support for framebuffer console 2012-12-28 00:55:43 +00:00
Andrey V. Elsukov
e37e7917f3 Add an ability to set net.link.stf.permit_rfc1918 from the loader.
MFC after:	2 weeks
2012-12-27 21:26:08 +00:00
Andrey V. Elsukov
51743c5f73 Add net.link.stf.permit_rfc1918 sysctl variable. It can be used to allow
the use of private IPv4 addresses with stf(4).

MFC after:	2 weeks
2012-12-27 20:59:22 +00:00
Attilio Rao
ad9505aae7 Remove an unused var.
Sponsored by:	EMC / Isilon storage division
MFC after:	3 days
2012-12-27 12:53:46 +00:00
Attilio Rao
30c7dd147c br_prod_tail and br_cons_tail members are used as barrier to
signal bug_ring ownership. However, instructions can be reordered
around members write leading to stale values for ie. br_prod_bufs.

Use correct memory barriers to ensure proper ordering of the
ownership tokens updates.

Sponsored by:	EMC / Isilon storage division
MFC after:	2 weeks
2012-12-27 12:36:58 +00:00
Michael Tuexen
11e03b3200 Some cleanups.
MFC after: 3 days
2012-12-27 08:10:58 +00:00