Commit Graph

155953 Commits

Author SHA1 Message Date
Rui Paulo
3157ba2193 MFV hostapd & wpa_supplicant 0.6.10. 2010-06-14 15:37:48 +00:00
Ulrich Spörlein
a118325368 random(6): avoid dead assignments
Found by:	clang static analyzer
2010-06-14 13:03:25 +00:00
Bernhard Schmidt
7041d50cfd sc_lastrs is also used in case the sending station is not known, for
example in a split IBSS scenario. Therefore always assign sc_lastrs.
This removes a hack I committed in r206457.

Approved by:	rpaulo (mentor)
2010-06-14 08:24:00 +00:00
Alexander Motin
2f9fc3899b Fix bug introduced in SVN rev 194985. When calling pic_assign_cpu()
for pre-bound IRQs during boot, submit there LAPIC ID, same as in other
places, not CPU ID.
2010-06-14 07:38:53 +00:00
Alexander Motin
93fc07b434 Virtualize pci_remap_msi_irq() call from general MSI code. It allows MSI
(FSB interrupts) to be used by non-PCI devices, such as HPET.
2010-06-14 07:10:37 +00:00
Ed Schouten
486d3623ba Unbreak Clang on PowerPC.
It seems GCC 4.2.1 on PowerPC miscompiles Clang, causing it to crash
when building even simple Hello World applications. Switch back to -O1
for this architecture.

Submitted by:	nwhitehorn
2010-06-14 06:23:47 +00:00
Tim Kientzle
0c1bca0fd2 If the compressed data is larger than the uncompressed,
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow.  This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.

Thanks to:  Boris Samorodov
2010-06-14 02:56:45 +00:00
Tim Kientzle
2ca090b308 Separate _posix1e_acl_id_to_name() into a separate file, to
break an unnecessary dependency on getpwuid() and getgrgid().

MFC after: 1 month
2010-06-14 02:26:13 +00:00
Andrew Thompson
beaa05370d - Because hostapd calls iv_key_set() before if_init(), make sure key_set
callback function will be executed, and that the key won't be deleted during
  the init process.
- txmic and rxmic are written into the chip the same place regardless of
  opmode.
- Make the hardware generate 802.11 sequence numbers.

Submitted by:	Akinori Furukoshi
Obtained from:	git://gitorious.org/run/run.git
2010-06-14 00:40:23 +00:00
Marcel Moolenaar
97e9dcb987 Fix build breakages on ia64 introduced some commits ago. 2010-06-13 23:37:16 +00:00
Rui Paulo
95ea342968 Import wpa_supplicant & hostapd 0.6.9. 2010-06-13 20:32:04 +00:00
Marius Strobl
c10f5c0eb1 Update a branch missed in r207537.
MFC after:	3 days
2010-06-13 20:29:55 +00:00
Jilles Tjoelker
96535454fc libedit: Add basic filename completion code from NetBSD.
This will be used to provide filename completion in sh(1).

Changes from the NetBSD code:
* wide character support disabled, as in the rest of libedit
* config.h and related portability stuff reduced/disabled, as in the rest
  of libedit

Submitted by:	Guy Yur
Obtained from:	NetBSD
2010-06-13 17:04:42 +00:00
Warner Losh
28a24ccfa9 style(9) fixes:
o make cmd scoped to the whole do_rules function, since it really is
  scoped to the whole fucnion.  Making it static was the wrong way to
  fix referencing it outside of the block in which it was declared
  (and conforms to the style of the rest of the file).
o remove a couple of meaningless blank lines
o properly wrap one line.
2010-06-13 16:54:11 +00:00
Warner Losh
f62a0233c8 Merge from tbemd, with minor tweaks:
Search from most specific ($MACHINE) to least specific
($MACHINE_CPUARCH) when looking for the tty file to use.  Also add an
.error case if none exist.
2010-06-13 16:35:20 +00:00
Rafal Jaworowski
f13753b37a Enable ofwdump(8) on ARM as this is a useful tool to inspect a flattened
device tree.
2010-06-13 13:30:26 +00:00
Rafal Jaworowski
db5ef4fc77 Convert Marvell ARM platforms to FDT convention.
The following systems are involved:

  - DB-88F5182
  - DB-88F5281
  - DB-88F6281
  - DB-78100
  - SheevaPlug

This overhaul covers the following major changes:

  - All integrated peripherals drivers for Marvell ARM SoC, which are
    currently in the FreeBSD source tree are reworked and adjusted so they
    derive config data out of the device tree blob (instead of hard coded /
    tabelarized values).

  - Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say
    good by to obio / mbus drivers and numerous hard-coded config data.

