]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoRename rl_setmulti() to rl_rxfilter() as rl_rxfilter() will handle
Pyun YongHyeon [Thu, 30 Sep 2010 17:37:08 +0000 (17:37 +0000)]
Rename rl_setmulti() to rl_rxfilter() as rl_rxfilter() will handle
IFF_ALLMULTI/IFF_PROMISC as well as multicast filter configuration.
Rewrite RX filter logic to reduce number of register accesses and
make it handle promiscuous/allmulti toggling without controller
reinitialization.

Previously rl(4) counted on controller reinitialization to reprogram
promiscuous configuration but r211767 resulted in avoiding
controller reinitialization whenever promiscuous mode is toggled.
To address this, keep track of driver's view of interface state and
handle IFF_ALLMULTI/IFF_PROMISC changes without reinitializing
controller. This should fix a regression introduced in r211267.

While I'm here remove unnecessary variable reassignment in ioctl
handler.

PR: kern/151079
MFC after: 1 week

13 years agothere must be only one SYSINIT with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY order
Andriy Gapon [Thu, 30 Sep 2010 17:05:23 +0000 (17:05 +0000)]
there must be only one SYSINIT with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY order

SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY should only be used to call
scheduler() function which turns the initial thread into swapper proper
and thus there is no further SYSINIT processing.
Other SYSINITs with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY may get ordered
after scheduler() and thus never executed.  That particular relative
order is semi-arbitrary.

Thus, change such places to use SI_ORDER_MIDDLE.
Also, use SI_ORDER_MIDDLE instead of correct, but less appealing,
SI_ORDER_ANY - 1.

MFC after: 1 week

13 years agodebug.kdb.stop_cpus sysctl: hint that this is also a tunable
Andriy Gapon [Thu, 30 Sep 2010 16:47:01 +0000 (16:47 +0000)]
debug.kdb.stop_cpus sysctl: hint that this is also a tunable

MFC after: 1 week

13 years agokmem_size* sysctls: hint that these are also tunables
Andriy Gapon [Thu, 30 Sep 2010 16:45:27 +0000 (16:45 +0000)]
kmem_size* sysctls: hint that these are also tunables

MFC after: 1 week

13 years agoDo not use regular interrupts on NVidia HPETs. NVidia MCP5x chipsets have
Alexander Motin [Thu, 30 Sep 2010 16:23:01 +0000 (16:23 +0000)]
Do not use regular interrupts on NVidia HPETs. NVidia MCP5x chipsets have
number of unexplained interrupt problems. For some reason, using HPET
interrupts there breaks HDA sound. Legacy route mode interrupts reported
to work fine there.

13 years agoRevert r132291.
Alexander Motin [Thu, 30 Sep 2010 16:09:52 +0000 (16:09 +0000)]
Revert r132291.
Restore setting PIO/WDMA timings for VIA UDMA133 controllers.
Linux disables only AST register writing there, but no all timings.

13 years agoIf an RCS file is truncated, rcsfile_getdelta() will return NULL. Instead
John Baldwin [Thu, 30 Sep 2010 14:28:48 +0000 (14:28 +0000)]
If an RCS file is truncated, rcsfile_getdelta() will return NULL.  Instead
of faulting, check for NULL.  However, returning an error would cause csup
to just abort the entire update.  Instead, break out of the loop and
return ok.  The attempts to update the file will trigger a MD5 failure which
will cause csup to download the entire file as a fixup.

Reviewed by: lulf
MFC after: 1 week

13 years agoFix printing of the "rw" mount option in fstab(5) format (-p option).
Jaakko Heinonen [Thu, 30 Sep 2010 13:31:35 +0000 (13:31 +0000)]
Fix printing of the "rw" mount option in fstab(5) format (-p option).
fstab(5) format requires that one of "rw", "rq" or "ro" is always
specified.

PR: bin/123021
Reviewed by: keramida, rodrigc
MFC after: 2 weeks

13 years agochange code to use unwind.h.
David Xu [Thu, 30 Sep 2010 12:59:56 +0000 (12:59 +0000)]
change code to use unwind.h.

