Commit Graph

167068 Commits

Author SHA1 Message Date
Max Khon
94f176ebd4 Revert r228521: sometimes job output is lost
(see tools/regression/usr.bin/make/execution/joberr test).

openpty(fd + 0, fd + 1,...) version does not have this problem but
it sometimes enters an infinite sleep in "ttywait" state in tty_drain()
when make(1) closes slave pty.
2011-12-15 06:25:19 +00:00
Max Khon
548f8e2d41 Fix last-minute typo. 2011-12-15 06:12:43 +00:00
Max Khon
174da58b23 Add job error output test.
make(1) with openpty() currently fails this test: there's a race condition
and error output is sometimes lost.
2011-12-15 06:01:06 +00:00
Alan Cox
3b03ca3bbe Eliminate vestiges of page coloring. 2011-12-15 05:07:16 +00:00
Max Khon
366cd46cbe job make: if stdout is a tty create a pty when running a command. 2011-12-15 03:13:23 +00:00
Xin LI
f8dee27442 Honor NFSv3 commit call (RFC 1813, Section 3.3.21) where when count is 0,
the full length from offset is being flushed.  Note that for now VOP_FSYNC
does not support offset and length parameters so we still do the same full
VOP_FSYNC.  This issue was reported at FreeNAS support site as FreeNAS
ticket #1096.

Submitted by:	"ceckerle" <ce.freenas eckerle net>
Prodded by:	gcooper
Reviewed by:	rmacklem
MFC after:	2 weeks
2011-12-15 02:26:53 +00:00
Adrian Chadd
3f9bdcef12 * Add in the gpio/gpioled drivers into AR91XX_BASE.
* Add in a default GPIO section for AR91XX_BASE.hints, which doesn't
  define the GPIO function masks or any GPIO pines.
* Add in the GPIO line definitions for LEDs and GPIO pins for the
  TP-WR1043nd.

I've verified the LEDs work fine using gpioset.
2011-12-15 01:05:38 +00:00
Adrian Chadd
19ac3f84d0 Re-jiggle the GPIO code a little to remove the hard-coded AR71xx GPIO
config and function mask setup.

* "gpiomask" now specifies which GPIO pins to enable, for devices to bind to.
* "function_set" allows bits in the function register to be set at GPIO setup.
* "function_clear" allows bits in the function register to be cleared at
  GPIO setup.

The function_set/function_clear bits allow for individual GPIO pins to either
drive a GPIO line or an alternate function - eg USB, JTAG, etc. This allows
for things like CS1/CS2 be enabled for those boards w/ >1 SPI device connected,
or disabling JTAG for the AR7240 (which is apparently needed ..)

I've verified this on the AR71xx.
2011-12-15 01:03:49 +00:00
Adrian Chadd
4473d4da67 Add the 11n chipset RF frontends to the linker set, even though they're not
attached this way.

The AR5212 based NICs have a variety of RF frontends, so there's a linker set
which the AR5212 attach routine calls. The same framework is used for the
AR5416 and later but as there's a fixed RF frontend for each 11n NIC, it
is just directly attached.

However in the case of compiling a cut down HAL (eg _just_ AR9130 WMAC support),
the linker set ends up being empty and this causes the compile to fail.

So this is just a workaround for that - it means those users who wish an 11n
only HAL can compile the 11n chipsets and RF frontend they need, and just
"ath_ar5212" for the AR5212/AR5416 common code, and it'll just work.

Sponsored by:	Hobnob, Inc.
2011-12-15 00:59:11 +00:00
Adrian Chadd
46a924c4c8 Print out the radio RF version at startup, so I can better see which
RF frontend versions people have when they submit problem reports.

Sponsored by:	Hobnob, Inc.
2011-12-15 00:55:27 +00:00
Adrian Chadd
7f4245c1b3 Use the correct RF version probe routine.
Obtained from:	Atheros
Sponsored by:	Hobnob, Inc.
2011-12-15 00:54:11 +00:00
Adrian Chadd
957458a836 Modify the ACL code slightly to support a few nifty things:
* Call it before sending probe responses, so the ACL code has the
  chance to reject sending them.

