Commit Graph

166355 Commits

Author SHA1 Message Date
David Chisnall
22e24cfdc1 Don't expose the wctype.h macros in C++ mode. They cause problems when
people try to invoke the namespaced versions of the functions of the
same names.

Approved by:	dim (mentor)
2011-11-12 20:45:10 +00:00
David Chisnall
96e3cfc8bf Expose all of the C99 limits.h stuff when we're in C++11 mode (or some approximation thereof). C++11 finally adds long long to C++. Now even C++ programmers are allowed to use 64-bit integers!
Approved by:	dim (mentor)
2011-11-12 20:25:11 +00:00
David Chisnall
38d1ac34ff Fix SIGATOMIC_M{IN,AX} on x86-64. These are meant to be the minimum values that are allowed in a sig_atomic_t, but it looks like they were just copied from the x86 versions, so these definitions violate the C and C++ specs. Mismatch was spotted by the libc++ test suite.
Approved by:	dim (mentor)
2011-11-12 20:16:06 +00:00
Alexander Motin
1446ecce65 Fix build on some archs after r227464. 2011-11-12 20:01:30 +00:00
David Chisnall
e481b86384 Expose the unimplemented libm functions in the math.h header. This allows C++'s <cmath> to work without the compiler complaining that the C++ versions are calling implicitly-declared functions. You will still get a linker error when they are called. OpenBSD 5.0 claims to fully implement the C99 <math.h> stuff, so might be worth investigating...
Reviewed by:	das
Approved by:	dim (mentor)
2011-11-12 19:55:48 +00:00
Dimitry Andric
59cfaa640c Fix buildworld breakage due after r227464.
Pointy hat to:	mav
2011-11-12 19:45:56 +00:00
Ed Maste
574280af1a Report the amount of memory from smbios data if provided.
This should get the correct memory size even if a 32-bit image is running
on a machine with > 4GB of memory.  This can be useful is using a 32-bit
installer on a machine which will eventually run a 64-bit image.

Reviewed by:	kmoore
2011-11-12 19:02:55 +00:00
Adrian Chadd
a3909ec506 Disable writing to the extension CYCPWR1 register.
This seems to make ANI behave better on the AR5416/AR5418.

Sponsored by:	Hobnob, Inc.
2011-11-12 16:47:23 +00:00
David Chisnall
3a23709832 Fix the number of decimal digits used for Swiss Francs (0 -> 2). Found by the libc++ test suite. If there is some locale test suite somewhere, it might be worth running it...
Approved by:	dim (mentor)
2011-11-12 14:39:20 +00:00
Christian Brueffer
c71c6f5abd Added mps(4) and mvs(4).
MFC after:	3 days
2011-11-12 10:30:14 +00:00
Christian Brueffer
af02ba9390 Grammar and mdoc cleanup.
MFC after:	3 days
2011-11-12 10:17:23 +00:00
Alexander Motin
0c883cef45 Major GEOM MULTIPATH class rewrite:
- Improved locking and destruction process to fix crashes.
 - Improved "automatic" configuration method to make it consistent and safe
by reading metadata back from all specified paths after writing to one.
 - Added provider size check to reduce chance of ordering conflict with
other GEOM classes.
 - Added "manual" configuration method without using on-disk metadata.
 - Added "add" and "remove" commands to allow manage paths manually.
 - Failed paths are no longer dropped from geom, but only marked as FAIL
and excluded from I/O operations.
 - Automatically restore failed paths when all others paths are marked
as failed, for example, because of device-caused (not transport) errors.
 - Added "fail" and "restore" commands to manually control FAIL flag.
 - geom is now destroyed on last path disconnection.
 - Added optional Active/Active mode support. Unlike Active/Passive
mode, load evenly distributed between all working paths. If supported by
the device, it allows to significantly improve performance, utilizing
bandwidth of all paths. It is controlled by -A option during creation.
Disabled by default now.
 - Improved `status` and `list` commands output.

Sponsored by:	iXsystems, inc.
MFC after:	1 month
2011-11-12 09:52:27 +00:00
Hans Petter Selasky
17c78d345c - This patch adds custom IOCTLs to read and write the 4 GPIO pins on the
cp2103 usb-to-serial chip.
- This patch also makes the line status polling asynchronous, to reduce
the time needed to change the GPIO pins.