13 years agoRemove target peigen.c so that make doesn't warn us about it.
Rui Paulo [Thu, 30 Sep 2010 07:12:09 +0000 (07:12 +0000)]
Remove target peigen.c so that make doesn't warn us about it.

13 years agoAlso the stop function should accept 64-bit exception class.
David Xu [Thu, 30 Sep 2010 03:16:35 +0000 (03:16 +0000)]
Also the stop function should accept 64-bit exception class.

13 years ago- Sizeof exception class type should always be 64-bit.
David Xu [Thu, 30 Sep 2010 03:09:35 +0000 (03:09 +0000)]
- Sizeof exception class type should always be 64-bit.
- Make some functions be visible to BSD source code.

13 years agoImport unwind.h from libunwind-0.99.
David Xu [Thu, 30 Sep 2010 01:25:54 +0000 (01:25 +0000)]
Import unwind.h from libunwind-0.99.

Approved by: core (kib, rwatson, imp, brooks)

13 years agoAdd advice to new fathers from Thomas Ptacek.
Colin Percival [Wed, 29 Sep 2010 23:47:06 +0000 (23:47 +0000)]
Add advice to new fathers from Thomas Ptacek.

Suggested by: wilko
Approved by: Thomas Ptacek
Security: New parents often feel very insecure.

13 years ago- Fix values of CS1_EN and CS2_EN flags
Oleksandr Tymoshenko [Wed, 29 Sep 2010 23:06:41 +0000 (23:06 +0000)]
- Fix values of CS1_EN and CS2_EN flags
- Unbreak kernel build by fixing naming convention of
    GPIO_FUNC flags

Spotted by: Luiz Otavio O Souza, Andrew Thompson

13 years agoCommit the rest of r213270.
Ed Maste [Wed, 29 Sep 2010 22:59:49 +0000 (22:59 +0000)]
Commit the rest of r213270.

Thanks to Anonymous <swell dot k at gmail.com> for spotting this.

13 years agotr: Fix '[=]=]' equivalence class.
Jilles Tjoelker [Wed, 29 Sep 2010 22:24:18 +0000 (22:24 +0000)]
tr: Fix '[=]=]' equivalence class.

A closing bracket immediately after '[=' should not be treated as special.

Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.

PR: bin/150384
Submitted by: Richard Lowe
MFC after: 2 weeks

13 years agoImplement hardware MAC statistics for BCM5705 or newer Broadcom
Pyun YongHyeon [Wed, 29 Sep 2010 21:56:31 +0000 (21:56 +0000)]
Implement hardware MAC statistics for BCM5705 or newer Broadcom
controllers. bge(4) exported MAC statistics on controllers that
maintain the statistics in the NIC's internal memory. Newer
controllers require register access to fetch these values. These
counters provide useful information to diagnose driver issues.

13 years agoFix bogus error message from bus_dmamem_alloc() about incorrect alignment.
Neel Natu [Wed, 29 Sep 2010 21:53:11 +0000 (21:53 +0000)]
Fix bogus error message from bus_dmamem_alloc() about incorrect alignment.

The check for alignment should be made against the physical address and not
the virtual address that maps it.

Sponsored by: NetApp
Submitted by: Will McGovern (will at netapp dot com)
Reviewed by: mjacob, jhb

13 years agoApply the same workaround for clang to amd64's version of ldexp.c (as in
Dimitry Andric [Wed, 29 Sep 2010 21:20:29 +0000 (21:20 +0000)]
Apply the same workaround for clang to amd64's version of ldexp.c (as in
r212976): order the incoming arguments to fscale as st(0), st(1), and
mark temp2 volatile (only in case of compilation with clang) to force
clang to pop it correctly.  No binary change when compiled with gcc.

This fixes ldexp() when compiled with clang on amd64, which makes
drand48() and friends work correctly again, and this in turn fixes
perl's tempfile().

Reported by: Renato Botelho, Derek Tattersall
Approved by: rpaulo (mentor)

