]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoSupply maximum value as an argument to the decimal() function
Maxim Sobolev [Tue, 25 Jan 2011 04:35:07 +0000 (04:35 +0000)]
Supply maximum value as an argument to the decimal() function
instead of supplying number of bits.

Submitted by: bde

13 years agoImport the ERTT (Enhanced Round Trip Time) Khelp module. ERTT uses the
Lawrence Stewart [Mon, 24 Jan 2011 23:08:38 +0000 (23:08 +0000)]
Import the ERTT (Enhanced Round Trip Time) Khelp module. ERTT uses the
Khelp/Hhook KPIs to hook into the TCP stack and maintain a per-connection, low
noise estimate of the instantaneous RTT. ERTT's implementation is robust even in
the face of delayed acknowledgements and/or TSO being in use for a connection.

A high quality, low noise RTT estimate is a requirement for applications such as
delay-based congestion control, for which we will be importing some algorithm
implementations shortly.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way
MFC after: 3 months

13 years agoFix a LOR by dropping the global ifnet locks while allocating a new ifnet
John Baldwin [Mon, 24 Jan 2011 22:21:58 +0000 (22:21 +0000)]
Fix a LOR by dropping the global ifnet locks while allocating a new ifnet
table in if_grow().  The order of the SYSINIT's for ifnet state were swapped
so that the various locks were initialized before being used.

Reviewed by: pluknet, bz
MFC after: 2 weeks

13 years agoIn uart_tty_outwakeup(), check CTS/RTS flow control settings and
Marcel Moolenaar [Mon, 24 Jan 2011 18:34:16 +0000 (18:34 +0000)]
In uart_tty_outwakeup(), check CTS/RTS flow control settings and
prevent sending data when CTS is de-asserted.
In uart_tty_intr(), call uart_tty_outwakeup() when the CTS signal
changed, knowing that uart_tty_outwakeup() will do the right
thing for flow control. This avoids redundant conditionals.

PR: kern/148644
Submitted by: John Wehle <john@feith.com>
MFC after: 3 days

13 years agoReinitialize driver when MTU is changed and driver is running.
Pyun YongHyeon [Mon, 24 Jan 2011 17:53:58 +0000 (17:53 +0000)]
Reinitialize driver when MTU is changed and driver is running.

Reported by: Huang, Yusheng ( yusheng.huang <> bluecoat com )

13 years agoAdd more sanity checks for USB_HOST_ALIGN input values. Re-factor existing
Hans Petter Selasky [Mon, 24 Jan 2011 17:38:37 +0000 (17:38 +0000)]
Add more sanity checks for USB_HOST_ALIGN input values. Re-factor existing
checks for readability.

Approved by: thompsa (mentor)

13 years agoReplace spaces with tabs.
Jaakko Heinonen [Mon, 24 Jan 2011 17:08:26 +0000 (17:08 +0000)]
Replace spaces with tabs.

13 years agoRemove an invalid register setup; this is likely a holdover from
Adrian Chadd [Mon, 24 Jan 2011 17:03:22 +0000 (17:03 +0000)]
Remove an invalid register setup; this is likely a holdover from
the AR5212 code. It doesn't exist in ath9k and I've been told it
doesn't exist in the Atheros internal driver.

13 years agoAdd missing section number for .Xr rc.
Glen Barber [Mon, 24 Jan 2011 15:11:08 +0000 (15:11 +0000)]
Add missing section number for .Xr rc.

Pointed out by: keramida
Approved by: keramida (mentor)

13 years agoDon't open configuration file from worker process. Handle SIGHUP in the
Pawel Jakub Dawidek [Mon, 24 Jan 2011 15:04:15 +0000 (15:04 +0000)]
Don't open configuration file from worker process. Handle SIGHUP in the
master process only and pass changes to the worker processes over control
socket. This removes access to global namespace in preparation for capsicum
sandboxing.

MFC after: 2 weeks

13 years agoAdded a blurb about thin provisioning, fixed some formatting.
Ivan Voras [Mon, 24 Jan 2011 14:24:10 +0000 (14:24 +0000)]
Added a blurb about thin provisioning, fixed some formatting.

13 years agolibkvm: Unbreak build for powerpc64/powerpc
Ulrich Spörlein [Mon, 24 Jan 2011 11:06:40 +0000 (11:06 +0000)]
libkvm: Unbreak build for powerpc64/powerpc

This slipped through my testing due to the recent roto-tiling of the
ARCH/TARGET parts that I need to catch up with. Mea culpa.

