]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoCorrect arguments of stat64, fstat64 and lstat64 syscalls for Linuxulator.
Jung-uk Kim [Mon, 16 Apr 2012 22:58:28 +0000 (22:58 +0000)]
Correct arguments of stat64, fstat64 and lstat64 syscalls for Linuxulator.

12 years agoWork around an issue on 32-bit PowerPC, where clang executable can get
Dimitry Andric [Mon, 16 Apr 2012 21:36:55 +0000 (21:36 +0000)]
Work around an issue on 32-bit PowerPC, where clang executable can get
too big, causing 'relocation truncated to fit' errors at link time.

Reviewed by: nwhitehorn

12 years agoBump __FreeBSD_version due to the import of a new clang 3.1 prerelease
Dimitry Andric [Mon, 16 Apr 2012 21:28:04 +0000 (21:28 +0000)]
Bump __FreeBSD_version due to the import of a new clang 3.1 prerelease
snapshot.

12 years agoRegen for r234352.
Jung-uk Kim [Mon, 16 Apr 2012 21:24:23 +0000 (21:24 +0000)]
Regen for r234352.

12 years agoUpgrade our copy of llvm/clang to trunk r154661, in preparation of the
Dimitry Andric [Mon, 16 Apr 2012 21:23:25 +0000 (21:23 +0000)]
Upgrade our copy of llvm/clang to trunk r154661, in preparation of the
upcoming 3.1 release (expected in a few weeks).  Preliminary release
notes can be found at: <http://llvm.org/docs/ReleaseNotes.html>

MFC after: 2 weeks

12 years ago- Implement pipe2 syscall for Linuxulator. This syscall appeared in 2.6.27
Jung-uk Kim [Mon, 16 Apr 2012 21:22:02 +0000 (21:22 +0000)]
- Implement pipe2 syscall for Linuxulator.  This syscall appeared in 2.6.27
but GNU libc used it without checking its kernel version, e. g., Fedora 10.
- Move pipe(2) implementation for Linuxulator from MD files to MI file,
sys/compat/linux/linux_file.c.  There is no MD code for this syscall at all.
- Correct an argument type for pipe() from l_ulong * to l_int *.  Probably
this was the source of MI/MD confusion.

Reviewed by: emulation

12 years ago- Use _PATH_TMP instead of hardcoded /tmp
Baptiste Daroussin [Mon, 16 Apr 2012 20:41:25 +0000 (20:41 +0000)]
- Use _PATH_TMP instead of hardcoded /tmp
- more style(9) fixes
- some refactoring
- better error detection
- Add the DPADD to Makefile

Submitted by: Garrett Cooper <yanegomi@gmail.com>
Approved by: des (mentor)

12 years ago- When interrupt is not requested for VM86 call, make a fake exit point and
Jung-uk Kim [Mon, 16 Apr 2012 19:31:44 +0000 (19:31 +0000)]
- When interrupt is not requested for VM86 call, make a fake exit point and
push the address onto stack as we do for INTn emulation.  This avoids stack
underflow when we encounter RETF instruction in VM86 mode.  Lack of this
exit point actually caused page fault in VM86 mode with VESA module when we
resume from suspend state[1].
- Remove unnecessary CLI and STI instructions from BIOS interrupt emulation.
INTn and IRET must be able to emulate the flag correctly.

Reported by: gavin [1]
Tested by: gavin (early revision)
MFC after: 3 days

12 years agoSync with Bryan Venteicher's virtio git repo:
Peter Grehan [Mon, 16 Apr 2012 18:29:12 +0000 (18:29 +0000)]
Sync with Bryan Venteicher's virtio git repo:

d04e609bdd1973cc7d2e8b38b7dcfae057b0962d
virtio_blk: Use correct temporary variable in vtblk_poll_request

Obtained from: Bryan Venteicher  bryanv at daemoninthecloset dot org

12 years agoTurn on PREEMPTION by default. After fixing several bugs over time, the
Marius Strobl [Mon, 16 Apr 2012 18:29:07 +0000 (18:29 +0000)]
Turn on PREEMPTION by default. After fixing several bugs over time, the
last show-stopper keeping PREEMPTION from being usable on sparc64 should
have been dealt with in r230662.
At least on 2-way systems, PREEMPTION causes a little bit of a degradation
in worldstone performance. However, FreeBSD seems to have started building
up regressions in !PREEMPTION cases so sparc64 better should not be an
oddball in this regard.

MFC after: 1 week

12 years agoSync tmpfs_chflags() with the recent changes to UFS:
Jaakko Heinonen [Mon, 16 Apr 2012 18:10:34 +0000 (18:10 +0000)]
Sync tmpfs_chflags() with the recent changes to UFS:

- Add a check for unsupported file flags.
- Return EPERM when an user without PRIV_VFS_SYSFLAGS privilege attempts
  to toggle SF_SETTABLE flags.

12 years agotmpfs: Allow update mounts only for certain options.
Jaakko Heinonen [Mon, 16 Apr 2012 18:07:42 +0000 (18:07 +0000)]
tmpfs: Allow update mounts only for certain options.

Since r230208 update mounts were allowed if the list of mount options
contained the "export" option. This is not correct as tmpfs doesn't
really support updating all options.

Reviewed by: kevlo, trociny