Note that world needs to be built WITH_FDT for the affected platforms.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation.
2010-06-13 13:28:53 +00:00
Rafal Jaworowski
dc65d002dd Initial FDT infrastructure elements for ARM.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-06-13 13:12:52 +00:00
Rafal Jaworowski
ddf2705d57 Improve style. 2010-06-13 13:08:23 +00:00
Rafal Jaworowski
3c5326bf4a Connect FDT infrastructure to the build system.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-06-13 13:02:43 +00:00
Rafal Jaworowski
10e8667600 Provide identify method for the fdtbus(4).
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-06-13 12:58:31 +00:00
Rafal Jaworowski
d7af5349ec Do not set WITH_FDT by default based on arch, as this does not work for
a bootstrap stage tool.

FDT-enabled platforms will have to specify WITH_FDT explicitly at buildworld
time for now until TBEMD is complete, which is going to provide means for such
arch based selection of build components.

Discussed with:	imp
2010-06-13 12:53:44 +00:00
Rafal Jaworowski
29d268b567 Fix conditional FDT support in loader(8). 2010-06-13 12:46:32 +00:00
Ed Schouten
2a008fddd8 Disable usage of posix_spawn() inside LLVM.
Even though it's nice to use posix_spawn() instead of manually using
fork()/exec(), it's better to disable this. FreeBSD 7 doesn't support
this interface. When enabled, we can't build tblgen, which prevents us
from building FreeBSD 9 on 7.

Tested by:	raj
2010-06-13 12:39:22 +00:00
Ed Schouten
03b7d7deef Unbreak the build on less common architectures.
Submitted by:	Andreas Tobler <andreast list fgznet ch>
2010-06-13 11:27:44 +00:00
Kai Wang
b2c6fcf986 * Improve compatibility with existing application code by permitting the
use of `elf_getbase()` on non-archive members. This change is needed
  for gcc LTO (-flto) to work properly.
* Style fix: paranthesize returned values.
* Document the current behaviour of `elf_getbase()`.

Tested by:	gerald, Steve Kargl (original patch)
Obtained from:	elftoolchain
MFC after:	3 days
2010-06-13 10:58:50 +00:00
Konstantin Belousov
b38f7723eb In NFS clients, instead of inconsistently using #ifdef
DIAGNOSTIC and #ifndef DIAGNOSTIC for debug assertions, prefer
KASSERT(). Also change one #ifdef DIAGNOSTIC in the new nfs server.

Submitted by:	Mikolaj Golub <to.my.trociny gmail com>
MFC after:	2 weeks
2010-06-13 05:24:27 +00:00
Lawrence Stewart
5ad333cf62 Add a utility macro to simplify calculating an aggregate sum from a DPCPU
counter variable.

Sponsored by:	FreeBSD Foundation
Reviewed by:	jhb, rpaulo, rwatson (previous version of patch)
MFC after:	1 week
2010-06-13 02:39:55 +00:00
Warner Losh
4c3cf69727 Merge from tbemd:
Convert from using MACHINE_ARCH to MACHINE_CPUARCH.  Hoist path statement
up into the top Makefile rather than repeating it on every arch Makefile.
2010-06-13 01:27:29 +00:00
Colin Percival
ff847ecb82 In threaded processes, destroy the mutex atexit_mutex when we've
finished using it.  This allows the mutex's allocated memory to be
freed.

This is one sense a rather silly change, since at this point we're
less than a microsecond away from calling _exit; but fixing this
memory leak is likely to make life easier for anyone trying to
track down other memory leaks.
2010-06-13 01:13:36 +00:00
Navdeep Parhar
27d1c65e8e cxgb(4): add knob to get packet timestamps from the hardware.
The T3 ASIC can provide an incoming packet's timestamp instead of its RSS hash.
The timestamp is just a counter running off the card's clock.  With a 175MHz
clock an increment represents ~5.7ns and the 32 bit value wraps around in ~25s.

# sysctl -d dev.cxgbc.0.pkt_timestamp
dev.cxgbc.0.pkt_timestamp: provide packet timestamp instead of connection hash

# sysctl -d dev.cxgbc.0.core_clock
dev.cxgbc.0.core_clock: core clock frequency (in KHz)
# sysctl dev.cxgbc.0.core_clock
dev.cxgbc.0.core_clock: 175000
2010-06-12 22:33:04 +00:00
Navdeep Parhar
06eace6376 make format string a string literal.
Reported by:	clang
2010-06-12 22:24:39 +00:00
Nathan Whitehorn
ed6e65a2fe Make SMP work on MPC7400-based Apple desktops like the PowerMac3,3. 2010-06-12 21:14:22 +00:00
Gavin Atkinson
3583a05a70 These files are no longer required since r207607 2010-06-12 19:32:52 +00:00
David Schultz
efd0f253c2 Introduce __isnanf() as an alias for isnanf(), and make the isnan()
macro expand to __isnanf() instead of isnanf() for float arguments.
This change is needed because isnanf() isn't declared in strict POSIX
or C99 mode.

Compatibility note: Apps using isnan(float) that are compiled after
this change won't link against an older libm.