Submitted by:	JD Louw
MFC after:	1 week
2011-11-12 08:40:52 +00:00
Hans Petter Selasky
2648cd35d8 Enable power save mode for the USB storage device driver.
MFC after:	1 week
2011-11-12 08:19:36 +00:00
Hans Petter Selasky
271ae033e9 Style change.
- Make it easier to port the USB code to other platforms by only using
one set of memory functions for clearing and copying memory. None of
the memory copies are overlapping. This means using bcopy() is not
required.
- Fix a compile warning when USB_HAVE_BUSDMA=0
- Add missing semicolon in avr32dci.
- Update some comments.

MFC after:	1 week
2011-11-12 08:16:45 +00:00
Qing Li
0f1aca6519 A default route learned from the RAs could be deleted manually
after its installation. This removal may be accidental and can
prevent the default route from being installed in the future if
the associated default router has the best preference. The cause
is the lack of status update in the default router on the state
of its route installation in the kernel FIB. This patch fixes
the described problem.

Reviewed by:	hrs, discussed with hrs
MFC after:	5 days
2011-11-11 23:22:38 +00:00
Brooks Davis
4b22573a89 In r191367 the need for if_free_type() was removed and a new member
if_alloctype was used to store the origional interface type.  Take
advantage of this change by removing all existing uses of if_free_type()
in favor of if_free().

MFC after:	1 Month
2011-11-11 22:57:52 +00:00
Eitan Adler
14517324d0 - add a missing "be" and "in"
- fix other errors introduced when committing r226436
- add 'function' to a sentence where it makes sense

Submitted by:	delphij
Submitted by:	dougb
Submitted by:	jhb
Approved by:	dougb
Approved by:	jhb
2011-11-11 22:27:09 +00:00
Eitan Adler
2c89ac5e81 - add support for CP-104EL-A and CP-104JU to puc
PR:		151365
Submitted by:	Joerg Niendorf <f5d10a@internode.on.net>
Approved by:	jhb
2011-11-11 22:24:16 +00:00
Xin LI
658029e0d8 Use __packed to prevent alignment from taking place, which otherwise may
change the on-disk format in an incompatible way.  Without this change,
msdosfs created on FreeBSD/arm would not be mountable.

PR:		bin/162486
Submitted by:	Ian Lepore <freebsd damnhippie dyndns org>
Reported by:	Mattia Rossi <mrossi at swin.edu.au>
MFC after:	3 days
2011-11-11 20:31:48 +00:00
David Chisnall
804d7f5520 Added myself to committers-src.dot
Approved by:	dim (mentor)
2011-11-11 20:13:24 +00:00
Pyun YongHyeon
e18783345a To send a frame, controller requires a prepended TX header and
the length of frame should be treated as multiple of 4. Actual
frame length is set in the TX header. The TX header position
should be aligned on 4 byte boundary and actual frame start
position should be aligned on 4 byte boundary as well. This means
we need 4(TX header length) + 3(frame length fixup) additional free
space in TX buffer in addition to actual frame length.
Make sure TX handler check these additional bytes.
ae_tx_avail_size() returns actual free space in TX buffer to ease
the calculation of available TX buffer space in caller. While I'm
here, replace magic number to appropriate sizeof operator to
enhance readability.

This change should fix controller lockup issue happened under
certain conditions but it still does not fix watchdog timeout. It
seems the watchdog timeout is side-effect of TxS and TxD
mismatches. The root cause of TxD/TxD mismatch is not known yet but
it looks like silicon bug. I guess driver may have to reinitialize
controller whenever it sees TxS and TxD mismatches but leave it as
it was at this moment.

PR:	kern/145918
2011-11-11 19:15:32 +00:00
Mikolaj Golub
040ee1ec95 Fix false positive EADDRINUSE that could be returned by bind, due to
the typo made in r227207.

Reported by:	kib
Tested by:	kib
2011-11-11 14:09:09 +00:00
Christian Brueffer
a482a69868 Reword a sentence in the HARDWARE section a little to make it more suitable
for automatic hardware notes generation.