12 years agoVMware environment is frequent nowadays. Add VMFS id.
Dmitry Morozovsky [Mon, 16 Apr 2012 17:30:19 +0000 (17:30 +0000)]
VMware environment is frequent nowadays.  Add VMFS id.

MFC after: 2 weeks

12 years agoAdd myself to committers-ports
Armin Pirkovitsch [Mon, 16 Apr 2012 15:08:01 +0000 (15:08 +0000)]
Add myself to committers-ports

Approved by:  beat (mentor)

12 years agoWhen we receive an ICMP unreach need fragmentation datagram, we take
Gleb Smirnoff [Mon, 16 Apr 2012 13:49:03 +0000 (13:49 +0000)]
When we receive an ICMP unreach need fragmentation datagram, we take
proposed MTU value from it and update the TCP host cache. Then
tcp_mss_update() is called on the corresponding tcpcb. It finds the
just allocated entry in the TCP host cache and updates MSS on the
tcpcb. And then we do a fast retransmit of what we have in the tcp
send buffer.

This sequence gets broken if the TCP host cache is exausted. In this
case allocation fails, and later called tcp_mss_update() finds nothing
in cache. The fast retransmit is done with not reduced MSS and is
immidiately replied by remote host with new ICMP datagrams and the
cycle repeats. This ping-pong can go up to wirespeed.

To fix this:
- tcp_mss_update() gets new parameter - mtuoffer, that is like
  offer, but needs to have min_protoh subtracted.
- tcp_mtudisc() as notification method renamed to tcp_mtudisc_notify().
- tcp_mtudisc() now accepts not a useless error argument, but proposed
  MTU value, that is passed to tcp_mss_update() as mtuoffer.

Reported by: az
Reported by: Andrey Zonov <andrey zonov.org>
Reviewed by: andre (previous version of patch)

12 years ago#include <net/vnet.h> is no longer needed here.
Marko Zec [Mon, 16 Apr 2012 13:41:46 +0000 (13:41 +0000)]
#include <net/vnet.h> is no longer needed here.

Spotted by: Ed Maste
MFC after: 3 days.

12 years agozfsboot: honor -q if it's present in boot.config
Andriy Gapon [Mon, 16 Apr 2012 10:43:06 +0000 (10:43 +0000)]
zfsboot: honor -q if it's present in boot.config

Before r228267 the option was honored but the original content of
boot.config was not preserved.  I tried to fix that but missed the idea.
Now the proper way of doing things is taken from i386/boo2.
Also, a comment is added to explain this a little bit unobvious
behavior.

Inspired by: jhb
MFC after: 5 days

12 years agointpm: add ATI IXP400 pci id
Andriy Gapon [Mon, 16 Apr 2012 10:33:46 +0000 (10:33 +0000)]
intpm: add ATI IXP400 pci id

PR: kern/136762
Submitted by: Aurelien Mere <freebsd@amc-os.com>
Tested by: Jens Link <jens.link@gmx.de>
MFC after: 5 days

12 years agoReplace the C implementation of __aeabi_read_tp with an assembly version.
Andrew Turner [Mon, 16 Apr 2012 09:38:20 +0000 (09:38 +0000)]
Replace the C implementation of __aeabi_read_tp with an assembly version.
This ensures we follow the ABI by preserving registers r1-r3.

Reviewed by: jmallett, imp

12 years agoFix typo miror -> mirror
Martin Matuska [Mon, 16 Apr 2012 08:19:43 +0000 (08:19 +0000)]
Fix typo miror -> mirror

Reported by: Glen Barber <gjb@FreeBSD.org>
MFC after: 3 days

12 years agoWhen searching for uninitialized memory usage add ensure that the entire
Eitan Adler [Sun, 15 Apr 2012 23:56:03 +0000 (23:56 +0000)]
When searching for uninitialized memory usage add ensure that the entire
struct is set to zero.

PR: bin/166483
Submitted by: Roy Marples <roy@marples.name>
Reviewed by: delphij
Approved by: cperciva
MFC after: 3 days

12 years agoAdd in the AP96 phy configuration from openwrt.
Adrian Chadd [Sun, 15 Apr 2012 22:59:56 +0000 (22:59 +0000)]
Add in the AP96 phy configuration from openwrt.

* arge0 doesn't (yet) work via the switch PHY ports; I'm not sure why.
* arge1 maps to the WAN port. That works.

TODO:

* The PLL register needs a different (non-default) value for Gigabit
  Ethernet.  The board setup code needs to be extended a bit to allow
  for non-default pll_1000 values - right now, those values come out
  of hard-coded values in the per-chip set_pll_ge() routines.

Obtained from: Linux / OpenWRT

12 years agoThe AR913x MII speed configuration matches the AR71xx MII configuration.
Adrian Chadd [Sun, 15 Apr 2012 22:34:22 +0000 (22:34 +0000)]
The AR913x MII speed configuration matches the AR71xx MII configuration.
So share the code.

Don't do it for the AR724x - that has a completely different set of PLL
and MII configuration parameters.

12 years agoProvide better description for vfs.tmpfs.memory_reserved sysctl.
Gleb Kurtsou [Sun, 15 Apr 2012 21:59:28 +0000 (21:59 +0000)]
Provide better description for vfs.tmpfs.memory_reserved sysctl.

Suggested by: Anton Yuzhaninov <citrin@citrin.ru>