* Pass the whole frame to the ACL code now, rather than just the
  destination MAC - that way the ACL module can look at the frame
  contents to determine what the response should be.

This is part of some uncommitted work to support band steering.

Sponsored by:	Hobnob, Inc.
2011-12-15 00:52:30 +00:00
Alan Cox
894b2848d3 Create large page mappings in pmap_map().
MFC after:	6 weeks
2011-12-14 23:57:47 +00:00
Jilles Tjoelker
1fc7f6471e Add a test for r228510. 2011-12-14 23:26:48 +00:00
Xin LI
4c50947c21 Reflect the move of eventtimers(7) to eventtimers(4). 2011-12-14 23:22:40 +00:00
Jilles Tjoelker
6d1c58f8a2 Fix select/poll/kqueue for write on reverse direction before first write.
The reverse direction of a pipe is lazily allocated on the first write in
that direction (because pipes are usually used in one direction only).  A
special case is needed to ensure the pipe appears writable before the first
write because there are 0 bytes of pending data in 0 bytes of buffer space
at that point, leaving 0 bytes of data that can be written with the normal
code.

Note that the first write returns [ENOMEM] if kern.ipc.maxpipekva is
exceeded and does not block or return [EAGAIN], so selecting true for write
is correct even in that case.

PR:		kern/93685
Submitted by:	gianni
MFC after:	2 weeks
2011-12-14 22:26:39 +00:00
John Baldwin
fb680e16f4 Add a helper API to allow in-kernel code to map portions of shared memory
objects created by shm_open(2) into the kernel's address space.  This
provides a convenient way for creating shared memory buffers between
userland and the kernel without requiring custom character devices.
2011-12-14 22:22:19 +00:00
Hans Petter Selasky
58a1ff3bf4 Improve fix for random USB transfer time out.
Suggested by:	YougHyeon
MFC after:	3 days
2011-12-14 22:14:05 +00:00
Pedro F. Giffuni
c14d4ad1c6 Merge ext2_readwrite.c into ext2_vnops.c as done in UFS in r101729.
This removes the obfuscations mentioned in ext2_readwrite and
places the clustering funtion in a location similar to other
UFS-based implementations.

No performance or functional changeses are expected from
this move.

PR:		kern/159232
Suggested by:	bde
Approved by:	jhb (mentor)
MFC after:	2 weeks
2011-12-14 22:04:14 +00:00
Joel Dahl
8d6c73ab19 Add SEE ALSO. 2011-12-14 19:48:21 +00:00
Rafal Jaworowski
dd63f0ab98 Make *intr{cnt,names} on ARM reside in data section, similar to other arches.
sintrnames and sintrcnt are initialized with non-zero values, which were
discarded by the .bss directive, so consumers like "vmstat -i" were not
getting correct data.

Submitted by:	Lukasz Plachno
Obtained from:	Semihalf
MFC after:	1 month
2011-12-14 17:12:59 +00:00
Konstantin Belousov
5734c46c68 _rtld_bind() read-locks the bind lock, and possible plt resolution
from the dispatcher would also acquire bind lock in read mode, which
is the supported operation. plt is explicitely designed to allow safe
multithreaded updates, so the shared lock do not cause problems.

The error in r228435 is that it allows read lock acquisition after the
write lock for the bind block.  If we dlopened the shared object that
contains IRELATIVE or jump slot which target is STT_GNU_IFUNC, then
possible recursive plt resolve from the dispatcher would cause it.

Postpone the resolution for irelative/ifunc right before initializers
are called, and drop bind lock around calls to dispatcher.  Use
initlist to iterate over the objects instead of the ->next, due to
drop of the bind lock in iteration.

For i386/reloc.c:reloc_iresolve(), fix calculation of the dispatch
function address for dso, by taking into account possible non-zero
relocbase.