MFC after:	3 days
2011-11-11 12:06:09 +00:00
Sergey Kandaurov
81f7f2c4db struct timespec32: change types of tv_sec and tv_nsec fields to signed
to match native struct timespec ABI on __LP32__.

This change is a prerequisite for upcoming futimens()/utimensat() in whose
implementations it is assumed that timespec32 can take a negative value.

MFC after:	1 week
2011-11-11 07:17:00 +00:00
Konstantin Belousov
4d651f4e5f Style.
MFC after:	1 week
2011-11-11 04:13:47 +00:00
Konstantin Belousov
f403cfb19c Guard against the unlikely case of the alias path containing the '%' symbols.
Reported by:	arundel
MFC after:	1 week
2011-11-11 04:12:58 +00:00
Konstantin Belousov
63b7742fbb Weaken the part of assertions added in the r227394. Only check that the
process state is stopped.

MFC after:	1 week
2011-11-11 04:10:36 +00:00
Ryan Stone
493b584dbd Correct the types of the arguments to return probes of the syscall
provider.  Previously we were erroneously supplying the argument types of
the corresponding entry probe.

Reviewed by:	rpaulo
MFC after:	1 week
2011-11-11 03:49:42 +00:00
Kevin Lo
5249ac8610 Converting int to wint_t leads to broekn comparison of raw char
and encoded wint_t.

Spotted by:	ache
2011-11-11 01:35:07 +00:00
Adrian Chadd
9ddf14906a Correct device id comments. 2011-11-11 00:48:41 +00:00
Adrian Chadd
bbfa418de5 Revert this previous commit for now - although this override unfortunately
results in the HAL being built without HAL debugging/diagnostic support,
the module building process needs to be somehow taught to not build AR5416+
NICs if AH_SUPPORT_AR5416 isn't defined in opt_ah.h .
2011-11-10 23:16:59 +00:00
Pyun YongHyeon
ecf3f60fed Remove dead ifdef. Driver should always check raised interrupt is
for the device.
2011-11-10 23:14:04 +00:00
Pyun YongHyeon
8a9710aa8c style.
No functional changes.
2011-11-10 22:15:11 +00:00
Ryan Stone
cddcb8b4dc On i386, fbt probes are implemented by writing an invalid opcode over
certain instructions in a function prologue or epilogue.  DTrace has a
hook into the invalid opcode fault handler that checks whether the fault
was due to an probe and if so, runs the DTrace magic.

Upon returning from an invalid opcode fault caused by a probe, DTrace must
emulate the instruction that was replaced with the invalid opcode and then
return control to the instruction following the invalid opcode.

There were a pair of related bugs in the emulation for the leave
instruction.  The leave instruction is used to pop off a stack frame prior
to returning from a function.  The emulation for this instruction must
move the trap frame for the invalid opcode fault down the stack to the
bottom of the stack frame that is being removed, and then execute an iret.

At two points in this process, the emulation code was storing values above
the current value of the stack pointer.  This opened up a window in which
if we were two take an interrupt, the trap frame for the interrupt would
overwrite the values stored on the stack, causing the system to panic
later.

The first bug was that at one point the emulation code saves the new value
for $esp above the current stack pointer value.  The fix is to save this
value instead inside of the original trap frame.  At this point we do
not need the original trap frame so this is safe.

The second bug is that when the emulate code loads $esp from the stack, it
points part-way through the new trap frame instead of at its beginning.
The emulation code adjusts the stack pointer to the correct value
immediately afterwards, but this still leaves a one instruction window in
which an interrupt would corrupt this trap frame.  Fix this by adjusting
the stack frame value before loading it into $esp.

This fixes panics in invop_leave on i386 when using fbt return probes.

Reviewed by:	rpaulo, attilio
MFC after:	1 week
2011-11-10 22:03:35 +00:00
Ryan Stone
2e0aa47581 The generated Makefile for the kernel was not running ctfconvert on
object files corresponding to source files that had the compile-with
option set in conf/files.  This means that any fbt probes for functions
in that object file would not have correct argument types.

The fix is to run ctfconvert on any target file that does not have the
no-obj option set in files.