13 years agoWhile printing out the WSID and CPU ID only the first time it appears for
Robert Watson [Mon, 24 Jan 2011 10:58:36 +0000 (10:58 +0000)]
While printing out the WSID and CPU ID only the first time it appears for
each workstream, rather than on every protocol, is prettier, it makes
machine-parsing of netstat -Q output a lot harder.  Repeat the information
and hope that the user forgives us slightly dense formatting.

MFC after: 3 days
Reported by: bz
Sponsored by: Juniper Networks

13 years agoFix off-by-one whitespace error in netstat -Q workstream listing.
Robert Watson [Mon, 24 Jan 2011 10:54:09 +0000 (10:54 +0000)]
Fix off-by-one whitespace error in netstat -Q workstream listing.

Reported by: bz
MFC after: 3 days
Sponsored by: Juniper Networks

13 years agoICH7 SATA controller in legacy mode can provide access to SATA registers
Alexander Motin [Mon, 24 Jan 2011 09:24:20 +0000 (09:24 +0000)]
ICH7 SATA controller in legacy mode can provide access to SATA registers
via AHCI-like memory resource at BAR(5). Use it if BIOS was so kind to
allocate memory for that BAR. This allows hot-plug support and connection
speed reporting.

MFC after: 2 weeks

13 years agoAdd build infrastructure for Khelp modules.
Lawrence Stewart [Mon, 24 Jan 2011 07:50:29 +0000 (07:50 +0000)]
Add build infrastructure for Khelp modules.

Sponsored by: FreeBSD Foundation
Reviewed by: bz
MFC after: 3 months

13 years agoUndo a local option which mistakenly crept into a commit.
Adrian Chadd [Mon, 24 Jan 2011 07:45:14 +0000 (07:45 +0000)]
Undo a local option which mistakenly crept into a commit.

13 years agoo Cylinder numbers are 10 bits in the MBR;
Maxim Sobolev [Mon, 24 Jan 2011 07:16:20 +0000 (07:16 +0000)]
o Cylinder numbers are 10 bits in the MBR;

o Sector numbers are only 6 bits in the MBR;

o bde'cize name of the local variable.

Submitted by: bde

13 years agoAdd a simple tool to print the contents of a v4k EEPROM dump.
Adrian Chadd [Mon, 24 Jan 2011 06:46:03 +0000 (06:46 +0000)]
Add a simple tool to print the contents of a v4k EEPROM dump.

13 years agoThe dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities
Kirk McKusick [Mon, 24 Jan 2011 06:17:05 +0000 (06:17 +0000)]
The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities
include sys/time.h instead of time.h. This include is incorrect as
per the manpages for the APIs and the POSIX definitions. This commit
replaces sys/time.h where necessary with time.h.

The commit also includes some minor style(9) header fixup in newfs.

This commit is part of a larger effort by Garrett Cooper started in
//depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more
POSIX compliant.

Submitted by:  Garrett Cooper   yanegomi at gmail dot com

13 years agoHonor $PAGER instead of always calling more.
Gordon Tetlow [Mon, 24 Jan 2011 04:32:59 +0000 (04:32 +0000)]
Honor $PAGER instead of always calling more.

Approved by: colin@
MFC after: 1 week

13 years agoApply TX interrupt moderation to all RTL810xE PCIe Fast Ethernet
Pyun YongHyeon [Mon, 24 Jan 2011 00:01:06 +0000 (00:01 +0000)]
Apply TX interrupt moderation to all RTL810xE PCIe Fast Ethernet
controllers. Experimentation with RTL8102E, RTL8103E and RTL8105E
showed dramatic decrement of TX completion interrupts under high TX
load(e.g.  from 147k interrupts/second to 10k interrupts/second)
With this change, TX interrupt moderation is applied to all
controllers except RTL8139C+.

13 years agoAdd stream scheduling support.
Michael Tuexen [Sun, 23 Jan 2011 19:36:28 +0000 (19:36 +0000)]
Add stream scheduling support.
This work is based on a patch received from Robin Seggelmann.

MFC after: 3 months.

13 years agoDisable ATAPI DMA unconditionally on Apple Kauai ATA controllers, like it
Nathan Whitehorn [Sun, 23 Jan 2011 17:20:11 +0000 (17:20 +0000)]
Disable ATAPI DMA unconditionally on Apple Kauai ATA controllers, like it
is on the MacIO ones. It appears to be unreliable on all DBDMA-based
controllers for unknown reasons, which should be figured out eventually.

Tested by: Torfinn Ingolfsen
MFC after: 1 week