13 years agoAfter r207391, brgphy(4) passes resolved flow-control settings to
Pyun YongHyeon [Wed, 29 Sep 2010 21:19:25 +0000 (21:19 +0000)]
After r207391, brgphy(4) passes resolved flow-control settings to
parent driver. Use that information to configure flow-control.
One drawback is there is no way to disable flow-control as we still
don't have proper way to not advertise RX/TX pause capability to
link partner. But I don't think it would cause severe problems and
users can selectively disable flow-control in switch port.

13 years agoremove an unnecessary (and wrong) assignment.
Luigi Rizzo [Wed, 29 Sep 2010 21:02:31 +0000 (21:02 +0000)]
remove an unnecessary (and wrong) assignment.
It was meant to reset idle_time (and it was not needed),
but i even used the wrong field.

Obtained from: Oleg
MFC after: 3 days

13 years agoAR71XX_GPIO_* defines were introduced by adrian@ a while ago,
Oleksandr Tymoshenko [Wed, 29 Sep 2010 21:01:16 +0000 (21:01 +0000)]
AR71XX_GPIO_* defines were introduced by adrian@ a while ago,
    remove duplicated.

13 years agoFix legal staff in GPIO sources:
Oleksandr Tymoshenko [Wed, 29 Sep 2010 20:53:33 +0000 (20:53 +0000)]
Fix legal staff in GPIO sources:
    - license clause now contains "AUTHOR AND CONTRIBUTORS"
        instead of just "AUTHOR"
    - Add license/copyright to gpioc.c

Spotted by: Edward Tomasz Napierala, Andrew Turner

13 years agoSince local variable 'i' is used only in a KASSERT, declare and
Kirk McKusick [Wed, 29 Sep 2010 14:46:57 +0000 (14:46 +0000)]
Since local variable 'i' is used only in a KASSERT, declare and
initialize it only if INVARIANTS is defined to avoid a declared
but unused warning.

Suggested by: Brian Somers <brian@FreeBSD.org>

13 years agoAdd support for the BFD target efi-app-x86_64.
Rui Paulo [Wed, 29 Sep 2010 14:41:03 +0000 (14:41 +0000)]
Add support for the BFD target efi-app-x86_64.

This uses only GPL2 source code and is a requirement for a 64 bit EFI
boot loader.

13 years agoPreviously, the aac driver did not handle enclosure management AIFs,
Ed Maste [Wed, 29 Sep 2010 14:22:00 +0000 (14:22 +0000)]
Previously, the aac driver did not handle enclosure management AIFs,
which were raised during hot-swap events. Now such events trigger cam
rescans, as is done in the mps driver.

Submitted by: Mark Johnston <mjohnston at sandvine dot com>

13 years agoAccount for unlocking a spin mutex in the lock profiling code in the !SMP
John Baldwin [Wed, 29 Sep 2010 13:24:56 +0000 (13:24 +0000)]
Account for unlocking a spin mutex in the lock profiling code in the !SMP
case.

Submitted by: truckman
MFC after: 3 days

13 years ago/etc/rc.d/defaultroute currently bails immediately if all interfaces
Ed Maste [Wed, 29 Sep 2010 13:08:23 +0000 (13:08 +0000)]
/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@

13 years agoIf rt2560_bbp_init() fails, don't drop the lock as the callers of
John Baldwin [Wed, 29 Sep 2010 11:52:44 +0000 (11:52 +0000)]
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

13 years agowhitespace changes in preparation for future commits
Luigi Rizzo [Wed, 29 Sep 2010 09:40:20 +0000 (09:40 +0000)]
whitespace changes in preparation for future commits

13 years agofix handling of initial credit for an idle pipe.
Luigi Rizzo [Wed, 29 Sep 2010 09:22:12 +0000 (09:22 +0000)]
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

13 years agoFix typo in comment.
Konstantin Belousov [Wed, 29 Sep 2010 07:40:11 +0000 (07:40 +0000)]
Fix typo in comment.

13 years ago- kern_sched_rr_get_interval should return interval for thread 1 in
David Xu [Wed, 29 Sep 2010 07:31:05 +0000 (07:31 +0000)]
- kern_sched_rr_get_interval should return interval for thread 1 in
  target process.
- eliminate a goto.