12 years agoMigrate the net80211 TX aggregation state to be from per-AC to per-TID.
Adrian Chadd [Sun, 15 Apr 2012 20:29:39 +0000 (20:29 +0000)]
Migrate the net80211 TX aggregation state to be from per-AC to per-TID.

TODO:

* Test mwl(4) more thoroughly!

Reviewed by: bschmidt (for iwn)

12 years agoDrop this down from 512 to 128 for now.
Adrian Chadd [Sun, 15 Apr 2012 19:54:22 +0000 (19:54 +0000)]
Drop this down from 512 to 128 for now.

This may result in a bit of a throughput drop.  However, any throughput
drop at this point should be investigated and root caused, as it's likely
because TX scheduling (all the way down to how preemption, scheduler work,
etc) is happening in a sub-optimal fashion.

This also makes it much more likely to be reloadable on a live machine.
Allocating 5120 TX ath_buf entries via contigmalloc is very unlikely
after a few hours of using X/Chromium.

12 years ago- Fix style(9) bugs + inconsistencies
Baptiste Daroussin [Sun, 15 Apr 2012 18:32:14 +0000 (18:32 +0000)]
- Fix style(9) bugs + inconsistencies

Submitted by: marius
Approved by: des (mentor)

12 years agoUse the M_AMPDU_MPDU flag to determine when to manually set the seqno and
Bernhard Schmidt [Sun, 15 Apr 2012 18:25:17 +0000 (18:25 +0000)]
Use the M_AMPDU_MPDU flag to determine when to manually set the seqno and
use a BA queue.

12 years agoAdd myself to the calendar
Guido Falsi [Sun, 15 Apr 2012 17:28:47 +0000 (17:28 +0000)]
Add myself to the calendar

Approved by: creees (mentor)

12 years agoDo not do double initialisation
Baptiste Daroussin [Sun, 15 Apr 2012 16:00:32 +0000 (16:00 +0000)]
Do not do double initialisation
style(9) says for (;;) not while (1)

Reported by: culot
Approved by: des

12 years agoStyle.
Edward Tomasz Napierala [Sun, 15 Apr 2012 15:15:16 +0000 (15:15 +0000)]
Style.

12 years agoadd usr.sbin/pkg which is a bootstrap tool for pkgng.
Baptiste Daroussin [Sun, 15 Apr 2012 15:13:36 +0000 (15:13 +0000)]
add usr.sbin/pkg which is a bootstrap tool for pkgng.
it respects PACKAGESITE, PACKAGEROOT, and a new environment variable ABI (if a user want to use a different API from the base one for its packages)
it has no man page on purpose to avoid hidding the pkg(8) man page from the pkgng package.
for now uses pkgbeta.FreeBSD.org as default mirror to find its package
it respects MK_PKGTOOLS

Approved by: des (mentor)

12 years agoRemove FSIRAND and FSMAXSWAP ifdefs, removing code unconditionally.
Edward Tomasz Napierala [Sun, 15 Apr 2012 15:13:29 +0000 (15:13 +0000)]
Remove FSIRAND and FSMAXSWAP ifdefs, removing code unconditionally.

Reviewed by: kib, mckusick
Sponsored by: The FreeBSD Foundation

12 years agoCorrect my name in the copyright statement.
Dag-Erling Smørgrav [Sun, 15 Apr 2012 13:39:39 +0000 (13:39 +0000)]
Correct my name in the copyright statement.

12 years agoImprove m4 compatibility with GNU m4 extension ** (exponent)
Baptiste Daroussin [Sun, 15 Apr 2012 13:25:51 +0000 (13:25 +0000)]
Improve m4 compatibility with GNU m4 extension ** (exponent)

Submitted by: Marc Espie (espie@OpenBSD.org)
Approved by: des@ (mentor)

12 years agoFix the mask logic when reading PCI configuration space registers.
Adrian Chadd [Sun, 15 Apr 2012 02:38:01 +0000 (02:38 +0000)]
Fix the mask logic when reading PCI configuration space registers.

12 years agoOverride some default values to work around various issues in the deep,
Adrian Chadd [Sun, 15 Apr 2012 00:04:23 +0000 (00:04 +0000)]
Override some default values to work around various issues in the deep,
dirty and murky past.

* Override the default cache line size to be something reasonable if
  it's set to 0.  Some NICs initialise with '0' (eg embedded ones)
  and there are comments in the driver stating that various OSes (eg
  older Linux ones) would incorrectly program things and 0 out this
  register.

* Just default to overriding the latency timer.  Every other driver
  does this.

* Use a default cache line size of 32 bytes.  It should be "reasonable
  enough".

Obtained from: Linux ath9k, Atheros

12 years agoFix a typo.
Davide Italiano [Sat, 14 Apr 2012 23:59:58 +0000 (23:59 +0000)]
Fix a typo.

Approved by: gnn (mentor)
MFC after: 2 days

12 years agoFix some style bugs introduced in a previous commit (r233045)
Davide Italiano [Sat, 14 Apr 2012 23:53:31 +0000 (23:53 +0000)]
Fix some style bugs introduced in a previous commit (r233045)

Reported by: glebius, jmallet
Reviewed by: jmallet
Approved by: gnn (mentor)
MFC after: 2 days

12 years agoSend always HBs when in PF state.
Michael Tuexen [Sat, 14 Apr 2012 21:01:44 +0000 (21:01 +0000)]
Send always HBs when in PF state.