13 years agoThis script parses output of userland tools. In the case of a faulted
Josh Paetzel [Sun, 23 Jan 2011 17:13:29 +0000 (17:13 +0000)]
This script parses output of userland tools.  In the case of a faulted
zpool the output causes the script to bail out with syntax errors.
Since a scrub of a faulted zpool is pointless, just skip over any pools
marked as such.

PR: conf/150228
Submitted by: jpaetzel
Approved by: kib (mentor)
MFC after: 3 days
MFC note: only for RELENG_8

13 years agoFor `make tinderbox` there is no need to print the extra commands.
Bjoern A. Zeeb [Sun, 23 Jan 2011 16:28:44 +0000 (16:28 +0000)]
For `make tinderbox` there is no need to print the extra commands.

MFC after: 5 days

13 years agoinit(8): Document that login(1) is now responsible for recording logouts.
Jilles Tjoelker [Sun, 23 Jan 2011 14:54:45 +0000 (14:54 +0000)]
init(8): Document that login(1) is now responsible for recording logouts.

init(8) only uses utmpx for recording reboots and shutdowns.

13 years agoEnable the 11n PHY by default whether or not 11n is configured.
Adrian Chadd [Sun, 23 Jan 2011 14:49:50 +0000 (14:49 +0000)]
Enable the 11n PHY by default whether or not 11n is configured.

