Commit Graph

166186 Commits

Author SHA1 Message Date
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
Ed Schouten
f44afd26af Remove trailing whitespace. 2011-11-09 21:01:50 +00:00
Adrian Chadd
3ca6cfa89e Even though the HAL doesn't currently support Kiwi 1.0/1.1,
be "more correct" about the Kiwi setup.

Obtained from:	Atheros
2011-11-09 19:09:03 +00:00
Hans Petter Selasky
4c0392e6fd Add definition of some USB 3.0 descriptors to libusb 1.0 and libusb 2.0.
Some header file parts of this patch were taken from a patch submitted
by Maya Erez <merez@codeaurora.org> to the LibUSB developers list.

MFC after:	1 week
2011-11-09 19:03:26 +00:00
Dimitry Andric
338f97fe8d Move building of clang's tblgen tools (and required libraries) from the
bootstrap-tools stage to the cross-tools stage.  These tools are only
needed for generating llvm/clang include files, and are not necessary
for bootstrapping the build itself.

This shaves off some build time, because the required libraries are now
just built twice (during the cross-tools and world stages), instead of
three times.

Also, if you build world using WITHOUT_CLANG= in src.conf(5), no llvm or
clang code will be compiled at all anymore.

MFC after:	1 week
2011-11-09 19:00:27 +00:00
Hans Petter Selasky
b3b1747a98 Fix size of USB 3.0 descriptor field.
MFC after:	3 days
2011-11-09 18:48:36 +00:00
Konstantin Belousov
e9862e9b9e Attempt to improve formatting and content of several comments for
amd64 and i386 MD code.

Based on suggestions by:	bde
MFC after:	1 week
2011-11-09 18:25:50 +00:00
Adrian Chadd
38962489b3 If software retransmit occurs with an ath_buf marked ATH_BUF_BUSY,
it's cloned and that clone is retransmitted. This means that the
ath_buf pointer squirreled away on the baw window array is suddenly
wrong and was causing all kinds of console output.

This updates the pointer in that particular BAW slot to the new
ath_buf after ensuring that:

* the new and old buffers have the same seqno;
* the current slot pointer matches the old buffer pointer.

This quietens the debugging output (again), restoring said debugging
to only signify when a broken condition has occured.

Sponsored by:	Hobnob, Inc.
2011-11-09 18:24:20 +00:00
Hans Petter Selasky
c089ba5ed7 Fix size of USB 3.0 descriptor field.
MFC after:	3 days
2011-11-09 18:11:29 +00:00
Adrian Chadd
009d7740fc Flip on processing interrupt profile events for mips24k.
This is a bit hackish and should be made more generic (ie, support more than
two hard-coded performance counter+config register pairs) so it can be used
for mips74k and other chips.

All this does is process the initial interrupt event. It doesn't (yet) handle
callgraph events, so even if you route the exception/interrupt to this routine
and flip the bit on, it will hang and crash pmc unless you disable callgraph
support when you enable a sample based PMC.
2011-11-09 17:38:27 +00:00
Konstantin Belousov
2bb663c043 Stopped process may legitimately have some threads sleeping and not
suspended, if the sleep is uninterruptible.

Reported and tested by:	pho
MFC after:	1 week
2011-11-09 17:25:43 +00:00
Konstantin Belousov
c8997bf02a Lock the thread lock around block that retrieves td_wmesg. Otherwise,
procfs could see a thread with assigned td_wchan but still NULL td_wmesg.

Reported and tested by:	pho
MFC after:	1 week
2011-11-09 17:15:51 +00:00
Konstantin Belousov
ebd2498cdf Assert that _PRELE() is done for the held process.
Tested by:	pho
MFC after:	1 week
2011-11-09 17:13:41 +00:00
Fabien Thomas
da5a448eb2 Import gcc fix for -fstack-protector that produces segfaulting
binaries on arm/armel.

Related gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35965

PR: 161128
MFC after: 1 week
2011-11-09 15:59:02 +00:00
Josh Paetzel
23a541f4f7 Add myself.
Approved by:	kib (mentor)
2011-11-09 15:21:48 +00:00
John Baldwin
f43fc3fc9d Revert some debugging printfs that crept into 223695. 2011-11-09 14:37:47 +00:00
Adrian Chadd
ac3fb727ff * Force the MAC to wakeup before we try resetting it, to ensure
it actually _gets_ reset properly.
* Add some more comments describing why things are done.

Obtained from:	Atheros
2011-11-09 14:34:25 +00:00
Adrian Chadd
985c86c038 Tidy up the AR9287 HAL a tiny bit - fix up AR9280 references. 2011-11-09 14:30:58 +00:00
Nathan Whitehorn
8a4cf006f4 Fix a bug where the pmap_cpu_bootstrap() ap argument could be clobbered.
Luckily, it mostly wasn't important, so this didn't cause major problems.
Also improve register reuse when setting up trap frames very slightly.

Submitted by:	Justin Hibbits <chmeeedalf at gmail dot com>
MFC after:	5 days
2011-11-09 13:48:23 +00:00
Ed Schouten
5cac9fa00e Restore the comment that I removed by accident.
The comment still applies to this block of code.
2011-11-09 13:26:59 +00:00