MFC after:	3 weeks
2011-12-14 16:47:53 +00:00
Fabien Thomas
7e1f37e14e Rework the attachement to probe directly on isab(4).
Depend on r228496.

Requested by:	jhb
MFC after:	1 month
2011-12-14 15:39:51 +00:00
Alexander Motin
221676a110 After several suggestions from people, move eventtimers page from 7 to 4. 2011-12-14 15:19:40 +00:00
Gleb Smirnoff
c62cf1f7fe More MLINKS for rtalloc.9 2011-12-14 14:55:19 +00:00
Gleb Smirnoff
9aa3cab968 Update this page to describe modern interfaces. 2011-12-14 14:52:50 +00:00
Eitan Adler
33fd7c5628 - The previous commit (r228449) accidentally moved the vm.stats.vm.* sysctls
to vm.stats.sys.  Move them back.

Noticed by:		pho
Reviewed by:	bde (earlier version)
Approved by:	bz
MFC after:		1 week
Pointy hat to:	me
2011-12-14 13:25:00 +00:00
Alexander Motin
dd3ebdba6f Add PCI IDs for the Intel ICH9M SATA controllers.
MFC after:	2 weeks
2011-12-14 13:12:55 +00:00
John Baldwin
a15536c70d Implement BUS_ADD_CHILD() for the isab(4) driver. It already calls
bus_generic_probe() and bus_generic_attach() to handle drivers that add
new children via identify methods.

MFC after:	1 week
2011-12-14 12:34:02 +00:00
Ed Schouten
e22e07ff3b Slightly alter the C1X definitions in in cdefs.h:
- Add _Alignas(). Unfortunately this macro is only partially functional.
  The C1X standard will allow both an integer and a type name to be
  passed to this macro, while this macro only allows an integer. To be
  portable, one must use _Alignas(_Alignof(double)) to use type names.

- Don't do _Static_assert() when __COUNTER__ is not supported. We'd
  better keep this implementation robust and allow it to be used in
  header files, without mysteriously breaking older compilers.
2011-12-14 09:09:37 +00:00
Hans Petter Selasky
663e39b0b5 Fix for random USB transfer time out.
Submitted by:	PseudoCylon
MFC after:	3 days
2011-12-14 08:52:27 +00:00
Hans Petter Selasky
5f63a5d203 Fix definition of XHCI port power bit.
Reported by:	Kohji Okuno
MFC after:	3 days
2011-12-14 08:44:16 +00:00
Ruslan Ermilov
e26e60ee36 Clean up includes; the prototype for getosreldate() has moved to
<unistd.h> in r183390.
2011-12-14 08:35:08 +00:00
Navdeep Parhar
214c358257 Do not clobber the ingress queue's congestion setting.
MFC after:	1 month
2011-12-14 05:34:23 +00:00
David E. O'Brien
1c5151f3f8 Match other formatting. 2011-12-14 02:31:32 +00:00
Hans Petter Selasky
11b81cedfd Use usbd_transfer_unsetup() instead of usbd_transfer_stop() so that
we don't have to worry about locking.

MFC after:	1 weeks
2011-12-14 01:03:07 +00:00
Hans Petter Selasky
a6ed493726 Stop USB audio transfers early so that any audio applications
will time out and close opened /dev/dspX.Y device(s), if
any. This is a workaround because we cannot unregister PCM
devices while the audio character device is in use.

Add a missing inclusion guard.

MFC after:	1 weeks
2011-12-14 00:48:20 +00:00
Hans Petter Selasky
2e14174893 Implement better support for USB controller suspend and resume.
This patch should remove the need for kldunload of USB
controller drivers at suspend and kldload of USB controller
drivers at resume.

This patch also fixes some build issues in avr32dci.c

MFC after:	2 weeks
2011-12-14 00:28:54 +00:00
Ed Schouten
2f467d2d16 Change targ(4) to use cdevpriv, instead of multiple character devices.
Also update the manpage and the scsi_target example program accordingly.