MFC after: 1 week

13 years agoCheck invalid mutex in _mutex_cv_unlock.
David Xu [Wed, 29 Sep 2010 06:06:58 +0000 (06:06 +0000)]
Check invalid mutex in _mutex_cv_unlock.

13 years agoRemove a redundant instruction for casuword.
David Xu [Wed, 29 Sep 2010 02:36:58 +0000 (02:36 +0000)]
Remove a redundant instruction for casuword.

13 years agoSet the number of RX frames to receive after RX MBUF low watermark
Pyun YongHyeon [Wed, 29 Sep 2010 00:00:45 +0000 (00:00 +0000)]
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

13 years agofix breakage in in-kernel NAT: the code did not honor
Luigi Rizzo [Tue, 28 Sep 2010 23:23:23 +0000 (23:23 +0000)]
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

13 years agoWhitespace changes to reduce diffs wrt the most recent ipfw/dummynet code:
Luigi Rizzo [Tue, 28 Sep 2010 22:46:13 +0000 (22:46 +0000)]
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

13 years agouse make from the toolchain, as the source tree may depend on
Luigi Rizzo [Tue, 28 Sep 2010 22:30:11 +0000 (22:30 +0000)]
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

13 years agofix outdated comment
Bernd Walter [Tue, 28 Sep 2010 21:13:54 +0000 (21:13 +0000)]
fix outdated comment

13 years agoRemove copyright strings printed at login time via login(1) or sshd(8).
Ed Maste [Tue, 28 Sep 2010 20:57:14 +0000 (20:57 +0000)]
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)

13 years agoThis file has been unused for ages. Retire it.
Warner Losh [Tue, 28 Sep 2010 15:33:30 +0000 (15:33 +0000)]
This file has been unused for ages.  Retire it.

Submitted by: pluknet

13 years agoIn linprocfs_doargv():
Konstantin Belousov [Tue, 28 Sep 2010 11:32:17 +0000 (11:32 +0000)]
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

13 years agoDocument recently added GPT attributes (bootme, bootonce, bootfailed) and
Pawel Jakub Dawidek [Tue, 28 Sep 2010 09:07:00 +0000 (09:07 +0000)]
Document recently added GPT attributes (bootme, bootonce, bootfailed) and
list other schemes attributes.

Reviewed by: simon, rpaulo
MFC after: 2 weeks

13 years agoIn current code, statically initialized and destroyed object have
David Xu [Tue, 28 Sep 2010 04:57:56 +0000 (04:57 +0000)]
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.

13 years agoAdd GPIO bus to config and hints. Also add sample gpioled device.
Oleksandr Tymoshenko [Tue, 28 Sep 2010 03:34:51 +0000 (03:34 +0000)]
Add GPIO bus to config and hints. Also add sample gpioled device.

13 years agoAdd AR71XX GPIO bus driver.
Oleksandr Tymoshenko [Tue, 28 Sep 2010 03:31:34 +0000 (03:31 +0000)]
Add AR71XX GPIO bus driver.

13 years agoAdd gpioctl(8). Utility for configuring/accessing GPIO pins
Oleksandr Tymoshenko [Tue, 28 Sep 2010 03:28:20 +0000 (03:28 +0000)]
Add gpioctl(8). Utility for configuring/accessing GPIO pins

13 years agoInitial GPIO bus support. Includes:
Oleksandr Tymoshenko [Tue, 28 Sep 2010 03:24:53 +0000 (03:24 +0000)]
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

13 years agoRemove extra braces for style(9) (found while cleaning up an old work tree).
Ed Maste [Tue, 28 Sep 2010 01:36:01 +0000 (01:36 +0000)]
Remove extra braces for style(9) (found while cleaning up an old work tree).

13 years agoIncrease maximum network timeout from 20s to 120s. Given that an ETIMEDOUT
Ed Maste [Tue, 28 Sep 2010 01:30:49 +0000 (01:30 +0000)]
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.

13 years agoUpdate code from Intel:
Jack F Vogel [Tue, 28 Sep 2010 00:13:15 +0000 (00:13 +0000)]
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