PR:		bin/160275
Reported by:	Paul Ambrose (ambrosehua AT gmail DOT com)
MFC after:	1 week
2011-11-10 21:07:14 +00:00
Dimitry Andric
907eed1f50 Revert r227403 for now. Since the cross-tools stage purposefully
doesn't have ${WORLDTMP}/usr/bin in its PATH, if you build world with
CC=clang, tblgen tools from /usr/bin will be used instead of the ones
built under ${WORLDTMP}.  This can lead to various errors, especially if
you upgrade from an older clang.

Note that building world with gcc would not experience these problems,
because it only uses the tblgen tools in the world stage, where PATH
does contain ${WORLDTMP}/usr/bin.

Pointy hat to:	dim
2011-11-10 20:15:35 +00:00
Adrian Chadd
965aab1233 Add a missing reference to AR9287.
Sponsored by:	Hobnob, Inc.
2011-11-10 17:01:34 +00:00
Gleb Smirnoff
0809c540f4 Note that NAT instance argument can be tablearg.
PR:		misc/162265
Submitted by:	Paul Procacci <pprocacci gmail.com>
2011-11-10 12:05:26 +00:00
Sergey Kandaurov
871c940b71 Sync definitions with <sys/mtio.h> header. 2011-11-10 11:17:40 +00:00
Ruslan Makhmatkhanov
785191ee62 Fix date of commit bit proposing (s/2010/2011/)
Spotted by:    pluknet
Approved by:   novel (mentor)
2011-11-10 08:03:31 +00:00
Doug Barton
cbbacf9bcc Document that flock can return ENOLCK 2011-11-10 06:20:18 +00:00
Ruslan Makhmatkhanov
975be202db Add myself.
Approved by:	novel (mentor)
2011-11-10 06:19:18 +00:00
Kevin Lo
2bf213eb6c - Don't handle out-of-memory condition
- Fix types of function arguments match their declaration

Reviewed by:	delphij
Obtained from:	NetBSD
2011-11-10 01:44:05 +00:00
Adrian Chadd
cfa6055f5e Since these include wlan/ath/ah headers and these can change
definitions based on the state of the kernel compile environment,
ensure the opt_*.h files are available.
2011-11-09 23:53:13 +00:00
Adrian Chadd
5a25d7aab1 Use the system-provided opt_ah.h if one is provided.
This implies that users who are building the driver do so with
KERNBUILDDIR set to the compile/CONFIG directory so the various
opt_* sources can be pulled in.
2011-11-09 23:37:13 +00:00
Adrian Chadd
cf5d42d4b0 Bump this up to where it used to be.
I need to investigate this a little closer, but it seems that in noisy
environments the NF load takes longer than 5 * DELAY(10) and this is
messing up future NF calibrations. (The background: NF calibrations
begin at the value programmed in after the load has completed, so
if this is never loaded in, the NF calibrations only ever start at
the currently calibrated NF value, rather than starting at something
high (say -50.)

More investigation about the effect on 11n RX and calibration results
are needed.

Sponsored by:	Hobnob, Inc.
2011-11-09 23:28:47 +00:00
Adrian Chadd
ddbe3036e5 Introduce a work-around for issues with the AR5416 based MAC on SMP devices.
The AR5416 MAC (which shows up in the AR5008, AR9001, AR9002 devices) has
issues with PCI transactions on SMP machines. This work-around enforces
that register access is serialised through a (global for now) spinlock.

This should stop the hangs people have seen with the AR5416 PCI devices
on SMP hosts.

Obtained by:	Linux, Atheros
2011-11-09 22:39:44 +00:00
Xin LI
fb1c6a1716 Do a dummy read to flush the interrupt ACK that we just performed,
ensuring that everything is really, truly consistent.

This fixes certain cases where one will see various:

mfi0: COMMAND 0xffffffXXXXXXXXXX TIMEOUT AFTER XX SECONDS

MFC after:	3 days
Submitted by:	scottl
Ok'ed by:	jhb
2011-11-09 21:53:49 +00:00
Adrian Chadd
b07bd63bfe Commit a missing fix - the AR_SREV_KIWI_10_OR_LATER() check. 2011-11-09 21:41:18 +00:00