Reported by:	Florian Forster <octo@verplant.org>
2010-06-12 17:32:05 +00:00
Dag-Erling Smørgrav
dd73646c6c Install tblgen so partial / progressive builds are still possible. 2010-06-12 16:04:29 +00:00
Ed Schouten
c1fe4c5343 Do the branding right this time.
I've looked at other places in the source tree where CLANG_VENDOR is
used and I suspect it might not be safe to use newlines here.
CLANG_VENDOR should just be defined to "FreeBSD ", just like the latest
Clang preview in OS X uses "Apple ". Properly use SVN_REVISION to define
it to the imported revision of Clang. I do want to have a date in there,
so slightly modify the code to support CLANG_VENDOR_SUFFIX.
2010-06-12 15:13:36 +00:00
Konstantin Belousov
f1bb758d4b Add another variation of make_dev(9), make_dev_p(9), that is allowed
to fail and can return useful error code.

Requested by:	jh
Reviewed by:	imp, jh
MFC after:	3 weeks
2010-06-12 13:22:39 +00:00
Konstantin Belousov
76d43557d8 When make_dev_credf(MAKEDEV_WAITOK) is called, use
devctl_notify_f(M_WAITOK) for devfs notifications.

Suggested by:	jh
Reviewed by:	imp, jh
MFC after:	3 weeks
2010-06-12 13:21:25 +00:00
Konstantin Belousov
bebc339116 Add modifications of devctl_notify(9) functions that take flags. Use
flags to specify M_WAITOK/M_NOWAIT. M_WAITOK allows devctl to sleep for
the memory allocation.

As Warner noted, allowing the functions to sleep might cause
reordering of the queued notifications.

Reviewed by:	imp, jh
MFC after:	3 weeks
2010-06-12 13:20:38 +00:00
Alexander Motin
1440de203f Check general TSC presence before doing more specific checks and printfs. 2010-06-12 13:10:03 +00:00
Ed Schouten
6c9cdb5860 ANSIfy prototypes in subr_usbd.c.
Clang generates the following warnings when building subr_usbd.c:

| subr_usbd.c:598:13: warning: promoted type 'int' of K&R function
|   parameter is not compatible with the parameter type 'uint8_t' (aka
|   'unsigned char') declared in a previous prototype
| subr_usbd.c:627:13: warning: promoted type 'int' of K&R function
|   parameter is not compatible with the parameter type 'uint8_t' (aka
|   'unsigned char') declared in a previous prototype
| subr_usbd.c:649:13: warning: promoted type 'int' of K&R function
|   parameter is not compatible with the parameter type 'uint8_t' (aka
|   'unsigned char') declared in a previous prototype

Instead of just ANSIfying these three prototypes, do it for the entire
file.

Spotted by:	clang
2010-06-12 12:19:08 +00:00
Martin Matuska
bc5752e811 Fix arc_read_done may try to byteswap undefined data (sparc related)
OpenSolaris onnv-revision:	10839:cf83b553a2ab

Obtained from:	OpenSolaris (Bug ID 6836714)
Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-06-12 11:28:46 +00:00
Martin Matuska
726db0af89 Fix panic in zfs_getsecattr
OpenSolaris onnv-revision:	10295:f7a18a1e9610

Obtained from:	OpenSolaris (Bug ID 6870564)
Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-06-12 11:27:10 +00:00
Martin Matuska
9dac494ce6 Fix possible zfs panic on zpool import
OpenSolaris onnv-revision:	10040:38b25aeeaf7a

Obtained from:	OpenSolaris (Bug ID 6857012)
Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-06-12 11:25:57 +00:00
Martin Matuska
16547ea20b Fix zpool resilver stalls with spa_scrub_thread in a 3 way deadlock
OpenSolaris onnv-revision:	9997:174d75a29a1c

Obtained from:	OpenSolaris (Bug ID 6843235)
Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-06-12 11:24:10 +00:00
Martin Matuska
072b6fc60e Fix ZFS panic deadlock: cycle in blocking chain via zfs_zget
OpenSolaris onnv-revision:	9774:0bb234ab2287

Obtained from:	OpenSolaris (Bug ID 6788152)
Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-06-12 11:22:45 +00:00
Martin Matuska
1aa2ebdd23 Fix vdev_probe() starvation brings txg train to a screeching halt
OpenSolaris onnv-revision:	9722:e3866bad4e96

Obtained from:	OpenSolaris (Bug ID 6844069)
Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-06-12 11:21:37 +00:00
Martin Matuska
a2d6c8d15b Fix incomplete resilvering after disk replacement (raidz)
OpenSolaris onnv-revision:	9434:3bebded7c76a

Obtained from:	OpenSolaris (Bug ID 6794570)
Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-06-12 11:20:50 +00:00
Martin Matuska
b90308c521 Fix zfs destroy fails to free object in open context, stops up txg train
OpenSolaris onnv-revision:	9409:9dc3f17354ed

Obtained from:	OpenSolaris (Bug ID 6809683)
Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-06-12 11:19:51 +00:00