MFC after: 1 week
X-MFC with: r234296

12 years agoBugfix: Don't send HBs on path which are not idle.
Michael Tuexen [Sat, 14 Apr 2012 20:22:01 +0000 (20:22 +0000)]
Bugfix: Don't send HBs on path which are not idle.

MFC after: 1 week

12 years agoGenerate an obviously missing STOP when having finished transmitting data.
Marius Strobl [Sat, 14 Apr 2012 17:27:34 +0000 (17:27 +0000)]
Generate an obviously missing STOP when having finished transmitting data.
This fixes communication with PCF8563.

12 years agoAdd support for the Atmel SAM9XE familiy of microcontrollers, which
Marius Strobl [Sat, 14 Apr 2012 17:17:55 +0000 (17:17 +0000)]
Add support for the Atmel SAM9XE familiy of microcontrollers, which
consist of a ARM926EJ-S processor core with up to 512 Kbytes of on-chip
flash. Tested with SAM9XE512.

This file was missed in r234291.

12 years agoAdd support for the Atmel SAM9XE familiy of microcontrollers, which
Marius Strobl [Sat, 14 Apr 2012 17:09:38 +0000 (17:09 +0000)]
Add support for the Atmel SAM9XE familiy of microcontrollers, which
consist of a ARM926EJ-S processor core with up to 512 Kbytes of on-chip
flash. Tested with SAM9XE512.