13 years agoCorrect message.
Pawel Jakub Dawidek [Mon, 27 Sep 2010 21:10:37 +0000 (21:10 +0000)]
Correct message.

Pointed out by: jhb
MFC after: 2 weeks

13 years agoGive devices lots of time to settle around programming BARs and command
Juli Mallett [Mon, 27 Sep 2010 20:35:40 +0000 (20:35 +0000)]
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.

13 years agoUse the mii_data provided via mii_attach_args and mii_pdata respectively
Marius Strobl [Mon, 27 Sep 2010 20:31:03 +0000 (20:31 +0000)]
Use the mii_data provided via mii_attach_args and mii_pdata respectively
instead of reaching out for the softc of the parent.

13 years agoo) Program the Lanner MR-320 for 32-bit mode, too.
Juli Mallett [Mon, 27 Sep 2010 20:12:57 +0000 (20:12 +0000)]
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.

13 years agoUse a single program header to fix loading 64-bit kernels on old versions of
Juli Mallett [Mon, 27 Sep 2010 19:45:34 +0000 (19:45 +0000)]
Use a single program header to fix loading 64-bit kernels on old versions of
U-Boot.

13 years agoRewrite the i386 memory probe:
John Baldwin [Mon, 27 Sep 2010 19:36:15 +0000 (19:36 +0000)]
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

13 years agoAdd a bandaid for a long-standing race condition during route entry
Xin LI [Mon, 27 Sep 2010 19:26:56 +0000 (19:26 +0000)]
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

13 years agoAdd manpages for clang and tblgen. These were generated from upstream's
Dimitry Andric [Mon, 27 Sep 2010 19:03:18 +0000 (19:03 +0000)]
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)

13 years agoAdd a new function devfs_dev_exists() to be able to find out if a
Jaakko Heinonen [Mon, 27 Sep 2010 18:20:56 +0000 (18:20 +0000)]
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

13 years agoAdd reference counting for devfs paths containing user created symbolic
Jaakko Heinonen [Mon, 27 Sep 2010 17:47:09 +0000 (17:47 +0000)]
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

13 years agoThe TWI controller automatically stops if we don't fill up with new data in
Bernd Walter [Mon, 27 Sep 2010 15:58:19 +0000 (15:58 +0000)]
The TWI controller automatically stops if we don't fill up with new data in
time.

13 years agoPrefer echo over printf
Warner Losh [Mon, 27 Sep 2010 15:55:39 +0000 (15:55 +0000)]
Prefer echo over printf

13 years agofix off by one error for twi reads with len != 1.
Bernd Walter [Mon, 27 Sep 2010 15:55:30 +0000 (15:55 +0000)]
fix off by one error for twi reads with len != 1.
STOP must be requested before the last byte is received.

13 years agoXLS B0 revision PCI support and related changes.
Jayachandran C. [Mon, 27 Sep 2010 14:50:51 +0000 (14:50 +0000)]
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

13 years agoProperly handle IO with B_FAILFAST
Martin Matuska [Mon, 27 Sep 2010 09:42:31 +0000 (09:42 +0000)]
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

13 years agoEnable offlining of log devices.
Martin Matuska [Mon, 27 Sep 2010 09:05:51 +0000 (09:05 +0000)]
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 680360567260456599442)
MFC after: 3 weeks

13 years ago- Remove clause 3 and 4 from TNF licenses.
Marius Strobl [Sun, 26 Sep 2010 22:11:41 +0000 (22:11 +0000)]
- Remove clause 3 and 4 from TNF licenses.
- Remove closes 3 & 4 from Manuel Bouyer's license.

Obtained from: NetBSD

13 years agoRemove superfluous word from "gpart bootcode" usage message.
Andrey V. Elsukov [Sun, 26 Sep 2010 21:48:32 +0000 (21:48 +0000)]
Remove superfluous word from "gpart bootcode" usage message.

Approved by: kib (mentor)

13 years agoCheck for NULL link registers as found in initial stack frames when doing
Nathan Whitehorn [Sun, 26 Sep 2010 14:20:09 +0000 (14:20 +0000)]
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.

