Michael Neumann [Sat, 2 Oct 2010 13:55:56 +0000 (15:55 +0200)]
Save EBDA address before mp_probe()
Apply commit
1876681aa52fc75e5ac4945d4e316b2bff8b2aed for x86_64.
Michael Neumann [Sat, 2 Oct 2010 13:49:45 +0000 (15:49 +0200)]
mptable_pass1: Don't set ncpus to 1; it has already been setup.
Apply commit
bcf5ecdc02ba0af44b1d9b635393a27234d67b27 for x86_64.
Michael Neumann [Sat, 2 Oct 2010 13:47:23 +0000 (15:47 +0200)]
Remove mp_capable; mp_enable() uses cpu_apic_address.
Apply commit
50bc991ed5b5f45c656530ebf5fc8b44f24258ed for x86_64.
Michael Neumann [Sat, 2 Oct 2010 13:40:59 +0000 (15:40 +0200)]
Defer LAPIC checking from pmap_bootstrap() to mp_enable()
Similar to commit
8b5fcfe2eabb8f50c8211d71788097cd4bfd98ba
Alex Hornung [Wed, 22 Sep 2010 10:55:48 +0000 (11:55 +0100)]
un-tokenize savers
* Un-tokenize all savers again. We can't simply tokenize around vidsw[]
that easily because the saver functions are called from the console
paths, too (cnputc, ...)
* Regarding vidsw we'll eventually have to find a different solution to
lock it up. The current approach can't work.
Reported-by: Sascha Wildner (swildner@)
Sascha Wildner [Tue, 21 Sep 2010 21:19:24 +0000 (23:19 +0200)]
installer: Remove some unused code.
Sascha Wildner [Wed, 22 Sep 2010 09:56:06 +0000 (11:56 +0200)]
Move test/debug/gdb.kernel to share/misc/gdbinit.
The main reason is that crashinfo(8) was previously searching for
this script in /usr/src because it wasn't installed in the system.
This led to two little problems. First, if you didn't have source
in /usr/src, the core.xy.txt file wouldn't have all the information.
Second, if you had source in /usr/src but it was outdated and didn't
have all the commands that crashinfo(8) required, you would get
unwanted errors in core.xy.txt.
Therefore, put the file in share/misc from where it will get
installed and where other initialization files such as indent.pro
also reside. The user can then copy it to ~/.gdbinit as he likes.
Matthew Dillon [Wed, 22 Sep 2010 07:09:31 +0000 (00:09 -0700)]
network - Fix PF mis-handling and other bugs
* Header file changes for last PF commit.
Matthew Dillon [Wed, 22 Sep 2010 07:01:08 +0000 (00:01 -0700)]
network - Fix PF mis-handling and other bugs
* The mbuf subsystem does NOT clear pkthdr.pf.* fields on mbuf allocation.
PF was assuming that pf.flags was being cleared. Instead move the
PF_TAG_GENERATED flag from pf.flags to fw_flags and call it PF_MBUF_TAGGED.
The fw_flags field is cleared by the mbuf subsystem.
Then clear pf.flags whenever we set PF_MBUF_TAGGED or determine that it
has not been set.
This fixes a serious bug where the PF filters start missing packets,
increasing from system boot. This is because more and more packets in
the objcache wind up with non-zero pf.flags which cause PF to pass
the packet unconditionally.
For example NAT packets would wind up in the normal protocol stack which
would of course would get confused and generate a RST.
* Move the 'cur' static pointer in pf_purge_expired_states() up a bit
so pf_free_state() can access it and rename it 'purge_cur'.
Adjust pf_free_state() to iterate purge_cur when it matches the state
being destroyed.
* Protect the pf_purge_thread() with pf_token, it was depending on the MP
lock before which definitely does not do the job.
* Flag the pfil hook as being MPSAFE.
Reported-by: "Jan Lentfer" <Jan.Lentfer@web.de>
Venkatesh Srinivas [Tue, 21 Sep 2010 04:59:48 +0000 (21:59 -0700)]
libc - nmalloc: Continue in a do/while(0) loop exits the loop, making the mtmagazine routines not use the previous magazine.
Also handle null return from _vmem_alloc in burst allocation path.
Found-by: dillon
Michael Neumann [Mon, 20 Sep 2010 22:56:57 +0000 (00:56 +0200)]
boot: Remove duplicate optcd kernel
Peter Avalos [Mon, 20 Sep 2010 22:02:47 +0000 (12:02 -1000)]
Merge branch 'master' of /home/www-data/gitweb/dragonfly
Sascha Wildner [Mon, 20 Sep 2010 21:56:57 +0000 (23:56 +0200)]
Remove an include file (leftover from the iic upgrade).
Peter Avalos [Mon, 20 Sep 2010 21:35:14 +0000 (11:35 -1000)]
Merge branch 'vendor/BZIP'
Peter Avalos [Mon, 20 Sep 2010 21:34:25 +0000 (11:34 -1000)]
Import bzip2-1.0.6 which fixes CVE-2010-0405.
Peter Avalos [Mon, 20 Sep 2010 21:25:15 +0000 (11:25 -1000)]
bzip2: Remove tests from Makefile.
The files were already removed 5 years ago, so the test target would
have never worked.
Peter Avalos [Mon, 20 Sep 2010 21:22:15 +0000 (11:22 -1000)]
Merge branch 'vendor/BZIP'
Peter Avalos [Mon, 20 Sep 2010 21:11:30 +0000 (11:11 -1000)]
Unversion the contrib/bzip2/ directory.
Peter Avalos [Mon, 20 Sep 2010 21:03:42 +0000 (11:03 -1000)]
bzip2: Remove regression tests.
These were removed on master years ago, but never removed from the
vendor branch.
Sascha Wildner [Mon, 20 Sep 2010 20:10:14 +0000 (22:10 +0200)]
altq(4): Oops, actually remove the #ident (forgot in last commit).
Sascha Wildner [Mon, 20 Sep 2010 20:01:57 +0000 (22:01 +0200)]
kernel: Fix some operator precedence bugs.
Sascha Wildner [Mon, 20 Sep 2010 20:00:21 +0000 (22:00 +0200)]
nfs(4): ERROROUT already assigns error.
Sascha Wildner [Mon, 20 Sep 2010 18:38:52 +0000 (20:38 +0200)]
kernel: Remove some #ident.
Matthew Dillon [Mon, 20 Sep 2010 19:54:43 +0000 (12:54 -0700)]
network - Increase MSIZE to 512
* The basic problem with 384 is that kmalloc() may hand back a buffer
which crosses a page boundary, which gums up the DMA engines for
numerous drivers. Many drivers can only handle one segment per
mbuf and even those that can handle more sometimes have fairly low
segment count limits.
Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
Joe Talbott [Fri, 17 Sep 2010 01:30:44 +0000 (21:30 -0400)]
wpi - Fix some race conditions in variable initializers.
Matthew Dillon [Mon, 20 Sep 2010 16:57:16 +0000 (09:57 -0700)]
kernel - Remove mistaken commit of SATA PM spec pdf
Matthew Dillon [Mon, 20 Sep 2010 15:55:55 +0000 (08:55 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Antonio Huete Jimenez [Sun, 19 Sep 2010 11:03:05 +0000 (13:03 +0200)]
truss - Add functions for x86_64 architecture.
Taken-from: FreeBSD
Antonio Huete Jimenez [Sun, 19 Sep 2010 00:44:12 +0000 (02:44 +0200)]
truss - Group some globals into a struct.
Taken-from: FreeBSD
Antonio Huete Jimenez [Tue, 14 Sep 2010 22:42:28 +0000 (00:42 +0200)]
truss - Adapt to the new ELF naming.
Antonio Huete Jimenez [Sun, 5 Sep 2010 18:45:53 +0000 (20:45 +0200)]
elf - Fill sv_name with the appropiate value for each arch.
Michael Neumann [Mon, 20 Sep 2010 13:27:03 +0000 (15:27 +0200)]
rc: Fix startup scripts when command_interpreter is used
Correct the behaviour when using command_interpreter in
rc.d scripts where the proctitle of ps does not include
the full interpreter path, but for example just "perl: ..."
instead of "/usr/pkg/bin/perl -flags ...".
With this patch, the /etc/rc.d/postgrey stop/status script
of pkgsrc package mail/postgrey works. Other packages seem
to not use command_interpreter at all.
Michael Neumann [Mon, 20 Sep 2010 13:19:30 +0000 (15:19 +0200)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Mon, 20 Sep 2010 13:11:43 +0000 (15:11 +0200)]
boot: Minor loader prompt fix
When escaping to the loader prompt and typing "load", the
loader was not able to find the "acpi" and other modules
enabled by default. Now it does.
Discussed-with: dillon
Sascha Wildner [Mon, 20 Sep 2010 11:39:57 +0000 (13:39 +0200)]
Revert "gcc41: Remove __DragonFly_cc_version from the spec (no longer needed)."
This reverts commit
d7d1ed63ea30a9779ecddd4fc91be4052849051f.
We do not want to break building older source (2.6 e.g.) with a current gcc41.
Sascha Wildner [Mon, 20 Sep 2010 11:31:30 +0000 (13:31 +0200)]
gcc41: Remove __DragonFly_cc_version from the spec (no longer needed).
Sascha Wildner [Mon, 20 Sep 2010 11:30:27 +0000 (13:30 +0200)]
firewire(4): Fix a gcc44 build error.
Use __DragonFly_version, just like FreeBSD uses __FreeBSD_version.
Reported-by: vsrinivas
Matthias Schmidt [Mon, 20 Sep 2010 08:59:36 +0000 (10:59 +0200)]
dma - Cast correctly to uintmax_t when using %PRIxMAX
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Mon, 20 Sep 2010 08:51:24 +0000 (10:51 +0200)]
dma - Randomize the retry timeouts a bit
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Mon, 20 Sep 2010 08:50:25 +0000 (10:50 +0200)]
dma - Fix a crash when the SMTP server does not support STARTTLS
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Mon, 20 Sep 2010 08:35:13 +0000 (10:35 +0200)]
dma - Honor LDFLAGS if specified in the environment
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Mon, 20 Sep 2010 08:34:12 +0000 (10:34 +0200)]
dma - Check the parsed recipient address for validity
Author: Peter Pentchev <roam@ringlet.net>
Matthew Dillon [Sun, 19 Sep 2010 19:58:19 +0000 (12:58 -0700)]
boot - Automatically cd into /boot/kernel when escaping to loader prompt
* Automatically place ourselves in the default kernel directory when
escaping to the loader prompt to make things more convenient for the
user.
Submitted-by: Michael Neumann <mneumann@ntecs.de>
Matthew Dillon [Sun, 19 Sep 2010 17:24:26 +0000 (10:24 -0700)]
kernel - Report more AHCI revs in the switch
* Add some more AHCI revs to the switch so it doesn't report
'Uknown revision'. This is purely cosmetic.
Reported-by: "Edward O'Callaghan" <eocallaghan@auroraux.org>
Matthew Dillon [Sun, 19 Sep 2010 17:11:51 +0000 (10:11 -0700)]
acpi - Fix for issue1846
* Bring in a fix for the "ec" panic on boot issue from acpica-unix-
20100806.
Submitted-by: "Edward O'Callaghan" <eocallaghan@auroraux.org>
Matthew Dillon [Sun, 19 Sep 2010 16:43:09 +0000 (09:43 -0700)]
kernel - Correct bug in malloc_type ks_memuse/ks_inuse management
* The new kfree() was improperly adjust ks_memuse/ks_inuse for the wrong
cpu, leading to MP races which could cause the memory statistics to go
negative and trigger a panic.
* When calculating loosememuse it is possible to race another cpu and
come up with an incorrect value. The race itself is ok, loosememuse
is not supposed to be 100% deterministic, but even so do not allow
the value to underflow or we will wind up asserting.
Matthew Dillon [Sun, 19 Sep 2010 15:56:06 +0000 (08:56 -0700)]
build - Minor build issues
* Bring test/debug/vnodeinfo.c up-to-date.
* Adjust test/vkernel/Makefile to properly copy the kernel from the new
boot location ($root/boot/kernel/kernel).
Matthew Dillon [Sun, 19 Sep 2010 15:54:37 +0000 (08:54 -0700)]
kernel - cleanup and some KTR work for x86_64
* Make the KTR option compile for x86_64 builds. It's very expensive still
and not recommended due to the way x86_64 handles va_args.
* On the userland side do not attempt vprintf the va_args yet in the
ktrdump code, right now it just crashes.
* Cleanup some kprintfs
Matthew Dillon [Sun, 19 Sep 2010 15:52:04 +0000 (08:52 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Sascha Wildner [Sun, 19 Sep 2010 15:47:50 +0000 (17:47 +0200)]
ips.4: Use the correct section number.
Sascha Wildner [Sun, 19 Sep 2010 15:47:32 +0000 (17:47 +0200)]
udevd.8: Fix .Dd
Sascha Wildner [Sun, 19 Sep 2010 15:47:06 +0000 (17:47 +0200)]
mutex.9: Fix typos in two function names.
Matthew Dillon [Sun, 19 Sep 2010 15:36:16 +0000 (08:36 -0700)]
kernel - Attempt to fix two out-of-order read MP races
* Example of issue during buildworld -j 8 loop tests, cc1 occassionally
fails after upwards of a trillion instructions worth of testing:
Sep 18 07:11:58 test29 kernel: seg-fault accessing address 0
rip=0x584ef7 pid=30229 p_comm=cc1
In this example gdb'ing cc1 and examining the code revealed an impossible
crash case where off(%ebx) was deterministically accessed a few
instructions before, then accessed again and somehow %ebx had become zero.
Unfortunately I could find no smoking gun, but my conjecture is that it
is a MP race which can occur when the thread migrates between cpus and/or
a mis-handled IPI.
* In the LWKT messaging code move the cpu_mfence() call in the sequence,
from rindex->read_args->MFENCE->call to rindex->MFENCE->read_args->call.
* In the LWKT thread acquisition code (for thread migration between cpus),
add a cpu_mfence() call after the td_flags check indicates success,
instead of inside the loop where we are waiting for the flags check to
indicate success.
* In both cases the issue seems to be out-of-order reads and/or speculative
reads. Even though MP writes are well ordered on Intel/AMD systems reads
are not. In the case of the IPIQ FIFO the data related to the arguments
can be ordered ahead of the read of the FIFO rindex and thus wind up being
stale relative to the other CPU writing the entry. Moving the mfence
ensures that the args stored in the FIFO are not accessed until after
the rindex is read.
For the thread aquisition code access to and manipulation of the thread
td_allq might be based on stale out-of-order reads prior to the
determination that the thread completed its move.
This can be a problem because several mechanisms in DragonFly are able
to operate without even having to use locked bus cycle. The IPIQ, thread
migration, and kern/sys_pipe.c being the best examples, so the natural
barrier provided by the locked bus-cycle instruction is not necessarily
present.
Sascha Wildner [Sun, 19 Sep 2010 11:24:11 +0000 (13:24 +0200)]
Fix UP kernel build.
Sascha Wildner [Sun, 19 Sep 2010 09:05:22 +0000 (11:05 +0200)]
installer: Allow for tmpfs (instead of mfs) partition creation.
The installer allowed (though only in UFS "expert mode") to add mfs-backed
partitions. Change all this to tmpfs as well.
Sascha Wildner [Sat, 18 Sep 2010 20:54:46 +0000 (22:54 +0200)]
installer: Remove unused code to run memtest and create a memtest86 floppy.
Sascha Wildner [Sat, 18 Sep 2010 17:05:42 +0000 (19:05 +0200)]
installer: Remove unused code to update /usr/src with cvsup.
Sascha Wildner [Sun, 19 Sep 2010 00:28:42 +0000 (02:28 +0200)]
Fix various bugs due to the mis-usage of && and ||.
Matthew Dillon [Sat, 18 Sep 2010 23:29:03 +0000 (16:29 -0700)]
network - Fix MP races in udp6_input and inet6 in general
* Numerous appends to the so_rcv sockbuf needed to be protected
by the so_rcv token.
Reported-by: Peter Avalos <pavalos@crater.dragonflybsd.org>
Sascha Wildner [Sat, 18 Sep 2010 22:11:13 +0000 (00:11 +0200)]
Switch our LiveCD/DVD to using tmpfs instead of mfs.
Sascha Wildner [Sat, 18 Sep 2010 22:08:54 +0000 (00:08 +0200)]
mount_tmpfs(8): Add a -C option modeled after mount_mfs(8)'s -C option.
It will copy the contents of the underlying mount point directory into
the tmpfs mount.
Matthew Dillon [Sat, 18 Sep 2010 21:57:02 +0000 (14:57 -0700)]
network - Remove debugging kprintfs
* Remove some console spam
Matthew Dillon [Sat, 18 Sep 2010 20:23:41 +0000 (13:23 -0700)]
kernel - Optimize kfree() to greatly reduce IPI traffic
* Instead of IPIing the chunk being freed to the originating cpu we
use atomic ops to directly link the chunk onto the target slab.
We then notify the target cpu via an IPI message only in the case where
we believe the slab has to be entered back onto the target cpu's
ZoneAry.
This reduces the IPI messaging load by a factor of 100x or more.
kfree() sends virtually no IPIs any more.
* Move malloc_type accounting to the cpu issuing the kmalloc or kfree
(kfree used to forward the accounting to the target cpu). The
accounting is done using the per-cpu malloc_type accounting array
so large deltas will likely accumulate, but they should all cancel
out properly in the summation.
* Use the kmemusage array and kup->ku_pagecnt to track whether a
SLAB is active or not, which allows the handler for the asynchronous IPI
to validate that the SLAB still exists before trying to access it.
This is necessary because once the cpu doing the kfree() successfully
links the chunk into z_RChunks, the target slab can get ripped out
from under it by the owning cpu.
* The special cpu-competing linked list is different from the linked list
normally used to find free chunks, so the localized code and the
MP code is segregated.
We pay special attention to list ordering to try to avoid unnecessary
cache mastership changes, though it should be noted that the c_Next
link field in the chunk creates an issue no matter what we do.
A 100% lockless algorithm is used. atomic_cmpset_ptr() is used
to manage the z_RChunks singly-linked list.
* Remove the page localization code for now. For the life of the
typically chunk of memory I don't think this provided much of
an advantage.
Prodded-by: Venkatesh Srinivas
Sascha Wildner [Sat, 18 Sep 2010 18:32:38 +0000 (20:32 +0200)]
kernel: Remove #include <sys/mutex.h> if <sys/mutex2.h> is included too.
Sascha Wildner [Sat, 18 Sep 2010 18:06:33 +0000 (20:06 +0200)]
newfs(8): Remove some leftover defines that are no longer used.
Sascha Wildner [Sat, 18 Sep 2010 10:05:25 +0000 (12:05 +0200)]
Fix some synopses in various manual pages.
Matthew Dillon [Sat, 18 Sep 2010 00:56:27 +0000 (17:56 -0700)]
network - Correct bug in last commit
* Fix a crit_enter() that had to be removed.
Reported-by: YONETANI Tomokazu <qhwt.dfly@les.ath.cx>
Matthew Dillon [Fri, 17 Sep 2010 23:38:37 +0000 (16:38 -0700)]
network - Remove crit_exit/crit_enter wrappers in pf.c
* Note I'm talking about exit/enter wrappers, not enter/exit wrappers.
I believe the enter/exit wrappers can be removed too but for now
we have to remove the exit/enter wrappers which assumed a critical
section would be held on entry.
This is no longer the case. Since so much of the network stack is
now threaded callers into PF are not necessarily holding a critical
section to exit out of.
Reported-by: lentferj, Rumko
Matthew Dillon [Fri, 17 Sep 2010 22:29:22 +0000 (15:29 -0700)]
network - Zero out m_len / m_pkthdr.len in m_get*() and friends
* Newly allocated mbufs now set m_len and (if a packet header)
m_pkthdr.len to 0 instead of leaving them uninitialized,
allowing us to assert that the mbuf does not have an overrun
later when it is freed.
Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
YONETANI Tomokazu [Fri, 17 Sep 2010 12:03:04 +0000 (21:03 +0900)]
ips - missing part from
667d31bb
Without this change, the added strings are never used.
Noticed-by: Sascha Wildner (via DragonFly BSD Digest)
Antonio Huete Jimenez [Fri, 17 Sep 2010 10:23:37 +0000 (12:23 +0200)]
udevd.8 - Fix SYNOPSIS
Matthias Schmidt [Fri, 17 Sep 2010 10:04:36 +0000 (12:04 +0200)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly
Matthias Schmidt [Fri, 17 Sep 2010 09:49:53 +0000 (11:49 +0200)]
dma - Fix the parsing of recipient addresses
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Fri, 17 Sep 2010 09:18:13 +0000 (11:18 +0200)]
dma - Fix double free buf
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Fri, 17 Sep 2010 09:16:23 +0000 (11:16 +0200)]
dma.8 - Change wording to match dma.conf
dma.conf says "Uncomment", man page says "comment". Correct this to
match dma.conf.
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Fri, 17 Sep 2010 09:13:31 +0000 (11:13 +0200)]
dma - Set correct group in Makefile.plain
dma needs to be setgid in group mail
Author: Peter Pentchev <roam@ringlet.net>
Matthias Schmidt [Fri, 17 Sep 2010 08:49:03 +0000 (10:49 +0200)]
dma - Fix typo
Matthew Dillon [Fri, 17 Sep 2010 08:45:04 +0000 (01:45 -0700)]
network - Fix race in accept() - try #2
* The last fix wasn't good enough. Really try to fix it this time. Use
a pool token and validate so_head after acquiring it to deal with races,
interlock against 0-ref races (sockets can be on the so_comp/so_incomp
queues with 0 references), and use it for the accept predicate.
Matthew Dillon [Fri, 17 Sep 2010 08:30:10 +0000 (01:30 -0700)]
kernel - Add lwkt_relpooltoken()
* Add a convenience function that is symmetric with lwkt_getpooltoken(),
though slightly slower than simply lwkt_reltoken()'ing the token returned
by lwkt_getpooltoken().
Matthew Dillon [Fri, 17 Sep 2010 06:00:26 +0000 (23:00 -0700)]
network - Fix race in accept()
* Fix a race where a socket undergoing an accept() was not being
referenced soon enough, resulting in a window of opportunity for
the kernel to attempt to free it if the tcp connection resets
before userland can finish the accept.
This resulted in an assertion panic.
Reported-by: Peter Avalos
Matthew Dillon [Fri, 17 Sep 2010 05:59:23 +0000 (22:59 -0700)]
utilities - Correct variable types to match kernel
* *vnodes, dirtybuf, etc are still int's in the kernel, for
systat -vm output.
Sascha Wildner [Fri, 17 Sep 2010 03:25:59 +0000 (05:25 +0200)]
kernel: Staticize some dev_ops and adjust a name in dev/sound.
Matthew Dillon [Fri, 17 Sep 2010 02:56:17 +0000 (19:56 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 16 Sep 2010 21:57:27 +0000 (14:57 -0700)]
kernel - Adjust AHCI driver to deal with AMD braindamage / 880G chipset
* As of this writing AMD has some new chipsets out for AM3 MBs which
supports AHCI on 5 SATA + 1 E-SATA connector. My testing was done
on a MB with the 880G chipset.
The AHCI firmware for this chipset is a bit on the rough side. It
seems a bit slow on the INIT/device-detection sequencing (possibly due
to longer PHY training time? It's supposed to be a 6GBit PHY), and it
generates a stream of PCS interrupts for some devices.
My assumption is that the PCS interrupts are not being masked by the
chipset during the INIT phase. Both IFS and PCS interrupts seem to
occur during INIT/RESET and PM probing stages.
In addition, at least one drive... an Intel SSD, caused a large number
of PCS interrupts during the INIT phase even when connected to an
internal SATA port at power-on. This is clearly a bug in the AMD
AHCI chipset, again related to their firmware not internally masking
communications glitches during INIT, and/or taking an extra long time
to train the PHY.
* Adjust the AHCI driver to deal with this situation. Limit the interrupt
rate for PCS errors and do harsh reinitialization of the port when we get
a PCS error, along with allowing extra time for the device detect to
succeed.
* As a side benefit the AHCI driver should be able to deal with device
connection and disconnection on non-hot-swap-capable ports, at least
up to a point.
* Silence some of the console output during probe.
* Try harder to clear the CI/SACT registers when stopping a port. Some
chipsets appear to not clear the registers when we cycle ST when they
have already stopped the command processor, possibly as part of the IFS
or PCS interrupt paths.
* Fix a bug where an IFS or PCS interrupt marks a probe command (software
reset sequence) as complete when it actually errored-out.
* Sleep longer between retries if a command fails due to an IFS error.
When testing with the WD Green drives a drive inserted into a PM
enclosure cold seems to take longer to start up during the COMRESET
sequence. This only seems to occur with the AMD chipset and does
not occur with the older NVidia chipset. IFS errors occur for several
seconds beyond what I would consider a reasonable sleep interval.
Sascha Wildner [Fri, 17 Sep 2010 02:31:15 +0000 (04:31 +0200)]
pf(4): Fix a kprintf() warning on x86_64.
Matthias Schmidt [Thu, 16 Sep 2010 18:13:24 +0000 (20:13 +0200)]
rconfig(8) - Add new script to setup an encrypted root file system
This is basically a copy of hammer.sh modified to setup an encrypted
HAMMER root file system with cryptsetup/mkinitrd.
Venkatesh Srinivas [Thu, 16 Sep 2010 17:10:28 +0000 (10:10 -0700)]
Merge branch 'master' of /repository/git/dragonfly
Venkatesh Srinivas [Thu, 16 Sep 2010 17:09:00 +0000 (10:09 -0700)]
kernel - tmpfs: Convert tmpfs name malloc zone to a per-mount zone.
Now filenames from one tmpfs do not exhaust space in other ones.
Related to bug 1726.
Matthew Dillon [Thu, 16 Sep 2010 17:05:00 +0000 (10:05 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 16 Sep 2010 17:03:30 +0000 (10:03 -0700)]
kernel - Fix NFS panic
* nfs_write() was not wrapped with a token, leading to races.
* Add some queueing assertions while we are here.
Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
Sascha Wildner [Thu, 16 Sep 2010 16:42:50 +0000 (18:42 +0200)]
Make bluetooth(4) compileable into the kernel and add it to LINT.
Sascha Wildner [Thu, 16 Sep 2010 16:42:33 +0000 (18:42 +0200)]
bluetooth(4): Remove an unused variable.
Matthew Dillon [Thu, 16 Sep 2010 16:37:34 +0000 (09:37 -0700)]
network - Fix unconverted netmsg function
* Fix a function I forgot to convert to the netmsg argument format.
Reported-by: swildner
Matthew Dillon [Thu, 16 Sep 2010 15:55:54 +0000 (08:55 -0700)]
HAMMER Utility - Adjust documentation
* Add some missing bits re: checkmap
Reported-by: Ilya Dryomov <idryomov@gmail.com>
Matthew Dillon [Thu, 16 Sep 2010 15:50:39 +0000 (08:50 -0700)]
network - Fix if_gif build when no INET6
* Make if_gif build properly when INET6 is not specified.
Reported-by: Ilya Dryomov <idryomov@gmail.com>
Alex Hornung [Thu, 16 Sep 2010 10:03:01 +0000 (12:03 +0200)]
initrd - Allow realroot to not have /dev for paths
* Check if the realroot (for local and crypt) has a MOUNTFROM that
begins with /dev/, i.e. is a full path. If not, just prepend /dev/.
Matthew Dillon [Thu, 16 Sep 2010 07:52:46 +0000 (00:52 -0700)]
network - Add some serious assertions when MBUF_DEBUG is enabled (2)
* Missed in the first commit, the sys/mbuf.h changes. Note that a full
kernel compile is required when MBUF_DEBUG is added (or removed)
from the kernel config. You can't mix-n-match
Matthew Dillon [Thu, 16 Sep 2010 07:50:40 +0000 (00:50 -0700)]
network - Allow asynchronous shutdown and fix a MP race in soshutdown().
* The ssb_release() call in sorflush() must be protected by
socket->so_rcv.ssb_token. This call is made from the user
side when soshutdown() is called.
* Allow shutdowns to interrupt another thread read()ing from the same
descriptor by removing the user-side interlock in the shutdown code
path.
Matthew Dillon [Thu, 16 Sep 2010 07:49:33 +0000 (00:49 -0700)]
network - Add assertions for direct messaged calls
* Certain pru_* functions are direct-messaged calls and the operation must
be done on return. Assert that the operation is done.
Matthew Dillon [Thu, 16 Sep 2010 07:48:05 +0000 (00:48 -0700)]
network - Add some serious assertions when MBUF_DEBUG is enabled
* Assert that the mbuf field state is sane when pulling a new one out of
the object cache.
* Store the last function (name) to free an mbuf as a debugging aid.