Commit Graph

158421 Commits

Author SHA1 Message Date
Ed Maste
e64241487f /etc/rc.d/defaultroute currently bails immediately if all interfaces
set to use DHCP have no carrier.  This can cause grief as it may take
some time for link to be established, and defaultroute may terminate
before this happens.

Introduce a defaultroute_carrier_delay variable and then wait that long
in defaultroute before bailing if no interfaces have carrier.  With the
default settings defaultroute will wait for five seconds for this, and
the original 30 second wait for a default route to appear is unchanged.
Note that there is in discussion an alternative approach to the broader
problem of waiting for DHCP-configured routes.  However, this change
addresses a real problem in the current defaultroute script.

Discussed on:	freebsd-rc@
2010-09-29 13:08:23 +00:00
John Baldwin
2d43c32e3c If rt2560_bbp_init() fails, don't drop the lock as the callers of
rt2560_init_locked() expect the lock to be held on return.

Reported by:	Anton Shterenlikht  mexas of bristol ac uk
MFC after:	1 week
2010-09-29 11:52:44 +00:00
Luigi Rizzo
38cc301f9f whitespace changes in preparation for future commits 2010-09-29 09:40:20 +00:00
Luigi Rizzo
a47ee22718 fix handling of initial credit for an idle pipe.
This fixes the bug where setting bw > 1 MTU/tick resulted in
infinite bandwidth if io_fast=1

PR:		147245 148429
Obtained from:	Riccardo Panicucci
MFC after:	3 days
2010-09-29 09:22:12 +00:00
Konstantin Belousov
063045a555 Fix typo in comment. 2010-09-29 07:40:11 +00:00
David Xu
931e4573df - kern_sched_rr_get_interval should return interval for thread 1 in
target process.
- eliminate a goto.

MFC after: 1 week
2010-09-29 07:31:05 +00:00
David Xu
ec92603cf9 Check invalid mutex in _mutex_cv_unlock. 2010-09-29 06:06:58 +00:00
David Xu
8d2a935e45 Remove a redundant instruction for casuword. 2010-09-29 02:36:58 +00:00
Pyun YongHyeon
dedcdf574b Set the number of RX frames to receive after RX MBUF low watermark
has reached. This reduced number of dropped frames when
flow-control is enabled. Previously it dropped incoming frames once
RX MBUF low watermark has reached. The value used in MAC RX MBUF
low watermark is greater than or equal to 4 so receiving two more
RX frames should not be a problem.

Obtained from:	OpenBSD
2010-09-29 00:00:45 +00:00
Luigi Rizzo
8d74ca8ce9 fix breakage in in-kernel NAT: the code did not honor
net.inet.ip.fw.one_pass and always moved to the next rule
in case of a successful nat.

This should fix several related PR (waiting for feedback
before closing them)

PR:		145167 149572 150141
MFC after:	3 days
2010-09-28 23:23:23 +00:00
Luigi Rizzo
c08e545e99 Whitespace changes to reduce diffs wrt the most recent ipfw/dummynet code:
+ remove an unused macro,
+ adjust the constants in an enum
+ small whitespace changes

MFC after:	3 days
2010-09-28 22:46:13 +00:00
Luigi Rizzo
09bc43b0cf use make from the toolchain, as the source tree may depend on
specific features (e.g. on recent HEAD, rtld fails with older 'make')

MFC after:	3 days
2010-09-28 22:30:11 +00:00
Bernd Walter
4a2b4bc031 fix outdated comment 2010-09-28 21:13:54 +00:00
Ed Maste
905571c031 Remove copyright strings printed at login time via login(1) or sshd(8).
It is not clear to what this copyright should apply, and this is in line
with what other operating systems do.

For ssh specifically, printing of the copyright string is not in the
upstream version so this reduces our FreeBSD-local diffs.

Approved by:	core, des (ssh)
2010-09-28 20:57:14 +00:00
Warner Losh
1115f627db This file has been unused for ages. Retire it.
Submitted by:	pluknet
2010-09-28 15:33:30 +00:00
Konstantin Belousov
6c82a991c3 In linprocfs_doargv():
- handle compat32 processes;
- remove the checks for copied in addresses to belong into valid
  usermode range, proc_rwmem() does this;
- simplify loop reading single string, limit the total amount of strings
  collected by ARG_MAX bytes;
- correctly add '\0' at the end of each copied string;
- fix style.

In linprocfs_doprocenviron():
- unlock the process before calling copyin code [1]. The process is held
  by pseudofs.

In linprocfs_doproccmdline:
- use linprocfs_doargv() to handle !curproc case for which p_args is not cached.

Reported by:		plulnet [1]
Tested by:		pluknet
Approved by:		des (linprocfs maintainer, previous
				version of the patch)
MFC after:		3 weeks
2010-09-28 11:32:17 +00:00
Pawel Jakub Dawidek
15d98d9738 Document recently added GPT attributes (bootme, bootonce, bootfailed) and
list other schemes attributes.