12 years agoi prefer this fix for the -Wformat warning (just one cast,
Luigi Rizzo [Sat, 14 Apr 2012 16:44:18 +0000 (16:44 +0000)]
i prefer this fix for the -Wformat warning (just one cast,
all the other variables are already correct for %x).
My previous attempt put the cast in the wrong place.

12 years agoAdd files and directories to be cleaned up if WITHOUT_GCC is in effect
Dimitry Andric [Sat, 14 Apr 2012 16:42:17 +0000 (16:42 +0000)]
Add files and directories to be cleaned up if WITHOUT_GCC is in effect
to OptionalObsoleteFiles.inc.

MFC after: 1 week

12 years agoVendor import of clang trunk r154661:
Dimitry Andric [Sat, 14 Apr 2012 14:01:31 +0000 (14:01 +0000)]
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661

12 years agoVendor import of llvm trunk r154661:
Dimitry Andric [Sat, 14 Apr 2012 13:54:10 +0000 (13:54 +0000)]
Vendor import of llvm trunk r154661:
http://llvm.org/svn/llvm-project/llvm/trunk@r154661

12 years agoFix LINT builds after r234233; not sure why modules need DEBUG by default.
Bjoern A. Zeeb [Sat, 14 Apr 2012 13:40:39 +0000 (13:40 +0000)]
Fix LINT builds after r234233; not sure why modules need DEBUG by default.

12 years agoMake compile on 64bit somehow for now after a first try at r234242 on
Bjoern A. Zeeb [Sat, 14 Apr 2012 13:39:39 +0000 (13:39 +0000)]
Make compile on 64bit somehow for now after a first try at r234242 on
maybe 32bit?

12 years ago- Try to bring these files closer to style(9).
Marius Strobl [Sat, 14 Apr 2012 11:29:32 +0000 (11:29 +0000)]
- Try to bring these files closer to style(9).
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

12 years agoFix !DDB build after r234190.
Marius Strobl [Sat, 14 Apr 2012 11:21:24 +0000 (11:21 +0000)]
Fix !DDB build after r234190.

12 years agoCatch up with Bryan Venteicher's virtio git repo:
Peter Grehan [Sat, 14 Apr 2012 05:48:04 +0000 (05:48 +0000)]
Catch up with Bryan Venteicher's virtio git repo:

a8af6270bd96be6ccd86f70b60fa6512b710e4f0
      virtio_blk: Include function name in panic string

cbdb03a694b76c5253d7ae3a59b9995b9afbb67a
      virtio_balloon: Do the notify outside of the lock

      By the time we return from virtqueue_notify(), the descriptor
      will be in the used ring so we shouldn't have to sleep.

10ba392e60692529a5cbc1e9987e4064e0128447
      virtio: Use DEVMETHOD_END

80cbcc4d6552cac758be67f0c99c36f23ce62110
      virtqueue: Add support for VIRTIO_F_RING_EVENT_IDX

      This can be used to reduce the number of guest/host and
      host/guest interrupts by delaying the interrupt until a
      certain index value is reached.

      Actual use by the network driver will come along later.

8fc465969acc0c58477153e4c3530390db436c02
      virtqueue: Simplify virtqueue_nused()

      Since the values just wrap naturally at UINT16_MAX, we
      can just subtract the two values directly, rather than
      doing 2's complement math.

a8aa22f25959e2767d006cd621b69050e7ffb0ae
      virtio_blk: Remove debugging crud from 75dd732a

      There seems to be an issue with Qemu (or FreeBSD VirtIO) that sets
      the PCI register space for the device config to bogus values. This
      only seems to happen after unloading and reloading the module.

d404800661cb2a9769c033f8a50b2133934501aa
      virtio_blk: Use better variable name

75dd732a97743d96e7c63f7ced3c2169696dadd3
      virtio_blk: Partially revert 92ba40e65

      Just use the virtqueue to determine if any requests are
      still inflight.

06661ed66b7a9efaea240f99f414c368f1bbcdc7
      virtio_blk: error if allowed too few segments

      Should never happen unless the host provides use with a
      bogus seg_max value.

4b33e5085bc87a818433d7e664a0a2c8f56a1a89
      virtio_blk: Sort function declarations

426b9f5cac892c9c64cc7631966461514f7e08c6
      virtio_blk: Cleanup whitespace

617c23e12c61e3c2233d942db713c6b8ff0bd112
      virtio_blk: Call disk_err() on error'd completed requests

081a5712d4b2e0abf273be4d26affcf3870263a9
      virtio_blk: ASSERT the ready and inflight request queues are empty

a9be2631a4f770a84145c18ee03a3f103bed4ca8
      virtio_blk: Simplify check for too many segments

      At the cost of a small style violation.

e00ec09da014f2e60cc75542d0ab78898672d521
      virtio_blk: Add beginnings of suspend/resume

      Still not sure if we need to virtio_stop()/virtio_reinit()
      the device before/after a suspend.

      Don't start additional IO when marked as suspending.

47c71dc6ce8c238aa59ce8afd4bda5aa294bc884
      virtio_blk: Panic when dealt an unhandled BIO cmd

1055544f90fb8c0cc6a2395f5b6104039606aafe
      virtio_blk: Add VQ enqueue/dequeue wrappers

      Wrapper functions managed the added/removing to the in-flight
      list of requests.

      Normally biodone() any completed IO when draining the virtqueue.

92ba40e65b3bb5e4acb9300ece711f1ea8f3f7f4
      virtio_blk: Add in-flight list of requests

74f6d260e075443544522c0833dc2712dd93f49b
      virtio_blk: Rename VTBLK_FLAG_DETACHING to VTBLK_FLAG_DETACH

7aa549050f6fc6551c09c6362ed6b2a0728956ef
      virtio_blk: Finish all BIOs through vtblk_finish_bio()

      Also properly set bio_resid in the case of errors. Most geom_disk
      providers seem to do the same.

9eef6d0e6f7e5dd362f71ba097f2e2e4c3744882
      Added function to translate VirtIO status to error code

ef06adc337f31e1129d6d5f26de6d8d1be27bcd2
      Reset dumping flag when given unexpected parameters

393b3e390c644193a2e392220dcc6a6c50b212d9
      Added missing VTBLK_LOCK() in dump handler

Obtained from: Bryan Venteicher  bryanv at daemoninthecloset dot org

12 years agoBoth linux ath9k and the reference driver initialises the PLL here
Adrian Chadd [Sat, 14 Apr 2012 04:40:11 +0000 (04:40 +0000)]
Both linux ath9k and the reference driver initialises the PLL here
during chip wakeup.

Obtained from: Linux ath9k, Atheros

12 years agoAdd a driver for the NXP (Philips) PCF8563 RTC.
Marius Strobl [Fri, 13 Apr 2012 23:07:32 +0000 (23:07 +0000)]
Add a driver for the NXP (Philips) PCF8563 RTC.

Obtained from: NetBSD (pcf8563reg.h)

12 years agoMerge from x86:
Marius Strobl [Fri, 13 Apr 2012 22:58:23 +0000 (22:58 +0000)]
Merge from x86:

r233961:

Fix interrupt load balancing regression, introduced in revision
222813, that left all un-pinned interrupts assigned to CPU 0.
In intr_shuffle_irqs(), remove CPU_SETOF() call that initialized
the "intr_cpus" cpuset to only contain CPU0.

This initialization is too late and nullifies the results of calls
to the intr_add_cpu() that occur much earlier in the boot process.

r234074 (partial):

The BSP is not added to the mask of valid target CPUs for interrupts.
Fix this by adding the BSP as an interrupt target directly in

r234105:

Fix !SMP build after r234074.

MFC after: 3 days

12 years agoEliminate an unused parameter of static method igmp_stats_live_old().
Xin LI [Fri, 13 Apr 2012 22:35:53 +0000 (22:35 +0000)]
Eliminate an unused parameter of static method igmp_stats_live_old().

MFC after: 1 month

12 years agoThe scandir(3) function expects fourth parameter, compar, be in type of:
Xin LI [Fri, 13 Apr 2012 22:34:01 +0000 (22:34 +0000)]
The scandir(3) function expects fourth parameter, compar, be in type of:

int (*compar)(const struct dirent **, const struct dirent **)

The current code defines sortq() to accept two void *, then cast them
to const struct dirent **.  Because the code does not really need this
cast, we can eliminate the casts by changing the function prototype
to match scandir(3) expectation.

MFC after: 1 month

12 years agofix build with -Wformat -Wmissing-prototypes
Luigi Rizzo [Fri, 13 Apr 2012 22:24:57 +0000 (22:24 +0000)]
fix build with -Wformat -Wmissing-prototypes

12 years agoAdded myself to committers-src.dot.
Jason Evans [Fri, 13 Apr 2012 20:58:01 +0000 (20:58 +0000)]
Added myself to committers-src.dot.

12 years agoFlesh out the rest of the AP96 board/config.
Adrian Chadd [Fri, 13 Apr 2012 20:23:32 +0000 (20:23 +0000)]
Flesh out the rest of the AP96 board/config.

12 years agoChange SIGUSR1 to SIGTHR to properly wake up a process that is being
George V. Neville-Neil [Fri, 13 Apr 2012 20:22:08 +0000 (20:22 +0000)]
Change SIGUSR1 to SIGTHR to properly wake up a process that is being
traced.  The use of SIGUSR1 caused traced processes (those attached to
with dtrace -p) to exit when dtrace exited.

MFC in: 1 week

12 years agoUpdate to version 2.3.1.0
Josh Paetzel [Fri, 13 Apr 2012 18:21:56 +0000 (18:21 +0000)]
Update to version 2.3.1.0

Obtained from: Daniel Braniss <danny@cs.huji.ac.il>

12 years ago* Enable ATH_EEPROM_FIRMWARE, now that it's a compile time option
Adrian Chadd [Fri, 13 Apr 2012 18:01:53 +0000 (18:01 +0000)]
* Enable ATH_EEPROM_FIRMWARE, now that it's a compile time option
* Tidy up things a bit.

12 years agoUpgrade ATH_EEPROM_FIRMWARE to a configuration option.
Adrian Chadd [Fri, 13 Apr 2012 18:00:48 +0000 (18:00 +0000)]
Upgrade ATH_EEPROM_FIRMWARE to a configuration option.

12 years agoAdd myself as a new committer and add adrian as my mentor.
Monthadar Al Jaberi [Fri, 13 Apr 2012 16:53:00 +0000 (16:53 +0000)]
Add myself as a new committer and add adrian as my mentor.

Approved by: adrian (mentor)

12 years agoProperly disable crc stripping when operating in netmap mode.
Luigi Rizzo [Fri, 13 Apr 2012 16:42:54 +0000 (16:42 +0000)]
Properly disable crc stripping when operating in netmap mode.

Contrarily to what i wrote in my previous commit, the 82599
does include the CRC in the length. The operating mode is
reset in ixgbe_init_locked() and so we need to hook into
the places where the two registers (HLREG0 and RDRXCTL) are
modified.

12 years agoadd the new memory allocator for netmap, which allocates memory
Luigi Rizzo [Fri, 13 Apr 2012 16:32:33 +0000 (16:32 +0000)]
add the new memory allocator for netmap, which allocates memory
in small clusters instead of one big contiguous chunk.
This was already enabled in the previous commit.

12 years agoA bit of cleanup in the names of fields of netmap-related structures.
Luigi Rizzo [Fri, 13 Apr 2012 16:03:07 +0000 (16:03 +0000)]
A bit of cleanup in the names of fields of netmap-related structures.
Use the name 'ring' instead of 'queue' in all fields.
Bump NETMAP_API.

12 years agodo not use a deprecated field in a structure.
Luigi Rizzo [Fri, 13 Apr 2012 15:33:12 +0000 (15:33 +0000)]
do not use a deprecated field in a structure.

12 years agoBelatedly add my entry to the calendar file, now that 30 is here and gone.
Glen Barber [Fri, 13 Apr 2012 09:54:36 +0000 (09:54 +0000)]
Belatedly add my entry to the calendar file, now that 30 is here and gone.

12 years agoThese are uboot, so mark them as such or booting from flash will not work.
Adrian Chadd [Fri, 13 Apr 2012 08:56:23 +0000 (08:56 +0000)]
These are uboot, so mark them as such or booting from flash will not work.

12 years agoIntroduce configuration files for AP94 and AP96.
Adrian Chadd [Fri, 13 Apr 2012 08:52:25 +0000 (08:52 +0000)]
Introduce configuration files for AP94 and AP96.

This uses the new firmware(9) method for squirreling away the EEPROM
contents from SPI flash so ath(4) can get to them later.

It won't work out of the box just yet - you have to add this to
if_ath_pci.c:

#define ATH_EEPROM_FIRMWARE

.. until I've added it as a configuration option and updated things.

12 years agoIntroduce the ability to grab local EEPROM data from the firmware(9)
Adrian Chadd [Fri, 13 Apr 2012 08:48:38 +0000 (08:48 +0000)]
Introduce the ability to grab local EEPROM data from the firmware(9)
interface.

* Introduce a device hint, 'eeprom_firmware', which is the name of firmware
  to lookup.
* If the lookup succeeds, take a copy of it and use it as the eeprom data.

This isn't enabled by default - you have to define ATH_EEPROM_FIRMWARE.
I'll add it to the configuration variables in a later commit.

TODO:

* just keep a firmware reference in ath_softc, and remove the need to
  waste the extra memory in having sc_eepromdata be a malloc()ed block.

12 years ago(ab)Use the firmware API to store away EEPROM calibration data for
Adrian Chadd [Fri, 13 Apr 2012 08:45:50 +0000 (08:45 +0000)]
(ab)Use the firmware API to store away EEPROM calibration data for
future use by the ath(4) driver.

These embedded devices put the calibration/PCI bootstrap data on the
on board SPI flash rather than on an EEPROM connected to the NIC.
For some boards, there's two NICs and two sets of EEPROM data in the
main SPI flash.

The particulars:

* Introduce ath_fixup_size, which is the size of the EEPROM area in
  bytes.
* Create a firmware image with a name based on the PCI device identifier
  (bus/slot/device/function).
* Hide some verbose debugging behind 'bootverbose'.

ath(4) can then use this to load in the EEPROM data.

This requires AR71XX_ATH_EEPROM to be defined.

12 years agoadd actual interrupt counters to back ipi_invlcache_counts
Andriy Gapon [Fri, 13 Apr 2012 07:18:19 +0000 (07:18 +0000)]
add actual interrupt counters to back ipi_invlcache_counts

Otherwise one could run into a panic with COUNT_IPIS when cache
invalidation actually happened.

Reviewed by: jhb
MFC after: 1 week

12 years agobump INTRCNT_COUNT values to reflect actual numbers of IPI counters
Andriy Gapon [Fri, 13 Apr 2012 07:15:40 +0000 (07:15 +0000)]
bump INTRCNT_COUNT values to reflect actual numbers of IPI counters

Maybe the numbers should be conditionalized on COUNT_IPIS

Reviewed by: jhb
MFC after: 1 week

12 years agoPartially implement zipinfo (-Z) support.
Kevin Lo [Fri, 13 Apr 2012 06:15:51 +0000 (06:15 +0000)]
Partially implement zipinfo (-Z) support.
This fixes some test failures seen with perl 5.12 and 5.14.

PR: bin/166895
Submitted by: swills
MFC after: 3 days

12 years agoRemove an unused variable. Grr.
Adrian Chadd [Fri, 13 Apr 2012 06:13:37 +0000 (06:13 +0000)]
Remove an unused variable. Grr.

12 years agoSync this code against what's in OpenWRT trunk.
Adrian Chadd [Fri, 13 Apr 2012 06:11:24 +0000 (06:11 +0000)]
Sync this code against what's in OpenWRT trunk.

* the openwrt code doesn't treat 0/0/0 any differently
  from other bus/slot/func combinations.
* A "local write" function writes to the LCONF area, and
  so I've added it.
* The PCI workaround at attach time uses this LCONF code,
  which it already did ..
* .. but it is a 4 byte write, not a 2 byte write.
  Even though it's PCIR_COMMAND which is a two byte PCI register.

Tested on: AR7161
TODO: The other two AR71xx derivatives
TODO: More thoroughly stare at the datasheets I do have
and if it indeed is incorrect, push fixes to both
FreeBSD and Linux/OpenWRT.

Obtained from: Linux OpenWRT

12 years agoApply changes from r234103 to ext2fs:
Jaakko Heinonen [Fri, 13 Apr 2012 05:48:31 +0000 (05:48 +0000)]
Apply changes from r234103 to ext2fs:

Return EPERM from ext2_setattr() when an user without PRIV_VFS_SYSFLAGS
privilege attempts to toggle SF_SETTABLE flags.

Flags are now stored to ip->i_flags in one place after all checks.

Also, remove SF_NOUNLINK from the checks because ext2fs doesn't support
that flag.

Reviewed by: bde

12 years agoAdditional manual page updates for r234103.
Jaakko Heinonen [Fri, 13 Apr 2012 05:40:26 +0000 (05:40 +0000)]
Additional manual page updates for r234103.

Submitted by: bde

12 years agoUse strdup() on the name (and free it when it's done) so non-static names
Adrian Chadd [Fri, 13 Apr 2012 04:22:42 +0000 (04:22 +0000)]
Use strdup() on the name (and free it when it's done) so non-static names
can be used in firmware_register().

12 years agoUpdate the ddb and gdb backends for the new 'trace_thread' hook.
John Baldwin [Thu, 12 Apr 2012 21:34:58 +0000 (21:34 +0000)]
Update the ddb and gdb backends for the new 'trace_thread' hook.
It is implemented via db_trace_thread() for DDB and not implemented
for GDB.  This should have been part of r234190.

Pointy hat to: jhb
Reported by: jkim
MFC after: 1 week

12 years agoAdd myself and my relation to my mentors.
Guido Falsi [Thu, 12 Apr 2012 20:22:17 +0000 (20:22 +0000)]
Add myself and my relation to my mentors.

Approved by: crees

12 years agoComplete polled-mode operation by using a callout if the device will be
Peter Grehan [Thu, 12 Apr 2012 18:46:48 +0000 (18:46 +0000)]
Complete polled-mode operation by using a callout if the device will be
used in polled-mode. The callout invokes uart_intr, which rearms the timeout.
Implemented for bhyve, but generically useful for e.g. embedded bringup
when the interrupt controller hasn't been setup, or if it's not deemed
worthy to wire an interrupt line from a serial port.

Submitted by: neel
Reviewed by: marcel
Obtained from: NetApp
MFC after: 3 weeks

12 years agoAdd missing LibUSB 1.0 API function.
Hans Petter Selasky [Thu, 12 Apr 2012 18:06:30 +0000 (18:06 +0000)]
Add missing LibUSB 1.0 API function.

Reported by: lme @
MFC after: 1 week

12 years ago- Extend the KDB interface to add a per-debugger callback to print a
John Baldwin [Thu, 12 Apr 2012 17:43:59 +0000 (17:43 +0000)]
- Extend the KDB interface to add a per-debugger callback to print a
  backtrace for an arbitrary thread (rather than the calling thread).
  A kdb_backtrace_thread() wrapper function uses the configured debugger
  if possible, otherwise it falls back to using stack(9) if that is
  available.
- Replace a direct call to db_trace_thread() in propagate_priority()
  with a call to kdb_backtrace_thread() instead.

MFC after: 1 week

12 years agoStyle.
Edward Tomasz Napierala [Thu, 12 Apr 2012 16:55:48 +0000 (16:55 +0000)]
Style.

12 years agoUpdate the swi_add prototype after struct ithd was split up into
Sergey Kandaurov [Thu, 12 Apr 2012 16:02:45 +0000 (16:02 +0000)]
Update the swi_add prototype after struct ithd was split up into
struct intr_event and struct intr_thread.

PR: docs/166864
Reviewed by: jhb (older version)
MFC after: 1 week

12 years agoIf a linker file contains at least one module, but all of the modules
John Baldwin [Thu, 12 Apr 2012 14:49:25 +0000 (14:49 +0000)]
If a linker file contains at least one module, but all of the modules
fail to load (the MOD_LOAD event fails) during a kldload(2), unload the
linker file and fail the kldload(2) with ENOEXEC.

Reported by: gcooper
MFC after: 1 week

12 years agoApparently the length field in advanced descriptors
Luigi Rizzo [Thu, 12 Apr 2012 14:06:05 +0000 (14:06 +0000)]
Apparently the length field in advanced descriptors
does not include the CRC irrespective of the setting
of CRCSTRIP. The 82599 data sheets (sec. 7.1.6) say differently.
Very strange. Need to check what happens on legacy descriptors,
but for the time being this restores functionality.

12 years agoFix error messages containing the executed command name
Jean-Sébastien Pédron [Thu, 12 Apr 2012 14:02:59 +0000 (14:02 +0000)]
Fix error messages containing the executed command name

Before, we took the first argument to pam_exec(8). With the addition of
options in front of the command, this could be wrong.

Now, options are parsed before calling _pam_exec() and messages contain
the proper command name.

While here, fix a warning.

Sponsored by: Yakaz (http://www.yakaz.com)

12 years agoAdd OFED and the associated options and drivers to x86 LINT builds:
John Baldwin [Thu, 12 Apr 2012 14:01:06 +0000 (14:01 +0000)]
Add OFED and the associated options and drivers to x86 LINT builds:
- Mark 'sdp' as requiring 'inet'.
- Always include "opt_inet.h" and "opt_inet6.h" and modify the IB
  driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options
  to determine what should be enabled during a module build.
- Fix the mlxen(4) driver and the core IB code to compile without
  if INET is disabled (including when both INET and INET6 are disabled).

Reviewed by: bz
MFC after: 2 weeks

12 years agoDon't update if_obytes when transmitting packets. That is already done
John Baldwin [Thu, 12 Apr 2012 13:53:49 +0000 (13:53 +0000)]
Don't update if_obytes when transmitting packets.  That is already done
in IFQ_HANDOFF() when the packet is passed to the start routine, so doing
it here resulted in double counting.

Reported by: Alex Tutubalin  lexa lexa ru
MFC after: 1 week

12 years agoRemove block reallocation used to make room for the cylinder group
Edward Tomasz Napierala [Thu, 12 Apr 2012 13:43:43 +0000 (13:43 +0000)]
Remove block reallocation used to make room for the cylinder group
summary structure.  From now on, when there is no room for it,
we simply allocate new one in a newly added cylinder group.

This patch removes a conditional in updcsloc(), reindents some code
there, and removes unused routines.  I decided to do it this way instead
of disabling reallocation when the filesystem is live and leaving it
as it is otherwise, because this allows for removal of lots of complicated
and hard to test code.  Also, conditionally disabling it would result
in a different layout in filesystems resized online and offline, which
would look somewhat weird.

Reviewed by: mckusick
No objections from: kib
Sponsored by: The FreeBSD Foundation

12 years agoRefactor da(4) to remove one of two code paths used to query capacity
Edward Tomasz Napierala [Thu, 12 Apr 2012 12:58:14 +0000 (12:58 +0000)]
Refactor da(4) to remove one of two code paths used to query capacity
data.

Reviewed by: ken, mav (earlier version)
Sponsored by: The FreeBSD Foundation

12 years agoRead backup GPT header from the last LBA only when primary GPT header and
Andrey V. Elsukov [Thu, 12 Apr 2012 12:37:53 +0000 (12:37 +0000)]
Read backup GPT header from the last LBA only when primary GPT header and
table aren't valid. If they are ok, use hdr_lba_alt value to read backup
header. This will make gptboot happy when GPT used atop of some GEOM
provider, e.g. GEOM_MIRROR.

Reviewed by: pjd
MFC after: 2 weeks

12 years agoSome code restructuring to bring the memory allocator out of netmap.c
Luigi Rizzo [Thu, 12 Apr 2012 11:27:09 +0000 (11:27 +0000)]
Some code restructuring to bring the memory allocator out of netmap.c
and make it easier to replace it with a different implementation.
On passing, also fix indentation.

NOTE: I know that #include "foo.c" is ugly, but the alternative
(add another entry to sys/conf/files, add a separate header with
structs and prototypes, and expose functions that are meant to
be private) looks even worse to me.
We need a more modular way to specify dependencies and build options.

12 years agoKeep a copy of the original pointer returned by openpam_readline() so
Dag-Erling Smørgrav [Thu, 12 Apr 2012 11:23:24 +0000 (11:23 +0000)]
Keep a copy of the original pointer returned by openpam_readline() so
we can free it later, instead of trying to free a pointer that points
to the end of the buffer.

Committed to head because this code no longer exists upstream.

Submitted by: jasone@