Discussed on:	scsi@
Tested by:	Chuck Tuffli <chuck tuffli net>
2011-12-13 21:26:33 +00:00
Pyun YongHyeon
c0220d815a Destroy DMA tag for jumbo RX buffer in device detach. 2011-12-13 20:31:57 +00:00
Pyun YongHyeon
e3215f766e BCM5720 performance tweak from Broadcom.
o Allow multiple outstanding read requests from non-LSO read DMA engine.
 o Allow 4KB burst length reads for non-LSO frames.
 o Enable 512B burst length reads for buffer descriptors.

Submitted by:	Geans Pin < geanspin <> broadcom dot com >
2011-12-13 20:26:46 +00:00
Ed Schouten
867cb545da Reimplement CTASSERT() using _Static_assert(). 2011-12-13 19:39:24 +00:00
Ed Schouten
e2da149583 Make support for C1X keywords more complete.
- _Alignof(), which returns the aligment of a certain type.
- _Static_assert(), which can be used to check compile-time assertions.
- _Thread_local, which uses TLS on a variable.

MFC after:	3 months
Reviewed by:	mdf
2011-12-13 19:37:27 +00:00
Pyun YongHyeon
59aab5d20c Rework link state tracking and remove superfluous link UP/DOWN
messages.
 o Add check for actually resolved speed in miibus_statchg callback
   instead of blindly reprogramming BCE_EMAC_MODE register.  The
   callback may be called multiple times(e.g. link UP, link
   transition, auto-negotiate complete etc) while auto-negotiation
   is in progress.  All unresolved link state changes are ignored
   now and setting BCE_EMAC_MODE after link establishment is done
   once.
 o bce(4) is careful enough not to drive MII_TICK if driver got a
   valid link.  To detect lost link, bce(4) relied on link state
   change interrupt and if driver see the interrupt, it forced to
   drive MII_TICK by calling bce_tick() in interrupt handler.
   Because bce(4) generates multiple link state change interrupts
   while auto-negotiation is in progress, bce_tick() would be
   called multiple times and this resulted in generating multiple
   link UP/DOWN messages.
   With this change, bce_tick() is not called in interrupt handler
   anymore such that miibus_statchg callback handles link state
   changes with consistent manner.

Reviewed by:	davidch
2011-12-13 18:11:25 +00:00
David E. O'Brien
3d7618d8bf Disallow various debug.kdb sysctl's when securelevel is raised.
PR:	161350
2011-12-13 17:59:16 +00:00
Ed Schouten
bdc971eb19 Add support for __COUNTER__.
__COUNTER__ allows one to obtain incrementing (read: unique) numbers
from the C preprocesor. This is useful when implementing things like a
robust implementation of CTASSERT(), which currently fails when using
it more than once on a single line of code. Probably not likely to cause
any breakage, but still.

__COUNTER__ was also added to GCC 4.3, but since that implementation is
GPLv3 licensed, I took the liberty of implementing it without looking at
any upstream sources. Therefore, this version is licensed under the same
license as the rest of the code; GPLv2.
2011-12-13 17:34:47 +00:00
Ed Schouten
59340eb8e2 Don't use __P().
The rest of the file doesn't use it either and according to style(9), it
should not be used.
2011-12-13 14:53:26 +00:00
Gleb Smirnoff
84516ac070 Add compatibility support for specifing IPv4 aliases in
rc.conf without the "inet" keyword.

Obtained from:	hrs
2011-12-13 14:36:04 +00:00
Ed Schouten
75da3c1a9b Replace inline static' by static inline'.
If I interpret the C standard correctly, the storage specifier should be
placed before the inline keyword. While at it, replace __inline by
inline in the files affected.
2011-12-13 14:06:01 +00:00
Eitan Adler
9910b854c6 - Add a sysctl to allow non-root users the ability to set idle
priorities.

- While here fix up some style nits.

Discussed with: cperciva (breifly)
Reviewed by:	pjd (earlier version)
Reviewed by:	bde
Approved by:	jhb
MFC after:	1 month
2011-12-13 14:00:27 +00:00