The linux ath9k driver and (from what I've been told) the atheros reference
driver does this; it then leaves discarding 11n frames to the 802.11 layer.

Whilst I'm here, merge in a fix from ath9k which maintains a turbo register
setting when enabling the 11n register; and remove an un-needed (duplicate)
flag setting.

13 years agoUpdate the AR9280v2 inivals to match what is in Linux ath9k.
Adrian Chadd [Sun, 23 Jan 2011 14:30:35 +0000 (14:30 +0000)]
Update the AR9280v2 inivals to match what is in Linux ath9k.

This repairs the behaviour of my AR9280 - both radio chains now seem
to correctly be receiving.

13 years agoinit: Only run /etc/rc.shutdown if /etc/rc was run.
Jilles Tjoelker [Sun, 23 Jan 2011 14:22:26 +0000 (14:22 +0000)]
init: Only run /etc/rc.shutdown if /etc/rc was run.

It does not make sense to shut down daemons that were not started. In
particular, this fixes loss of mixer settings when shutting down using
shutdown(8), init(8) or ctrl+alt+del from single-user mode.

If /etc/rc reboots, /etc/rc.shutdown is not run.

Also fix segfaults and other erratic behaviour if init receives SIGHUP or
SIGTSTP while in single-user mode.

This commit does not attempt to fix any badness with signal handlers
(assumption that pointers can be read and written atomically, EINTR race
condition). I believe it does not make this badness any worse.

Silence on: -arch@

13 years agoUse string literal format strings to quiet clang warnings.
Ed Maste [Sun, 23 Jan 2011 14:08:59 +0000 (14:08 +0000)]
Use string literal format strings to quiet clang warnings.

13 years agoAn sbuf configured with SBUF_AUTOEXTEND will call malloc with M_WAITOK when a
Lawrence Stewart [Sun, 23 Jan 2011 13:00:25 +0000 (13:00 +0000)]
An sbuf configured with SBUF_AUTOEXTEND will call malloc with M_WAITOK when a
write to the buffer causes it to overflow. We therefore can't hold the CC list
rwlock over a call to sbuf_printf() for an sbuf configured with SBUF_AUTOEXTEND.

Switch to a fixed length sbuf which should be of sufficient size except in the
very unlikely event that the sysctl is being processed as one or more new
algorithms are loaded. If that happens, we accept the race and may fail the
sysctl gracefully if there is insufficient room to print the names of all the
algorithms.

This should address a WITNESS warning and the potential panic that would occur
if the sbuf call to malloc did sleep whilst holding the CC list rwlock.

Sponsored by: FreeBSD Foundation
Reported by: Nick Hibma
Reviewed by: bz
MFC after: 3 weeks
X-MFC with: r215166

13 years agoFix typo.
Konstantin Belousov [Sun, 23 Jan 2011 12:44:17 +0000 (12:44 +0000)]
Fix typo.

MFC after: 3 days

13 years agoTouch up the sample memory usage numbers a bit, to avoid wrapping
Giorgos Keramidas [Sun, 23 Jan 2011 11:08:39 +0000 (11:08 +0000)]
Touch up the sample memory usage numbers a bit, to avoid wrapping
on terminal boundary.  While here add definition for 'G' and fix
the indentation of 'K' units.

Submitted by: plunket
PR: docs/153614
MFC after: 3 days

13 years agolibkvm: fix process runtime calculation on crashdumps
Ulrich Spörlein [Sun, 23 Jan 2011 11:08:36 +0000 (11:08 +0000)]
libkvm: fix process runtime calculation on crashdumps

Fix a long standing bug, where the procs ticks where assumed to be in
us. Instead, read cpu_tick_frequency from the kernel and use the same
logic to convert runtime. This is still too optimistic in that it
assumes cpu_tick_frequency is available and fixed. Since this function
is only called on crashdumps, I think we can live with that. Testing has
shown the values to be correct for different kern.hz inside Virtualbox.

Bump WARNS. Alignment issues on some archs mean this is still at 3.

Reviewed by: bde

13 years agolibkvm code janitoring
Ulrich Spörlein [Sun, 23 Jan 2011 11:08:28 +0000 (11:08 +0000)]
libkvm code janitoring

- make WARNS=6 clean for archs w/o strict alignment requirments
- add const, ANSIfy, remove unused vars, cast types for comparison
- thanks to differing definitions of VM_MIN_ADDRESS across our archs, we
  need to trick the compiler to not complain about signedness. We could
  either fix VM_MIN_ADDRESS to always be a simple integer or make the
  check conditional on $ARCH.

Closes PRs: kern/42386, kern/83364
Reviewed by: bde

13 years agoStyle(9) fix.
Dmitry Chagin [Sun, 23 Jan 2011 09:50:39 +0000 (09:50 +0000)]
Style(9) fix.

Approved by: kib(mentor)
MFC after: 1 month

13 years agoRemove unnecessary checking of variable.
Michael Tuexen [Sun, 23 Jan 2011 07:27:35 +0000 (07:27 +0000)]
Remove unnecessary checking of variable.

MFC after: 3 months.

13 years agoAdd a new tool which takes a text hexdump of the current EEPROM contents.
Adrian Chadd [Sat, 22 Jan 2011 23:44:56 +0000 (23:44 +0000)]
Add a new tool which takes a text hexdump of the current EEPROM contents.

13 years agoPatch the athstats code/Makefile to cross-compile correctly.
Adrian Chadd [Sat, 22 Jan 2011 23:37:42 +0000 (23:37 +0000)]
Patch the athstats code/Makefile to cross-compile correctly.

13 years agoAdd missing logs.
Pawel Jakub Dawidek [Sat, 22 Jan 2011 23:30:01 +0000 (23:30 +0000)]
Add missing logs.

MFC after: 1 week

13 years agoMake `make tinderbox` work with MAKEOBJDIRPREFIX set (or in possibly other
Bjoern A. Zeeb [Sat, 22 Jan 2011 23:16:44 +0000 (23:16 +0000)]
Make `make tinderbox` work with MAKEOBJDIRPREFIX set (or in possibly other
combinations) by forcing FAILFILE into .CURDIR as we do for all other
universe output files. [1]  Similarly make FAILFILE start with "_." as well.

Reviewed by: silence-on-src [1]
MFC after: 6 days

13 years agoIn `make targets` print the make variable TARGETS as we expect it rather
Bjoern A. Zeeb [Sat, 22 Jan 2011 23:10:58 +0000 (23:10 +0000)]
In `make targets` print the make variable TARGETS as we expect it rather
than the grammatically better sounding variant without the 'S'.  This
allows copy and paste and is less confusing.

13 years agoProperly document what the top-level `make tinderbox` does.
Bjoern A. Zeeb [Sat, 22 Jan 2011 22:57:28 +0000 (22:57 +0000)]
Properly document what the top-level `make tinderbox` does.

Reviewed by: jmallett
MFC After: 3 days
X-MFC: build.7 only

13 years agoAdd nv_assert() which allows to assert that the given name exists.
Pawel Jakub Dawidek [Sat, 22 Jan 2011 22:38:18 +0000 (22:38 +0000)]
Add nv_assert() which allows to assert that the given name exists.

MFC after: 1 week

13 years agoUse more consistent function name with the others (pjdlogv_prefix_set()
Pawel Jakub Dawidek [Sat, 22 Jan 2011 22:35:08 +0000 (22:35 +0000)]
Use more consistent function name with the others (pjdlogv_prefix_set()
instead of pjdlog_prefix_setv()).

MFC after: 1 week

13 years agoUse int16 for error.
Pawel Jakub Dawidek [Sat, 22 Jan 2011 22:33:27 +0000 (22:33 +0000)]
Use int16 for error.

MFC after: 1 week

13 years ago- On primary worker reload, update hr_exec field.
Pawel Jakub Dawidek [Sat, 22 Jan 2011 22:31:55 +0000 (22:31 +0000)]
- On primary worker reload, update hr_exec field.
- Update comment.

MFC after: 1 week

13 years agoRevert the ndis part of r212122, windrv_stub.c already adds a MODULE_VERSION
Andrew Thompson [Sat, 22 Jan 2011 21:33:18 +0000 (21:33 +0000)]
Revert the ndis part of r212122, windrv_stub.c already adds a MODULE_VERSION
and this breaks loading miniport drivers from loader.conf

Reported by: Yuri <yuri^rawbw^com>
Submitted by: Paul B Mahol
MFC after: 3 days

13 years agos/utime/modtime/g -- utime shadows utime(3).
Marcel Moolenaar [Sat, 22 Jan 2011 21:27:17 +0000 (21:27 +0000)]
s/utime/modtime/g -- utime shadows utime(3).

Submitted by: Garrett Cooper

13 years agoOption USB_HOST_ALIGN declared twice.
Dmitry Chagin [Sat, 22 Jan 2011 20:53:27 +0000 (20:53 +0000)]
Option USB_HOST_ALIGN declared twice.

Approved by: kib(mentor)

13 years agoAdd my copyright.
Konstantin Belousov [Sat, 22 Jan 2011 19:25:49 +0000 (19:25 +0000)]
Add my copyright.

Discussed with: kan

13 years agoFix typos.
Jaakko Heinonen [Sat, 22 Jan 2011 15:19:25 +0000 (15:19 +0000)]
Fix typos.

13 years agoAllow USB_HOST_ALIGN to be configured at compile time. This patch is
Hans Petter Selasky [Sat, 22 Jan 2011 13:52:23 +0000 (13:52 +0000)]
Allow USB_HOST_ALIGN to be configured at compile time. This patch is
necessary for MIPS based RouterStation Pro board and maybe other MIPS
based boards as well.

Submitted by: Milan Obuch
Approved by: thompsa (mentor)

13 years agoFix '.Xr' ordering in SEE ALSO section.
Glen Barber [Sat, 22 Jan 2011 13:18:28 +0000 (13:18 +0000)]
Fix '.Xr' ordering in SEE ALSO section.

Approved by: keramida (mentor)
MFC after: 3 days

13 years agoWarn user when value entered is greated than the amount supported
Maxim Sobolev [Sat, 22 Jan 2011 05:21:20 +0000 (05:21 +0000)]
Warn user when value entered is greated than the amount supported
by the MBR for the given parameter and set that parameter to the
maximum value instead of just truncating the most significant part
silently.

Could happen for example if the capacity of the device is more
than 2TB, so that the number of sectors is greater than 2Mib.

MFC after: 1 month

13 years agoFix r217688. We need to call init_param1() before we use msgbufsize,
Marcel Moolenaar [Sat, 22 Jan 2011 01:31:59 +0000 (01:31 +0000)]
Fix r217688. We need to call init_param1() before we use msgbufsize,
now that the size of the message buffer is a tunable.

13 years agoFix backtraces by defining ksym_start & ksym_end if DDB is
Marcel Moolenaar [Sat, 22 Jan 2011 00:32:12 +0000 (00:32 +0000)]
Fix backtraces by defining ksym_start & ksym_end if DDB is
defined. The kernel linker doesn't deal with symbols of
type NOTYPE and typically gives the wrong symbol ($a) for
local symbols.

Obtained from:  Juniper Networks, Inc.

13 years agoDon't bother to run the flowcontrol code if there
Jack F Vogel [Sat, 22 Jan 2011 00:19:15 +0000 (00:19 +0000)]
Don't bother to run the flowcontrol code if there
is no change. Thanks to Andrew for the tweak.

13 years agoMissing case for 82598DA type adapter, thanks Andrew.
Jack F Vogel [Sat, 22 Jan 2011 00:08:06 +0000 (00:08 +0000)]
Missing case for 82598DA type adapter, thanks Andrew.

13 years agoLeftover bogus TX UNLOCK removed. Thanks to
Jack F Vogel [Fri, 21 Jan 2011 23:55:28 +0000 (23:55 +0000)]
Leftover bogus TX UNLOCK removed. Thanks to
Andrew Boyer.

13 years agogetgroups(2): Remove mention of <sys/param.h> and refer to sysconf(3).
Jilles Tjoelker [Fri, 21 Jan 2011 22:15:17 +0000 (22:15 +0000)]
getgroups(2): Remove mention of <sys/param.h> and refer to sysconf(3).

Because {NGROUPS_MAX} may become variable, its value should be obtained
using sysconf(3). If a #define is used anyway, it should be obtained by
including <limits.h> as that is in POSIX like getgroups(2) itself is.
<sys/param.h> is not in POSIX.

MFC after: 1 week

13 years ago- Move special inode constants to ext2_dinode.h and rename them to match
John Baldwin [Fri, 21 Jan 2011 22:00:40 +0000 (22:00 +0000)]
- Move special inode constants to ext2_dinode.h and rename them to match
  NetBSD.
- Add a constant for the HASJOURNAL compat flag.

PR: kern/153584
Submitted by: Pedro F. Giffuni  giffunip at yahoo

13 years agoRestore support for the 'async' and 'sync' mount options lost when
John Baldwin [Fri, 21 Jan 2011 21:33:46 +0000 (21:33 +0000)]
Restore support for the 'async' and 'sync' mount options lost when
switching to nmount(2).  While here, sort the options.

PR: kern/153584
Submitted by: Pedro F. Giffuni  giffunip at yahoo
MFC after: 1 week

13 years agoUpdate to upstrea version 2.5.6.
Tony Finch [Fri, 21 Jan 2011 18:10:11 +0000 (18:10 +0000)]
Update to upstrea version 2.5.6.

Detect IO errors properly.
Write #line directives to the correct output stream.

Obtained from: http://dotat.at/prog/unifdef

13 years agoAdd kern.msgbufsize default setting to /boot/defaults/loader.conf.
Sergey Kandaurov [Fri, 21 Jan 2011 12:15:21 +0000 (12:15 +0000)]
Add kern.msgbufsize default setting to /boot/defaults/loader.conf.

Suggested by: Alex Kozlov <spam rm-rf.kiev.ua> (via private mail)
Approved by: kib (mentor)

13 years agoMake MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.
Sergey Kandaurov [Fri, 21 Jan 2011 10:26:26 +0000 (10:26 +0000)]
Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.

Submitted by: perryh pluto.rain.com (previous version)
Reviewed by: jhb
Approved by: kib (mentor)
Tested by: universe

13 years agoFix some typos.
Adrian Chadd [Fri, 21 Jan 2011 07:28:48 +0000 (07:28 +0000)]
Fix some typos.

13 years agoAdd missing getCapability call for AR5416.
Adrian Chadd [Fri, 21 Jan 2011 07:26:53 +0000 (07:26 +0000)]
Add missing getCapability call for AR5416.

13 years agoModify the v14/v4k eeprom diag interface to return the whole eeprom.
Adrian Chadd [Fri, 21 Jan 2011 06:42:25 +0000 (06:42 +0000)]
Modify the v14/v4k eeprom diag interface to return the whole eeprom.

The v1 and v3 interfaces returned the whole EEPROM but the v14/v4k
interfaces just returned the base header. There's extra information
outside of that which would also be nice to get access to.

13 years agoANI changes #1 - split out the ANI polling from the RxMonitor hook.
Adrian Chadd [Fri, 21 Jan 2011 05:21:00 +0000 (05:21 +0000)]
ANI changes #1 - split out the ANI polling from the RxMonitor hook.

The rxmonitor hook is called on each received packet. This can get very,
very busy as the tx/rx/chanbusy registers are thus read each time a packet
is received.

Instead, shuffle out the true per-packet processing which is needed and move
the rest of the ANI processing into a periodic event which runs every 100ms
by default.

13 years agoSome correctness and robustness fixes related to CUBIC's mean RTT estimate:
Lawrence Stewart [Fri, 21 Jan 2011 05:19:47 +0000 (05:19 +0000)]
Some correctness and robustness fixes related to CUBIC's mean RTT estimate:

- The mean RTT is updated at the end of each congestion epoch, but if we switch
  to congestion avoidance within the first epoch (e.g. if ssthresh was primed
  from the hostcache), we'll trigger a divide by zero panic in
  cubic_ack_received(). Set the mean to the min in cubic_record_rtt() if the
  mean is less than the min to ensure we have a sane mean for use in this
  situation. This fixes the panic reported by Nick Hibma.

- Adjust conditions under which we update the mean RTT in cubic_post_recovery()
  to ensure a low latency path won't yield an RTT of less than 1. This avoids
  another potential divide by zero panic when running CUBIC in networks with
  sub-millisecond latencies.

- Remove the "safety" assignment of min into mean when we don't update the mean
  because of failed conditions. The above change to the conditions for updating
  the mean ensures the safety issue is addressed and I feel it is better to keep
  our previous mean estimate around if we can't update than to revert to the
  min.

- Initialise the mean RTT to 1 on connection startup to act as a safety belt if
  a situation we haven't considered and addressed with the above changes were to
  crop up in the wild.

Sponsored by: FreeBSD Foundation
Reported and tested by: Nick Hibma
Discussed with: David Hayes <dahayes at swin edu au>
MFC after: 5 weeks
X-MFC with: r216114

13 years agoAdd in a new tool which prints a formatted v14 eeprom from an eeprom
Adrian Chadd [Fri, 21 Jan 2011 03:14:08 +0000 (03:14 +0000)]
Add in a new tool which prints a formatted v14 eeprom from an eeprom
hexdump.

This is a part replacement of the old athprom code, which tries
to both fetch and print the contents of an eeprom dump.

A tool to generate hexdumps from a running system will follow shortly.

13 years agoRemove an un-needed trailing / after OBJDIR.
Adrian Chadd [Fri, 21 Jan 2011 02:56:59 +0000 (02:56 +0000)]
Remove an un-needed trailing / after OBJDIR.

Nitpicked by: juli

13 years agoMake the existing ath tools build again.
Adrian Chadd [Fri, 21 Jan 2011 02:53:32 +0000 (02:53 +0000)]
Make the existing ath tools build again.

* add missing includes to quieten warnings
* fix an inline function decl to have a return type
* since .h files are created during the build (opt_ah.h, ah_osdep.h)
  which modify the behaviour of the HAL include/source files,
  include OBJDIR in the path so the #include's work.

The tools should now build when the directory is added to LOCAL_DIRS
during a make buildworld.

13 years agoIf there is no WQE available for a packet that needs segmentation, drop it
Juli Mallett [Thu, 20 Jan 2011 23:51:03 +0000 (23:51 +0000)]
If there is no WQE available for a packet that needs segmentation, drop it
and return.

13 years agoRemove some compile-time options from the driver, particularly async IOBDMA
Juli Mallett [Thu, 20 Jan 2011 23:34:59 +0000 (23:34 +0000)]
Remove some compile-time options from the driver, particularly async IOBDMA
support which is unused on FreeBSD and which complicates working on the
code now, can easily be added back later by someone determined to use it.

13 years agoNo need to list an obsolete arm compiler here.
Warner Losh [Thu, 20 Jan 2011 22:58:10 +0000 (22:58 +0000)]
No need to list an obsolete arm compiler here.

13 years agoRemove unused variables. Spotted by a cppcheck
Andreas Tobler [Thu, 20 Jan 2011 20:23:03 +0000 (20:23 +0000)]
Remove unused variables. Spotted by a cppcheck
(devel/cppcheck, http://sourceforge.net/projects/cppcheck) run.

Approved by: nwhitehorn (mentor)

13 years agoCorrect parsing of the grackle and uninorthpci ranges property.
Andreas Tobler [Thu, 20 Jan 2011 20:22:19 +0000 (20:22 +0000)]
Correct parsing of the grackle and uninorthpci ranges property.

Approved by: nwhitehorn (mentor)

13 years agoDon't need __DYNAMIC here. it is commented out and a.out only -- these are all ELF.
Warner Losh [Thu, 20 Jan 2011 19:26:28 +0000 (19:26 +0000)]
Don't need __DYNAMIC here.  it is commented out and a.out only -- these are all ELF.

13 years agoIn fact, we don't need any of these __DYNAMIC. it is a.out leftover and commented...
Warner Losh [Thu, 20 Jan 2011 19:24:50 +0000 (19:24 +0000)]
In fact, we don't need any of these __DYNAMIC.  it is a.out leftover and commented out.

13 years agoRemove commented out _DYNAMIC sections.
Warner Losh [Thu, 20 Jan 2011 19:20:23 +0000 (19:20 +0000)]
Remove commented out _DYNAMIC sections.

13 years agoUse simplified ldscripts rather than specific ones
Warner Losh [Thu, 20 Jan 2011 19:17:05 +0000 (19:17 +0000)]
Use simplified ldscripts rather than specific ones

13 years agoWe don't need 2 versions here. One will do since binutils outputs the right stuff...
Warner Losh [Thu, 20 Jan 2011 19:16:29 +0000 (19:16 +0000)]
We don't need 2 versions here.  One will do since binutils outputs the right stuff now.

13 years agoCollapse all the octeon ldscripts down into one now that we don't need one each for...
Warner Losh [Thu, 20 Jan 2011 19:09:02 +0000 (19:09 +0000)]
Collapse all the octeon ldscripts down into one now that we don't need one each for all the wacky ABIs

13 years agoCorrect wrong definition of PM timer mask and adjust L1/PM timer
Pyun YongHyeon [Thu, 20 Jan 2011 18:26:33 +0000 (18:26 +0000)]
Correct wrong definition of PM timer mask and adjust L1/PM timer
value. While I'm here enable all clocks before initializing
controller. This change should fix lockup issue seen on AR8152
v1.1 PCIe Fast Ethernet controller.

PR: kern/154076
MFC after: 3 days

13 years agoAdd myself to the list of doc commiters.
Ryusuke SUZUKI [Thu, 20 Jan 2011 17:28:57 +0000 (17:28 +0000)]
Add myself to the list of doc commiters.

13 years agoFix a stack leak in r215345 when skipping over the ACPI menu item for
John Baldwin [Thu, 20 Jan 2011 16:03:28 +0000 (16:03 +0000)]
Fix a stack leak in r215345 when skipping over the ACPI menu item for
machines that do not support ACPI.

Submitted by: olli

13 years ago- Hide the internal scope address representation of the KAME IPv6
Hajimu UMEMOTO [Thu, 20 Jan 2011 15:22:01 +0000 (15:22 +0000)]
- Hide the internal scope address representation of the KAME IPv6
  stack from the output of `netstat -ani'.
- The node-local multicast address in the output of `netstat -rn'
  should be handled as well.

Spotted by: Bernd Walter <ticso__at__cicely7.cicely.de>

13 years agoar9280SetAntennaSwitch() was using the AR5416 chainmasks (3 chains)
Adrian Chadd [Thu, 20 Jan 2011 15:09:11 +0000 (15:09 +0000)]
ar9280SetAntennaSwitch() was using the AR5416 chainmasks (3 chains)
rather than the AR9280 chainmasks (2 chains)

13 years agoCorrect parsing of the cpcht ranges property.
Nathan Whitehorn [Thu, 20 Jan 2011 15:02:51 +0000 (15:02 +0000)]
Correct parsing of the cpcht ranges property.

Submitted by: andreast
MFC after: 2 weeks

13 years agoImprove comments.
Michael Tuexen [Thu, 20 Jan 2011 13:53:34 +0000 (13:53 +0000)]
Improve comments.

MFC after: 1 week.

13 years agoAdd another ID for the ZTE MF190 Surf Stick
Nick Hibma [Thu, 20 Jan 2011 13:02:54 +0000 (13:02 +0000)]
Add another ID for the ZTE MF190 Surf Stick

Submitted by: nagilum
MFC after: 1 day

13 years agoMove 'cpu CPU_RMI' to std.xlr, this is common for all XLR cpus.
Jayachandran C. [Thu, 20 Jan 2011 12:45:29 +0000 (12:45 +0000)]
Move 'cpu CPU_RMI' to std.xlr, this is common for all XLR cpus.

13 years agoFix it so we align with new socket API draft for
Randall Stewart [Thu, 20 Jan 2011 12:40:09 +0000 (12:40 +0000)]
Fix it so we align with new socket API draft for
state's in destination (i.e. ACTIVE/INACTIVE/UNCONFIRMED)

MFC after: 1 week

13 years agoOnly enable 11n modes if the chipset suports 11n.
Adrian Chadd [Thu, 20 Jan 2011 09:46:18 +0000 (09:46 +0000)]
Only enable 11n modes if the chipset suports 11n.

Since the AR2427 doesn't allow 802.11n, it shouldn't have them
configured.

13 years agoIn tmpfs_readdir(), normalize handling of the directory entries that
Konstantin Belousov [Thu, 20 Jan 2011 09:39:16 +0000 (09:39 +0000)]
In tmpfs_readdir(), normalize handling of the directory entries that
either overflow the supplied buffer, or cause uiomove fail.
Do not advance cached de when directory entry was not copied out.
Do not return EOF when no entries could be copied due to first entry
too large for supplied buffer, signal EINVAL instead.

Reported by: Beat G?tzi <beat chruetertee ch>
MFC after: 1 week

13 years agoInclude the device ids for the AR2427.
Adrian Chadd [Thu, 20 Jan 2011 09:37:53 +0000 (09:37 +0000)]
Include the device ids for the AR2427.

This is apparently an AR9285 with the 802.11n specific bits disabled.

This code is completely untested; I'm doing this in response to users
who wish to test the functionality out. It's likely as buggy as the
AR9285 support is in FreeBSD at the moment.

13 years agoPush the non-AR5416 related stuff into chipset specific directories.
Adrian Chadd [Thu, 20 Jan 2011 09:03:40 +0000 (09:03 +0000)]
Push the non-AR5416 related stuff into chipset specific directories.

sys/dev/ath/ath_hal/ar5416/ is getting very crowded and further
commits will make it even more crowded. Now is a good time to
shuffle these files out before any more extensive work is done
on them.

Create an ar9003 directory whilst I'm here; ar9003 specific
chipset code will eventually live there.