13 years agoPlug memory leak on fork(2) failure.
Pawel Jakub Dawidek [Sun, 26 Sep 2010 10:39:01 +0000 (10:39 +0000)]
Plug memory leak on fork(2) failure.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days

13 years agoReport death event to debugger before moving to gc list, otherwise
David Xu [Sun, 26 Sep 2010 06:45:24 +0000 (06:45 +0000)]
Report death event to debugger before moving to gc list, otherwise
debugger may can not find it on thread list.

13 years agoProtect the watchdog daemon against swap OOM killer. This is similar to
Ed Maste [Sun, 26 Sep 2010 01:45:33 +0000 (01:45 +0000)]
Protect the watchdog daemon against swap OOM killer.  This is similar to
SVN r199804 which added protection to sshd, cron, syslogd, and inetd.

13 years agoFollow r213098, kernel POSIX semaphore module is no longer
David Xu [Sun, 26 Sep 2010 01:41:53 +0000 (01:41 +0000)]
Follow r213098, kernel POSIX semaphore module is no longer
needed.

13 years agoSome schemes can allocate memory for internal purposes but when
Andrey V. Elsukov [Sat, 25 Sep 2010 18:27:29 +0000 (18:27 +0000)]
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)

13 years agoAdd some regression tests for newly added -J and -j options.
Pawel Jakub Dawidek [Sat, 25 Sep 2010 17:41:02 +0000 (17:41 +0000)]
Add some regression tests for newly added -J and -j options.

MFC after: 2 weeks

13 years ago- Add support for loading passphrase from a file (-J and -j options).
Pawel Jakub Dawidek [Sat, 25 Sep 2010 17:38:57 +0000 (17:38 +0000)]
- Add support for loading passphrase from a file (-J and -j options).
  This is especially useful for things like installers, where regular
  geli prompt can't be used.
- Add support for specifing multiple -K or -k options, so there is no
  need to cat all keyfiles and read them from standard input.

Requested by: Kris Moore <kris@pcbsd.org>, thompsa
MFC after: 2 weeks

13 years agoDon't hardcode md0 in message, use $md instead.
Pawel Jakub Dawidek [Sat, 25 Sep 2010 15:37:41 +0000 (15:37 +0000)]
Don't hardcode md0 in message, use $md instead.

Reported by: Ronald Klop <ronald-freebsd8@klop.yi.org>

13 years agoDon't leave zombies behind.
Edward Tomasz Napierala [Sat, 25 Sep 2010 14:54:31 +0000 (14:54 +0000)]
Don't leave zombies behind.

13 years agoAdd a shell script to generate a test script for trivial ACLs.
Edward Tomasz Napierala [Sat, 25 Sep 2010 14:33:35 +0000 (14:33 +0000)]
Add a shell script to generate a test script for trivial ACLs.

13 years agoUpdate regression tests after AES-XTS addition.
Pawel Jakub Dawidek [Sat, 25 Sep 2010 10:34:42 +0000 (10:34 +0000)]
Update regression tests after AES-XTS addition.

MFC after: 2 weeks

13 years ago- Use $md instead of md0, which fixes tests when md(4) device is already
Pawel Jakub Dawidek [Sat, 25 Sep 2010 10:34:11 +0000 (10:34 +0000)]
- Use $md instead of md0, which fixes tests when md(4) device is already
  present.
- Correct message - we create GPT, not MBR.

MFC after: 2 weeks

13 years agoFix two copy&paste bugs.
Pawel Jakub Dawidek [Sat, 25 Sep 2010 10:32:52 +0000 (10:32 +0000)]
Fix two copy&paste bugs.

MFC after: 2 weeks

13 years agoChange g_eli_debug to int, so one can turn off any GELI output by setting
Pawel Jakub Dawidek [Sat, 25 Sep 2010 10:32:04 +0000 (10:32 +0000)]
Change g_eli_debug to int, so one can turn off any GELI output by setting
kern.geom.eli.debug sysctl to -1.

MFC after: 2 weeks