Reviewed by:	simon, rpaulo
MFC after:	2 weeks
2010-09-28 09:07:00 +00:00
David Xu
bbb64c2143 In current code, statically initialized and destroyed object have
same null value, the code can not distinguish between them, to
fix the problem, now a destroyed object is assigned to a non-null
value, and it will be rejected by some pthread functions.
PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP is changed to number 1, so that
adaptive mutex can be statically initialized correctly.
2010-09-28 04:57:56 +00:00
Oleksandr Tymoshenko
02285b4e88 Add GPIO bus to config and hints. Also add sample gpioled device. 2010-09-28 03:34:51 +00:00
Oleksandr Tymoshenko
0dfca27f07 Add AR71XX GPIO bus driver. 2010-09-28 03:31:34 +00:00
Oleksandr Tymoshenko
968ec6a63e Add gpioctl(8). Utility for configuring/accessing GPIO pins 2010-09-28 03:28:20 +00:00
Oleksandr Tymoshenko
6b34b16ea5 Initial GPIO bus support. Includes:
- GPIO bus controller interface
  - GPIO bus interface
  - Implementation of GPIO led(4) compatible device
  - Implementation of iic(4) bus over GPIO (author: Luiz Otavio O Souza)

Tested by: Luiz Otavio O Souza, Alexandr Rybalko
2010-09-28 03:24:53 +00:00
Ed Maste
25e45560da Remove extra braces for style(9) (found while cleaning up an old work tree). 2010-09-28 01:36:01 +00:00
Ed Maste
f657d618ce Increase maximum network timeout from 20s to 120s. Given that an ETIMEDOUT
return from sendrecv probably means a failure to boot we might as well be
generous in the timeout period.
2010-09-28 01:30:49 +00:00
Jack F Vogel
7d9119bdc4 Update code from Intel:
- Sync shared code with Intel internal
	- New client chipset support added
	- em driver - fixes to 82574, limit queues to 1 but use MSIX
	- em driver - large changes in TX checksum offload and tso
	  code, thanks to yongari.
	- some small changes for watchdog issues.
	- igb driver - local timer watchdog code was missing locking
	  this and a couple other watchdog related fixes.
	- bug in rx discard found by Andrew Boyer, check for null pointer

MFC: a week
2010-09-28 00:13:15 +00:00
Pawel Jakub Dawidek
332bbedddd Correct message.
Pointed out by:	jhb
MFC after:	2 weeks
2010-09-27 21:10:37 +00:00
Juli Mallett
62f24c60ef Give devices lots of time to settle around programming BARs and command
registers.  Without this, the settings do not seem to stick for Atheros NICs in
the PCI slot of the Lanner MR-320.
2010-09-27 20:35:40 +00:00
Marius Strobl
7b9a15f73c Use the mii_data provided via mii_attach_args and mii_pdata respectively
instead of reaching out for the softc of the parent.
2010-09-27 20:31:03 +00:00
Juli Mallett
a71199dab4 o) Program the Lanner MR-320 for 32-bit mode, too.
o) Give a virtual address for I/O ports on n64.
o) On the Portwell CAM-0100, return the right IRQ for the on-board SATA.
o) Except on bridges, only set PORTEN and MEMEN on devices that have I/O or
   memory BARs respectively.
o) Disable PORTEN and MEMEN while reprogramming BARs.
o) On the Lanner MR-955, set the Tx DMA power register for the on-board Promise
   SATA controller.
2010-09-27 20:12:57 +00:00
Juli Mallett
9e1bef6f31 Use a single program header to fix loading 64-bit kernels on old versions of
U-Boot.
2010-09-27 19:45:34 +00:00
John Baldwin
1691b62202 Rewrite the i386 memory probe:
- Check for SMAP data from the loader first.  If it exists, don't bother
  doing any VM86 calls at all.  This will be more friendly for non-BIOS
  boot environments such as EFI, etc.
- Move the base memory setup into a new basemem_setup() routine instead
  of duplicating it.
- Simplify the XEN case by removing all of the VM86/SMAP parsing code rather
  than just jumping over it.
- Adjust some comments to better explain the code flow.

MFC after:	2 weeks
2010-09-27 19:36:15 +00:00
Xin LI
64e0f48e7c Add a bandaid for a long-standing race condition during route entry
un-expiring.

The previous version of code have no locking when testing rt_refcnt.
The result of the lack of locking may result in a condition where
a routing entry have a reference count but at the same time have
RTPRF_OURS bit set and an expiration timer.  These would eventually
lead to a panic:

	panic: rtqkill route really not free

When the system have ICMP redirects accepted from local gateway
in a moderate frequency, for instance.

Commit this workaround for now until we have some better solution.

PR:		kern/149804
Reviewed by:	bz
Tested by:	Zhao Xin, Pete French
MFC after:	2 weeks
2010-09-27 19:26:56 +00:00
Dimitry Andric
0d2d8fab68 Add manpages for clang and tblgen. These were generated from upstream's
tools/clang/docs/tools/clang.pod and docs/CommandGuide/tblgen.pod,
respectively.

Approved-by:	rpaulo (mentor)
2010-09-27 19:03:18 +00:00
Jaakko Heinonen
47bcfb6422 Add a new function devfs_dev_exists() to be able to find out if a
specific devfs path already exists.

The function will be used from kern_conf.c to detect duplicate device
registrations. Callers must hold the devmtx mutex.

Reviewed by:	kib
2010-09-27 18:20:56 +00:00
Jaakko Heinonen
d318c565d7 Add reference counting for devfs paths containing user created symbolic
links. The reference counting is needed to be able to determine if a
specific devfs path exists. For true device file paths we can traverse
the cdevp_list but a separate directory list is needed for user created
symbolic links.

Add a new directory entry flag DE_USER to mark entries which should
unreference their parent directory on deletion.

A new function to traverse cdevp_list and the directory list will be
introduced in a separate commit.

Idea from:	kib
Reviewed by:	kib
2010-09-27 17:47:09 +00:00
Bernd Walter
974dd68e5c The TWI controller automatically stops if we don't fill up with new data in
time.
2010-09-27 15:58:19 +00:00
Warner Losh
8f3ec30476 Prefer echo over printf 2010-09-27 15:55:39 +00:00
Bernd Walter
cd93636f3e fix off by one error for twi reads with len != 1.
STOP must be requested before the last byte is received.
2010-09-27 15:55:30 +00:00
Jayachandran C.
da4dad492d XLS B0 revision PCI support and related changes.
- XLS B0 and later revision chips have PCIe link 2 & 3 mapped to different
  PIC interrupts. Update pic.h, board.h and xlr_pci.c to reflect this.
- remove debug prints in xlr_pci.c
- add more processor IDs to board.h, add function xlr_is_xls_b0()
- some style(9) and whitespace fixes
2010-09-27 14:50:51 +00:00
Martin Matuska
aa007a9f0e Properly handle IO with B_FAILFAST
Retry IO once with ZIO_FLAG_TRYHARD before declaring a pool faulted

OpenSolaris revision and Bug IDs:

9725:0bf7402e8022
6843014 ZFS B_FAILFAST handling is broken

Approved by:	delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6843014)
MFC after:	3 weeks
2010-09-27 09:42:31 +00:00
Martin Matuska
96a1a6a568 Enable offlining of log devices.
OpenSolaris revision and Bug IDs:

9701:cc5b64682e64
6803605	should be able to offline log devices
6726045	vdev_deflate_ratio is not set when offlining a log device
6599442	zpool import has faults in the display

Approved by:	delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6803605, 6726045, 6599442)
MFC after:	3 weeks
2010-09-27 09:05:51 +00:00
Marius Strobl
485fc5eb4e - Remove clause 3 and 4 from TNF licenses.
- Remove closes 3 & 4 from Manuel Bouyer's license.

Obtained from:	NetBSD
2010-09-26 22:11:41 +00:00
Andrey V. Elsukov
6259ffb455 Remove superfluous word from "gpart bootcode" usage message.
Approved by:	kib (mentor)
2010-09-26 21:48:32 +00:00
Nathan Whitehorn
a9f035fdd9 Check for NULL link registers as found in initial stack frames when doing
stack unwinding, instead of naively trying to check the instruction at
that location. This fixes signal handling in threaded applications after
recent changes regarding unwinding in libthr. While here, clean up our
MD_FROB_UPDATE_CONTEXT() implementation a little.
2010-09-26 14:20:09 +00:00
Pawel Jakub Dawidek
b71de2e057 Plug memory leak on fork(2) failure.
Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
2010-09-26 10:39:01 +00:00
David Xu
1d5b5089aa Report death event to debugger before moving to gc list, otherwise
debugger may can not find it on thread list.
2010-09-26 06:45:24 +00:00
Ed Maste
f145c771fb Protect the watchdog daemon against swap OOM killer. This is similar to
SVN r199804 which added protection to sshd, cron, syslogd, and inetd.
2010-09-26 01:45:33 +00:00
David Xu
315490e031 Follow r213098, kernel POSIX semaphore module is no longer
needed.
2010-09-26 01:41:53 +00:00
Andrey V. Elsukov
b1da166ef1 Some schemes can allocate memory for internal purposes but when
GEOM does withering this memory doesn't freed. Add G_PART_DESTROY
call to g_part_wither. Also add missed g_free() call to G_PART_READ
method for MBR and PC98 schemes.

Submitted by:	jh (previous version)
Reviewed by:	pjd
Approved by:	kib (mentor)
2010-09-25 18:27:29 +00:00
Pawel Jakub Dawidek
9eecfa1c33 Add some regression tests for newly added -J and -j options.
MFC after:	2 weeks
2010-09-25 17:41:02 +00:00