13 years agoIgnore errors from BIO_FLUSH. It might confuse users that provider wasn't
Pawel Jakub Dawidek [Sat, 25 Sep 2010 10:31:05 +0000 (10:31 +0000)]
Ignore errors from BIO_FLUSH. It might confuse users that provider wasn't
really killed. What we really care about are write errors only.

MFC after: 2 weeks

13 years agoOnly access unwind_disabled when _PTHREAD_FORCED_UNWIND is defined.
David Xu [Sat, 25 Sep 2010 09:43:24 +0000 (09:43 +0000)]
Only access unwind_disabled when _PTHREAD_FORCED_UNWIND is defined.

13 years agoLog the number of segments currently in the reassembly queue.
Lawrence Stewart [Sat, 25 Sep 2010 09:16:46 +0000 (09:16 +0000)]
Log the number of segments currently in the reassembly queue.

Sponsored by: FreeBSD Foundation

13 years agoAdd missing field.
David Xu [Sat, 25 Sep 2010 08:36:46 +0000 (08:36 +0000)]
Add missing field.

13 years agoAdd Planex UE-200TX-G2 to list of supported devices.
MIHIRA Sanpei Yoshiro [Sat, 25 Sep 2010 08:19:34 +0000 (08:19 +0000)]
Add Planex UE-200TX-G2 to list of supported devices.

MFC after: 1 day

13 years agoBecause old _pthread_cleanup_push/pop do not have frame address,
David Xu [Sat, 25 Sep 2010 06:27:09 +0000 (06:27 +0000)]
Because old _pthread_cleanup_push/pop do not have frame address,
it is incompatible with stack unwinding code, if they are invoked,
disable stack unwinding for current thread, and when thread is
exiting, print a warning message.

13 years agoInternalise reassembly queue related functionality and variables which should
Lawrence Stewart [Sat, 25 Sep 2010 04:58:46 +0000 (04:58 +0000)]
Internalise reassembly queue related functionality and variables which should
not be used outside of the reassembly queue implementation. Provide a new
function to flush all segments from a reassembly queue and call it from the
appropriate places instead of manipulating the queue directly.

Sponsored by: FreeBSD Foundation
Reviewed by: andre, gnn, rpaulo
MFC after: 2 weeks

13 years agoRemove clauses 3 and 4, per changes to NetBSD versions of these files.
Warner Losh [Sat, 25 Sep 2010 04:41:42 +0000 (04:41 +0000)]
Remove clauses 3 and 4, per changes to NetBSD versions of these files.

13 years agoo) Send mbufs to BPF listeners from within cvm_oct_xmit().
Juli Mallett [Sat, 25 Sep 2010 04:39:12 +0000 (04:39 +0000)]
o) Send mbufs to BPF listeners from within cvm_oct_xmit().
o) Pin receive threads when they're running since we do access some core-local
   resources.

13 years agoAdd test cases for stack unwinding.
David Xu [Sat, 25 Sep 2010 04:26:40 +0000 (04:26 +0000)]
Add test cases for stack unwinding.

13 years agoSimplify code, and in while loop, fix operator to match the unwinding
David Xu [Sat, 25 Sep 2010 04:21:31 +0000 (04:21 +0000)]
Simplify code, and in while loop, fix operator to match the unwinding
direction.

13 years agoTo support stack unwinding for cancellation points, add -fexceptions flag
David Xu [Sat, 25 Sep 2010 01:57:47 +0000 (01:57 +0000)]
To support stack unwinding for cancellation points, add -fexceptions flag
for them, two functions _pthread_cancel_enter and _pthread_cancel_leave
are added to let thread enter and leave a cancellation point, it also
makes it possible that other functions can be cancellation points in
libraries without having to be rewritten in libthr.

13 years agoHandle link updates in a task.
Juli Mallett [Sat, 25 Sep 2010 01:18:01 +0000 (01:18 +0000)]
Handle link updates in a task.

13 years agoTake mpt_req_on_{free,pending}_list() out from under INVARIANTS as these
Marius Strobl [Fri, 24 Sep 2010 23:54:03 +0000 (23:54 +0000)]
Take mpt_req_on_{free,pending}_list() out from under INVARIANTS as these
are generally useful and not just for debugging.