]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoThis commit updates libarchive to be compatible with
kientzle [Sat, 18 Aug 2007 21:53:25 +0000 (21:53 +0000)]
This commit updates libarchive to be compatible with
GNU tar 1.17's implementation of --posix --sparse,
at the cost of losing compatibility with GNU tar 1.16.
Fortunately, the 1.17 implementation actually makes sense,
so the libarchive code is now a bit more straightforward
than before.

Background:  GNU tar 1.16 defined a new way to store
sparse files in --posix archives.  Unfortunately,
the implementation incorrectly inserted several
blocks of null padding after each such entry.
As a result, non-GNU tar implementations saw the
archive as truncated after any sparse entry.
This was fixed in GNU tar 1.17 at the cost of
losing compatibility with GNU tar 1.16 for this
new format (which is not the default, so hopefully
rarely used).  Libarchive recently gained support
for reading the GNU tar 1.16 formats; this commit
updates it to read the GNU tar 1.17 variant instead.

Approved by: re (ksmith for libarchive portion)
Approved by: re (blanket for libarchive_test portion)
MFC after: 5 days

16 years agoRemove references to the now-deleted installation notes and add a
bmah [Sat, 18 Aug 2007 17:11:14 +0000 (17:11 +0000)]
Remove references to the now-deleted installation notes and add a
pointer to the installation chapter of the Handbook (it might be a
good idea to sprinkle a few more through this article).

De-emphasize the floppy disk part of installation media; it's
generally believed that most users install from CDROM or DVD
nowadays.

Use &arch.* entities where appropriate.

Bump copyright date while here.

Approved by: re (implicitly)

16 years agoJust wbinv if both PREREAD and PREWRITE are set.
cognet [Sat, 18 Aug 2007 16:47:28 +0000 (16:47 +0000)]
Just wbinv if both PREREAD and PREWRITE are set.
In PREREAD, just invalidate the cache lines, and do not write back them, if
the buffer is properly aligned.

Approved by: re (blanket)

16 years agoRemove comment that is no longer quite true.
kib [Sat, 18 Aug 2007 16:41:31 +0000 (16:41 +0000)]
Remove comment that is no longer quite true.

Noted by: alc
Approved by: re (kensmith)

16 years agoFactor out arch.* entities so we don't need to include them with
bmah [Sat, 18 Aug 2007 16:40:37 +0000 (16:40 +0000)]
Factor out arch.* entities so we don't need to include them with
every one of the release documents.

Approved by: re (implicitly)

16 years agoFix the phys_pager in the way similar to the rev. 1.83 of the
kib [Sat, 18 Aug 2007 16:40:33 +0000 (16:40 +0000)]
Fix the phys_pager in the way similar to the rev. 1.83 of the
sys/vm/device_pager.c:

Protect the creation of the phys pager with non-NULL handle with the
phys_pager_mtx. Lookup of phys pager in the pagers list by handle is now
synchronized with its removal from the list, and phys_pager_mtx is put
before vm object lock in lock order. Dispose the phys_pager_alloc_lock
and tsleep calls, together with acquiring Giant, since phys_pager_mtx
now covers the same block.

Reviewed by: alc
Approved by: re (kensmith)

16 years agoIf the STP state machine is stopped then clear the bridge-id and root-id.
thompsa [Sat, 18 Aug 2007 12:06:13 +0000 (12:06 +0000)]
If the STP state machine is stopped then clear the bridge-id and root-id.

Approved by: re (kensmith)

16 years agoAdd ng_send_fn() error handeling inside ng_con_nodes().
mav [Sat, 18 Aug 2007 11:59:17 +0000 (11:59 +0000)]
Add ng_send_fn() error handeling inside ng_con_nodes().
Without it some errors may left unnoticed and unhandeled
that will lead to hooks left in half-connected state.

Reviewed by: julian@
Approved by: re (kensmith), glebius (mentor)

16 years ago- Sweep the boot(8) man page after addition of boot.config(5).
danger [Sat, 18 Aug 2007 07:58:36 +0000 (07:58 +0000)]
- Sweep the boot(8) man page after addition of boot.config(5).

Reviewed by: keramida
Approved by: re (kensmith)

16 years agoMy forced commit to note the repo-copy (naturally) changed the $FreeBSD$ keyword...
mtm [Sat, 18 Aug 2007 04:08:53 +0000 (04:08 +0000)]
My forced commit to note the repo-copy (naturally) changed the $FreeBSD$ keyword line,
so that when I applied the patch to my check-in tree the top half of my patch failed to
apply.  Off course I saw what I *expected* to see (the bottom half succeeded) and
didn't notice that it had failed to apply cleanly.

Approved by: re (bmah)

16 years agoDon't pass RB_BOOTINFO to the kernel. There's no bootinfo actually
imp [Fri, 17 Aug 2007 18:22:31 +0000 (18:22 +0000)]
Don't pass RB_BOOTINFO to the kernel.  There's no bootinfo actually
passed into the kernel, and the kernel will soon grow that ability on
arm.

Approved by: re@ (blanket)

16 years agoFix the order in which we build subdirectories in a "make all" from the
bmah [Fri, 17 Aug 2007 14:16:59 +0000 (14:16 +0000)]
Fix the order in which we build subdirectories in a "make all" from the
top-level release/doc directory.  We were building in share/sgml first,
which caused us to autogenerate hardware notes entities in the wrong
format (we want to build these via ${RELNOTES_LANG}/hardware/Makefile,
in order to get the HWNOTES_MI variable).

Approved by: re (kensmith)

16 years agoRemove one more reference to the installation notes, this time in the
bmah [Fri, 17 Aug 2007 14:13:39 +0000 (14:13 +0000)]
Remove one more reference to the installation notes, this time in the
floppies directory.

Pointed out by: kensmith
Approved by: re (blanket for installation notes removal)

16 years agoThe rc.d/nfslocking file controls two servers: rpc.statd and rpc.lockd. It worked...
mtm [Fri, 17 Aug 2007 07:58:26 +0000 (07:58 +0000)]
The rc.d/nfslocking file controls two servers: rpc.statd and rpc.lockd. It worked well
in most cases, except one. The 'restart' case was not working as expected. Specifically,
it would stop both lockd and statd, but it would restart only statd (which appears first
in the script). This is because rc.subr(8) contains code to guard against infinite
recursion in the 'restart' casae.

To fix this use the traditional approach of controlling only one server from one script by
breaking out rc.d/nfslocking into its contituent parts: rc.d/lockd and rc.d/statd. Keep
rc.d/nfslocking around but don't include it in the boot rcorder(8)ing.

PR:      conf/107316
Approved by: re (bmah)
MFC after:   2 weeks

16 years agoRepo-copy from rc.d/nfslocking ver. 1.11.
mtm [Fri, 17 Aug 2007 07:41:36 +0000 (07:41 +0000)]
Repo-copy from rc.d/nfslocking ver. 1.11.

PR:      conf/107316
Approved by: re (bmah)

16 years agoforward port signedness fixes from RELENG_6
kmacy [Fri, 17 Aug 2007 05:57:04 +0000 (05:57 +0000)]
forward port signedness fixes from RELENG_6
fix compile error for case where MSI_SUPPORTED not defined

Approved by: re (blanket)

16 years agoWe don't need to call dcons_poll event handlers if KDB is not active.
simokawa [Fri, 17 Aug 2007 05:32:39 +0000 (05:32 +0000)]
We don't need to call dcons_poll event handlers if KDB is not active.

Approved by: re (kensmith)

16 years ago1. Remove root name servers from the list of possible masters in the
dougb [Fri, 17 Aug 2007 04:37:02 +0000 (04:37 +0000)]
1. Remove root name servers from the list of possible masters in the
commented out example who have either not responded, or specifically
asked not to participate because they do not view AXFR as "a production
service."

2. Add f.root-servers.net to the example after confirmation from
Paul Vixie.

3. Add a warning to the commented out "root zone slave" example to the
effect that it requires more attention than a hints file, and provides
more benefit to larger sites than individual hosts.

4. Correct a typo copied from RFC 2544 which was corrected in a later
errata, and confirmed in RFC 3330. Update the comment to reflect that
RFC 3330 got it right and to avoid confusion down the road. 3330 also
contains a reference back to 2544 for anyone interested in pursuing the
history. [1]

PR:             conf/115573 [1]
Submitted by:   Oliver Fromme <olli@secnetix.de> [1]

Approved by: re (kensmith)

16 years agoInstall etx/numeric_traits.h.
kan [Thu, 16 Aug 2007 23:02:00 +0000 (23:02 +0000)]
Install etx/numeric_traits.h.

PR: gnu/115250
Approved by: re (blanket)

16 years agoSome ZFS threads needs stack larger than the default 8kB, so use 16kB of
pjd [Thu, 16 Aug 2007 20:33:20 +0000 (20:33 +0000)]
Some ZFS threads needs stack larger than the default 8kB, so use 16kB of
alternate stack if the default is smaller than 16kB.

Approved by: re (rwatson)

16 years agoMFp4: rework tmpfs_readdir() logic in terms of correctness.
delphij [Thu, 16 Aug 2007 11:00:07 +0000 (11:00 +0000)]
MFp4: rework tmpfs_readdir() logic in terms of correctness.

Approved by: re (tmpfs blanket)
Tested with: fstest, fsx

16 years agoRegenerate.
davidxu [Thu, 16 Aug 2007 05:32:26 +0000 (05:32 +0000)]
Regenerate.

Approved by: re(kensmith)

16 years agoAdd thr_kill2 compat32 syscall.
davidxu [Thu, 16 Aug 2007 05:30:04 +0000 (05:30 +0000)]
Add thr_kill2 compat32 syscall.

Submitted by: Tijl Coosemans tijl at ulyssis dot org
Approved by: re (kensmith)

16 years agoAdd thr_kill2 syscall which sends a signal to a thread in another process.
davidxu [Thu, 16 Aug 2007 05:26:42 +0000 (05:26 +0000)]
Add thr_kill2 syscall which sends a signal to a thread in another process.

Submitted by: Tijl Coosemans tijl at ulyssis dot org
Approved by: re (kensmith)

16 years ago- Remove extra comment for 7.0 (no GIANT here).
rrs [Thu, 16 Aug 2007 01:51:22 +0000 (01:51 +0000)]
- Remove extra comment for 7.0 (no GIANT here).
- Remove unneeded WLOCK/UNLOCK of inp for getting TCB lock.
- Fix panic that may occur when freeing an assoc that has partial
  delivery in progress (may dereference null socket pointer when
  queuing partial delivery aborted notification)
- Some spacing and comment fixes.
- Fix address add handling to clear cached routes and source addresses
  when peer acks the add in case the routing table changes.
Approved by: re@freebsd.org (Bruce Mah)

16 years agoUse the sequence number comparison macro to compare
qingli [Thu, 16 Aug 2007 01:35:55 +0000 (01:35 +0000)]
Use the sequence number comparison macro to compare
projected_offset against isn_offset to account for
wrap around.

Reviewed by: gnn, kmacy, silby
Submitted by: yusheng.huang@bluecoat.com
Approved by: re
MFC: 3 days

16 years agoAdd a driver for the on-die digital thermal sensor found on Intel Core
des [Wed, 15 Aug 2007 19:26:03 +0000 (19:26 +0000)]
Add a driver for the on-die digital thermal sensor found on Intel Core
and newer CPUs (including Core 2 and Core / Core 2 based Xeons).  The
driver attaches to each cpu device and creates a sysctl node in that
device's sysctl context (dev.cpu.N.temperature).  When invoked, the
handler binds to the appropriate CPU to ensure a correct reading.

Submitted by: Rui Paulo <rpaulo@fnop.net>
Sponsored by: Google Summer of Code 2007
Tested by: des, marcus, Constantine A. Murenin, Ian FREISLICH
Approved by: re (kensmith)
MFC after: 3 weeks

16 years agoCleanup of old hardware notes source files. Somehow these didn't get
bmah [Wed, 15 Aug 2007 18:09:08 +0000 (18:09 +0000)]
Cleanup of old hardware notes source files.  Somehow these didn't get
removed in the hardware notes refactoring.

Approved by: re (implicitly)

16 years agoOn 6.x this works:
jhb [Wed, 15 Aug 2007 17:40:09 +0000 (17:40 +0000)]
On 6.x this works:

% mount | grep home
/dev/ad4s1e on /home (ufs, local, noatime, soft-updates)
% mount -u -o atime /home
% mount | grep home
/dev/ad4s1e on /home (ufs, local, soft-updates)

Restore this behavior for on 7.x for the following mount options:
noatime, noclusterr, noclusterw, noexec, nosuid, nosymfollow

In addition, on 7.x, the following are equivalent:
mount -u -o atime /home
mount -u -o nonoatime /home

Ideally, when we introduce new mount options, we should avoid
options starting with "no". :)

Requested by: jhb
Reported by: Karol Kwiat <karol.kwiat gmail com>, Scott Hetzel <swhetzel gmail com>
Approved by: re (bmah)
Proxy commit for: rodrigc

16 years agoThe /boot.config file is available only on i386 and amd64, so install
danger [Wed, 15 Aug 2007 06:41:08 +0000 (06:41 +0000)]
The /boot.config file is available only on i386 and amd64, so install
boot.config.5 only those architectures.

Approved by: re@ (bmah)
Reported by: simon

16 years agoAutogenerate hardware notes entities for ath(4) for all platforms
bmah [Wed, 15 Aug 2007 04:46:04 +0000 (04:46 +0000)]
Autogenerate hardware notes entities for ath(4) for all platforms
on which it's included in the GENERIC kernel.

PR 115403
Approved by: re (implicitly)
MFC after: 5 days

16 years agoRemove the installation notes, which have not truly been maintained
bmah [Wed, 15 Aug 2007 03:14:43 +0000 (03:14 +0000)]
Remove the installation notes, which have not truly been maintained
for quite some time.  All relevant content has been moved to the
installation chapter of the FreeBSD Handbook, which will be the
single source of FreeBSD installation instructions.

In addition to removing redundancy, this change also removes the last
of the machine-dependent documents in the release documentation
set (the release notes and hardware notes were unified to produce
machine-independent documents).

Approved by: re (blanket for installation notes removal)
Nods from: blackend, brueffer, simon, trhodes
No objections on: doc@
Helpful hints from: blackend

16 years agoModified release note: ng_h4(4) has been restored to the build
bmah [Wed, 15 Aug 2007 03:05:17 +0000 (03:05 +0000)]
Modified release note:  ng_h4(4) has been restored to the build
after MPSAFE modifications.

Approved by: re (implicitly)

16 years agoDisconnect installation notes from the release documentation build.
bmah [Wed, 15 Aug 2007 03:02:22 +0000 (03:02 +0000)]
Disconnect installation notes from the release documentation build.

Approved by: re (blanket for installation notes removal)

16 years agoRemove comment that was added by mistakes and which prevented _eprintf
kan [Tue, 14 Aug 2007 20:49:57 +0000 (20:49 +0000)]
Remove comment that was added by mistakes and which prevented _eprintf
and gcc_bcmp to be added to static libgcc.a.

Approved by: re (kensmith)

16 years agoDon't copy the installation guide to the release media (i.e.
bmah [Tue, 14 Aug 2007 20:02:55 +0000 (20:02 +0000)]
Don't copy the installation guide to the release media (i.e.
floppies or ISO images).  We retain the concept of MD
release documentation for now, although it's fairly unlikely
that we'll ever do this again.

Approved by: re (blanket for installation guide removal)

16 years agoMove callout initialization to the proper spot. This prevents panics during
scottl [Tue, 14 Aug 2007 19:17:35 +0000 (19:17 +0000)]
Move callout initialization to the proper spot.  This prevents panics during
error recovery.

Approved by: re
Found by: kan

16 years agoAdd the boot.config.5 manual page.
danger [Tue, 14 Aug 2007 15:25:32 +0000 (15:25 +0000)]
Add the boot.config.5 manual page.

Reviewed by: keramida
Approved by: re@ (bmah)
PR: docs/112307

16 years agoMention gcc 4.2.1 import.
delphij [Tue, 14 Aug 2007 14:49:46 +0000 (14:49 +0000)]
Mention gcc 4.2.1 import.

Approved by: re (bmah)

16 years agoChange the time of the first "EoL is coming soon, you should upgrade" warning
cperciva [Tue, 14 Aug 2007 14:48:46 +0000 (14:48 +0000)]
Change the time of the first "EoL is coming soon, you should upgrade" warning
from EoL minus 6 months to EoL minus 3 months, in order to increase the odds
of there actually being a more recent release to which users can upgrade.
(In particular, for releases which are only supported for 12 months, it's
quite likely that the next release will occur between 6 and 9 months later.)

Discussed with: kensmith
Approved by: re (bmah)
MFC after: 3 days

16 years agoRestore -O2 optimization after gcc 4.2.1 import, which has
delphij [Tue, 14 Aug 2007 13:44:08 +0000 (13:44 +0000)]
Restore -O2 optimization after gcc 4.2.1 import, which has
fixed the issue raised by gcc 4.2.0.

Tested with: test case found in gcc bug 32500
Approved by: re (kensmith), ache, kan

16 years agoUpdate locally changed files to GCC 4.2.1.
kan [Tue, 14 Aug 2007 03:04:42 +0000 (03:04 +0000)]
Update locally changed files to GCC 4.2.1.

Approved by: re (kensmith)

16 years agoMerge files that are no longer carry FreeBSD local changes.
kan [Tue, 14 Aug 2007 03:02:26 +0000 (03:02 +0000)]
Merge files that are no longer carry FreeBSD local changes.

Approved by: re (kensmith)

16 years agoDisconnect the soon-to-be removed installation notes from sysinstall(8)
bmah [Tue, 14 Aug 2007 02:58:33 +0000 (02:58 +0000)]
Disconnect the soon-to-be removed installation notes from sysinstall(8)
menus.

Approved by: re (blanket for installation notes removal)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r171831,
kan [Tue, 14 Aug 2007 02:52:47 +0000 (02:52 +0000)]
This commit was generated by cvs2svn to compensate for changes in r171831,
which included commits to RCS files with non-trunk default branches.

16 years agoGCC 4.2.1 release miscellaneous support libraries.
kan [Tue, 14 Aug 2007 02:52:47 +0000 (02:52 +0000)]
GCC 4.2.1 release miscellaneous support libraries.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r171829,
kan [Tue, 14 Aug 2007 02:51:20 +0000 (02:51 +0000)]
This commit was generated by cvs2svn to compensate for changes in r171829,
which included commits to RCS files with non-trunk default branches.

16 years agoGCC 4.2.1 release Objective C runtime support code.
kan [Tue, 14 Aug 2007 02:51:20 +0000 (02:51 +0000)]
GCC 4.2.1 release Objective C runtime support code.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r171827,
kan [Tue, 14 Aug 2007 02:49:11 +0000 (02:49 +0000)]
This commit was generated by cvs2svn to compensate for changes in r171827,
which included commits to RCS files with non-trunk default branches.

16 years agoGCC 4.2.1 release C++ standard library and runtime support code.
kan [Tue, 14 Aug 2007 02:49:11 +0000 (02:49 +0000)]
GCC 4.2.1 release C++ standard library and runtime support code.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r171825,
kan [Tue, 14 Aug 2007 02:45:23 +0000 (02:45 +0000)]
This commit was generated by cvs2svn to compensate for changes in r171825,
which included commits to RCS files with non-trunk default branches.

16 years agoGCC 4.2.1 release.
kan [Tue, 14 Aug 2007 02:45:23 +0000 (02:45 +0000)]
GCC 4.2.1 release.

16 years agoMake sure to take PHY out of power down mode in device attach.
yongari [Tue, 14 Aug 2007 02:00:04 +0000 (02:00 +0000)]
Make sure to take PHY out of power down mode in device attach.
Without this the PHY wouldn't work as expected. This should fix
dual-boot Windows XP machine where RealTek Windows drivers put the
PHY in power down mode during shutdown. The magic PHY register
accesses come from RealTek driver. No datasheets mention the magic
PHY registers.
In general, the PHY wakeup code should go into PHY driver. However it
seems that it only apply to RTL8169S single chip and it would be
another hack if we have rgephy(4) check what parent driver/chip model
is attached.

Reported by: lofi, Laurens Timmermans ( laurens AT timkapel DOT nl )
Tested by: lofi
Obtained from: RealTek FreeBSD driver
Approved by: re (Ken Smith)

16 years agoImprove vn_printf() by:
pjd [Mon, 13 Aug 2007 21:23:30 +0000 (21:23 +0000)]
Improve vn_printf() by:
- adding missing vnode flags,
- printing unknown flags as numbers,
- using strlcat() instead of strcat().

Approved by: re (bmah)

16 years agoFix a few nits relative to the previous changes:
jhb [Mon, 13 Aug 2007 21:14:16 +0000 (21:14 +0000)]
Fix a few nits relative to the previous changes:
- Don't leak the config lock if detach() fails due to the controller char
  dev being open.
- Close a race between detach() and a process opening the controller char
  dev.

MFC after: 1 week
Approved by: re (bmah)

16 years agoTeach the mfi(4) driver to handle requests from userland management
jhb [Mon, 13 Aug 2007 19:29:17 +0000 (19:29 +0000)]
Teach the mfi(4) driver to handle requests from userland management
applications to add and remove volumes.

MFC after: 1 week
Approved by: re (bmah)
Reviewed by: ambrisko, scottl

16 years agoUpdate to support ICH[678] chipsets (based on a patch by Takeharu KATO)
des [Mon, 13 Aug 2007 18:52:37 +0000 (18:52 +0000)]
Update to support ICH[678] chipsets (based on a patch by Takeharu KATO)
Fix a resource allocation bug (explained by jhb on -acpi)
Thanks for Mike Tancsa for testing and helping track down the bug.

Approved by: re (kensmith)
MFC after: 3 weeks

16 years agoExpand the data structure returned by the ATA RAID status ioctl to include
jhb [Mon, 13 Aug 2007 18:46:31 +0000 (18:46 +0000)]
Expand the data structure returned by the ATA RAID status ioctl to include
detailed status on each of the backing subdisks.  This allows userland
to see which subdisks are online, failed, missing, or a hot spare.

MFC after: 1 week
Approved by: re (bmah)
Reviewed by: sos

16 years agoMake ng_h4(4) MPSAFE. Use similar to ng_tty(4) locking strategy.
emax [Mon, 13 Aug 2007 17:19:28 +0000 (17:19 +0000)]
Make ng_h4(4) MPSAFE. Use similar to ng_tty(4) locking strategy.
Reconnect ng_h(4) back to the build.

Reviewed by: kensmith
Approved by: re (kensmith)
MFC after: 1 month

16 years agoBe more careful handling no_init flag. It should be enforced
delphij [Mon, 13 Aug 2007 16:15:26 +0000 (16:15 +0000)]
Be more careful handling no_init flag.  It should be enforced
in *all* less_is_more cases, On the other hand, quit_if_one_screen
should apply iff less_is_more *and* -e.

This change revises the previous change further, which tried
to make less(1) not to send @ti:@te before and after view of
one file in more(1) mode, but affected less -e behavior by
accident.

This is essentially the same patch desichen@ has posted on
-current@.  I have adjusted it a bit in order to minimize
difference between our version and the vendor branch.

Approved by: re (bmah, earlier logically equivalent version)

16 years agoIf the mmap() call in rpc.statd fails, rpc.statd prints a warning
truckman [Mon, 13 Aug 2007 15:04:39 +0000 (15:04 +0000)]
If the mmap() call in rpc.statd fails, rpc.statd prints a warning
message and then dumps core because the subsequent code assumes that
mmap() succeeded.  Since rpc.statd does not have fallback code to
implement the functionality needed to operate on the status file if
it is not memory mapped, rpc.statd should use err() to force the process
to exit if the mmap() call fails.

PR: bin/115430 (mmap() failure previously fixed in statd.c 1.15)
Approved by: re (kensmith)
MFC after: 1 week

16 years agoCoalesce another very short section into its parent.
bmah [Sun, 12 Aug 2007 21:08:39 +0000 (21:08 +0000)]
Coalesce another very short section into its parent.

Approved by: re (implicitly)

16 years agoo You have to reboot the system after tuning softupdates on the root
maxim [Sun, 12 Aug 2007 20:08:07 +0000 (20:08 +0000)]
o You have to reboot the system after tuning softupdates on the root
filesystem on to make SU work.

Approved by: re (hrs)
MFC after: 1 week

16 years agoReplace three copies of the host controller reset sequence that
truckman [Sun, 12 Aug 2007 18:45:24 +0000 (18:45 +0000)]
Replace three copies of the host controller reset sequence that
differ in their details with calls to a new function, ehci_hcreset(),
that performs the reset.

The original sequences either had no delay or a 1ms delay between
telling the controller to stop and asserting the controller reset
bit.  One instance of the original reset sequence waited for the
controller to indicate that its reset was complete before continuing,
but the other two immediately let the subsequent code execute.  The
latter is a problem on some hardware, because a read of the HCCPARAMS
register returns an incorrect value while the reset is in progress,
which triggers an infinite loop in ehci_pci_givecontroller(), which
hangs the system on shutdown.

The reset sequence in ehci_hcreset() starts with the most complete
instance from the original code, which contains a loop to wait for
the controller to indicate that its reset is complete.   This appears
to be the correct thing to do according to "Enhanced Host Controller
Interface Specification for Universal Serial Bus" revision 1.0,
section 2.3.1.  Add another loop to wait for the controller to
indicate that it has stopped before setting the HCRESET bit.  This
is required by the section 2.3.1 in the specification, which says
that setting HCRESET before the controller has halted "will result
in undefined behaviour".

Reviewed by: imp (previous patch version without the extra wait loop)
Tested by: se  (previous patch version without the extra wait loop)
Approved by: re (bmah)
MFC after: 1 week

16 years agoMake suid/sgid restore be "opportunistic" if
kientzle [Sun, 12 Aug 2007 17:35:05 +0000 (17:35 +0000)]
Make suid/sgid restore be "opportunistic" if
owner restore is not requested.  If you ask
for permissions to be restored but not owner,
you will now get no error if suid/sgid bits
cannot be set.  (It's a security hole to restore
suid/sgid bits if the owner/group aren't restored.)

This fixes an obscure problem where a simple
"tar -xf" with no other options will sometimes
fail gratuitously because of suid/sgid bits.
This is causing occasional problems for people
using bsdtar as a drop-in replacement for
"that other tar program." ;-)

Note: If you do ask for owner restore, then suid/sgid
restore failures still issue an error.  This
only suppresses the error in the case where an
suid/sgid bit restore fails because of an owner
mismatch and owner restore was not requested.

Approved by: re (bmah)
MFC after: 7 days

16 years agoUse ttyu instead of ttyd for arm, since we will probably never use sio(4).
cognet [Sun, 12 Aug 2007 17:13:06 +0000 (17:13 +0000)]
Use ttyu instead of ttyd for arm, since we will probably never use sio(4).

Approved by: re (blanket)

16 years agoSync with the source code: NGM_FEC_MODE_(MAC|INET) should be
danger [Sun, 12 Aug 2007 16:02:30 +0000 (16:02 +0000)]
Sync with the source code: NGM_FEC_MODE_(MAC|INET) should be
NGM_FEC_SET_MODE_(MAC|INET).

Approved by: re@ (bmah)

16 years agoCollapse some short sections together.
bmah [Sun, 12 Aug 2007 15:44:18 +0000 (15:44 +0000)]
Collapse some short sections together.

Approved by: re (implicitly)

16 years agoUpdate the tests for reading the various GNU tar sparse formats.
kientzle [Sun, 12 Aug 2007 01:16:19 +0000 (01:16 +0000)]
Update the tests for reading the various GNU tar sparse formats.
In particular:
  * Include a second entry in all of the test archives (to catch errors
    with intermediate padding)
  * Test the GNU tar 1.17 version of "posix sparse format 1.0"
    instead of the GNU tar 1.16 version (the latter is no longer
    supported by GNU tar).

Right now, libarchive fails this test because I originally
implemented the GNU tar 1.16 version of "posix sparse format 1.0".
I'll fix libarchive shortly.

Approved by: re (blanket, libarchive testing)

16 years agoRevamp the interrupt handling in support of INTR_FILTER. This includes:
marcel [Sat, 11 Aug 2007 19:25:32 +0000 (19:25 +0000)]
Revamp the interrupt handling in support of INTR_FILTER. This includes:
o  Revamp the PIC I/F to only abstract the PIC hardware. The
   resource handling has been moved to nexus, where it belongs.
o  Include EOI and MASK+EOI methods to the PIC I/F in support of
   INTR_FILTER.
o  With the allocation of interrupt resources and setup of
   interrupt handlers in the common platform code we can delay
   talking to the PIC hardware after enumeration of all devices.
   Introduce a call to powerpc_intr_enable() in configure_final()
   to achieve that and have powerpc_setup_intr() only program the
   PIC when !cold.
o  As a consequence of the above, remove all early_attach() glue
   from the OpenPIC and Heathrow PIC drivers and have them
   register themselves when they're found during enumeration.
o  Decouple the interrupt vector from the interrupt request line.
   Allocate vectors increasingly so that they can be used for
   the intrcnt index as well. Extend the Heathrow PIC driver to
   translate between IRQ and vector. The OpenPIC driver already
   has the support for vectors in hardware.

Approved by: re (blanket)

16 years agoWhite space cleanups
kmacy [Fri, 10 Aug 2007 23:47:39 +0000 (23:47 +0000)]
White space cleanups

Approved by: re (blanket)

16 years ago- In all structures other than port info port is a pointer to a port info,
kmacy [Fri, 10 Aug 2007 23:33:34 +0000 (23:33 +0000)]
- In all structures other than port info port is a pointer to a port info,
  make the code less confusing by renaming the port number to port_id

Approved by: re (blanket)

16 years agoMFp4:
delphij [Fri, 10 Aug 2007 11:00:30 +0000 (11:00 +0000)]
MFp4:
 - LK_RETRY prohibits vget() and vn_lock() to return error.
   Remove associated code. [1]
 - Properly use vhold() and vdrop() instead of their unlocked
   versions, we are guaranteed to have the vnode's interlock
   unheld. [1]
 - Fix a pseudo-infinite loop caused by 64/32-bit arithmetic
   with the same way used in modern NetBSD versions. [2]
 - Reorganize tmpfs_readdir to reduce duplicated code.

Submitted by: kib [1]
Obtained from: NetBSD [2]
Approved by: re (tmpfs blanket)

16 years agoNew regression test updates for rename, etc.
delphij [Fri, 10 Aug 2007 10:08:43 +0000 (10:08 +0000)]
New regression test updates for rename, etc.

Obtained from: NetBSD
Approved by: re (tmpfs blanket)

16 years agoFix fscking gjournaled root file system: root file system is already mounted
pjd [Fri, 10 Aug 2007 06:29:54 +0000 (06:29 +0000)]
Fix fscking gjournaled root file system: root file system is already mounted
read-only, so we can't simply exit right after calling gjournal_check(),
instead we need to ask about super block reload.

Submitted by: Niki Denev <niki@totalterror.net>
PR: misc/113889
Approved by: re (kensmith)

16 years agoMFp4:
delphij [Fri, 10 Aug 2007 05:24:49 +0000 (05:24 +0000)]
MFp4:

 - Respect cnflag and don't lock vnode always as LK_EXCLUSIVE [1]
 - Properly lock around tn_vnode to avoid NULL deference
 - Be more careful handling vnodes (*)

(*) This is a WIP
[1] by pjd via howardsu

Thanks kib@ for his valuable VFS related comments.

Tested with: fsx, fstest, tmpfs regression test set
Found by: pho's stress2 suite
Approved by: re (tmpfs blanket)

16 years agoCorrections and clarifications
julian [Thu, 9 Aug 2007 21:09:56 +0000 (21:09 +0000)]
Corrections and clarifications

Approved by: re (bmah)

16 years agoAdd "show sysregs" command to ddb. On i386, this gives gdt, idt, ldt,
njl [Thu, 9 Aug 2007 20:14:35 +0000 (20:14 +0000)]
Add "show sysregs" command to ddb.  On i386, this gives gdt, idt, ldt,
cr0-4, etc.  Support should be added for other platforms that have a
different set of registers for system use.

Loosely based on: OpenBSD
Approved by: re

16 years agoMFP4(123963): Fixing a possible NULL pointer dereference by making
avatar [Thu, 9 Aug 2007 13:29:26 +0000 (13:29 +0000)]
MFP4(123963): Fixing a possible NULL pointer dereference by making
the actual assignment after the NULL check.

Found by: Coverity Prevent(tm)
CID: 2303 (run 4156)
Reviewed by: sam
Approved by: re (bmah)

16 years ago- Renaming repocopied cached to nscd
bushman [Thu, 9 Aug 2007 13:06:12 +0000 (13:06 +0000)]
- Renaming repocopied cached to nscd

Approved by: re (kensmith), brooks (mentor)

16 years agoUse the .S version for now. I have a version optimized for size p4,
imp [Thu, 9 Aug 2007 05:16:55 +0000 (05:16 +0000)]
Use the .S version for now.  I have a version optimized for size p4,
but I'm unsure of its provenance, so rather than add it here, revert
the migration to it.

Approved by: re@ (blanket)

16 years agoMerge in the AX88178 and AX88772 register definions (along with
imp [Thu, 9 Aug 2007 04:40:07 +0000 (04:40 +0000)]
Merge in the AX88178 and AX88772 register definions (along with
rename) from OpenBSD.  This also dribbles in a few fields from OpenBSD
as well.

Approved by: re@ (blanket)
Obtained from: OpenBSD

16 years agoCompile ipfilter:ip_lookup.c without -Werror. The file contains
marcel [Thu, 9 Aug 2007 01:11:21 +0000 (01:11 +0000)]
Compile ipfilter:ip_lookup.c without -Werror. The file contains
a test that assumes that char is signed by default and causes a
warning with GCC 4.2 on PowerPC.
A patch has been sent to the maintainer that addresses this.

Approved by: re (blanket)

16 years agoKeep the snmp_bridge(3) module up to date with if_bridge(4) and add an
syrinx [Wed, 8 Aug 2007 19:27:50 +0000 (19:27 +0000)]
Keep the snmp_bridge(3) module up to date with if_bridge(4) and add an
object to control the value of the new 'PRIVATE' bridge members' flag.
While here, remove stale '__unused' compiler directives.

Reviewed by: bz
Approved by: re (bmah), bz (mentor)

16 years agoRe-enable -Werror for PowerPC. This should really be unconditional again.
marcel [Wed, 8 Aug 2007 19:12:06 +0000 (19:12 +0000)]
Re-enable -Werror for PowerPC. This should really be unconditional again.

Approved by: re (blanket)

16 years agoOoops, we need to define TD_LOCK here.
cognet [Wed, 8 Aug 2007 09:27:52 +0000 (09:27 +0000)]
Ooops, we need to define TD_LOCK here.

Approved by: re (blanket)
Pointy hat to: cognet

16 years agoRe-enable external interrupts for faults, traps and syscalls.
marcel [Wed, 8 Aug 2007 01:19:12 +0000 (01:19 +0000)]
Re-enable external interrupts for faults, traps and syscalls.

Approved by: re (blanket)

16 years agoThe PowerPC specific header interruptvar.h has been removed.
marcel [Tue, 7 Aug 2007 23:48:30 +0000 (23:48 +0000)]
The PowerPC specific header interruptvar.h has been removed.

Approved by: re (blanket)

16 years agoEliminate <machine/interruptvar.h> as it has only a single
marcel [Tue, 7 Aug 2007 23:33:35 +0000 (23:33 +0000)]
Eliminate <machine/interruptvar.h> as it has only a single
prototype. In the future that prototype will not be needed
at all anyway, but for now it's moved to intr_machdep.h.

Approved by: re (blanket)

16 years agoWhen storing old versions of files for use in generating new files via
cperciva [Tue, 7 Aug 2007 19:33:46 +0000 (19:33 +0000)]
When storing old versions of files for use in generating new files via
patching and for rolling back updates, don't copy a file if it has already
been stored.  This provides a significant speedup to the "Preparing to
download files" stage of "freebsd-update fetch" if many updates have already
been applied or if a file being updated is linked many times (such as
/rescue/*).

Reported by: Paul Dekkers
MFC after: 1 week
Approved by: re (bmah)

16 years agoRemove redundant prototype.
marcel [Tue, 7 Aug 2007 18:40:02 +0000 (18:40 +0000)]
Remove redundant prototype.

Approved by: re (blanket)

16 years agoAdd prototype for trap().
marcel [Tue, 7 Aug 2007 18:39:28 +0000 (18:39 +0000)]
Add prototype for trap().

Approved by: re (blanket)

16 years agoAdd cast to silent gcc warnings.
cognet [Tue, 7 Aug 2007 18:37:21 +0000 (18:37 +0000)]
Add cast to silent gcc warnings.

Approved by: re (blanket)

16 years agoUse the third argument of cpu_switch(), as done for i386/amd63, as it is
cognet [Tue, 7 Aug 2007 18:20:55 +0000 (18:20 +0000)]
Use the third argument of cpu_switch(), as done for i386/amd63, as it is
required for ULE.

Approved by: re (blanket)

16 years agoProtect the creation of the device pager with the dev_pager_mtx. Lookup
kib [Tue, 7 Aug 2007 15:36:25 +0000 (15:36 +0000)]
Protect the creation of the device pager with the dev_pager_mtx. Lookup
of device pager in the pagers list by handle is now synchronized with
its removal from the list, and dev_pager_mtx is put before vm object
lock in lock order. Dispose the dev_pager_sx lock, since dev_pager_mtx
now covers the same block.

Noted by: kensmith
Reviewed by: alc
Approved by: re (kensmith)

16 years agoo Indent "DragonFly".
maxim [Tue, 7 Aug 2007 15:35:24 +0000 (15:35 +0000)]
o Indent "DragonFly".

Approved by: re (bmah)

16 years agoo DragonFlyBSD 1.10.0 added.
maxim [Tue, 7 Aug 2007 15:34:24 +0000 (15:34 +0000)]
o DragonFlyBSD 1.10.0 added.

Approved by: re (bmah)
MFC after: 1 week

16 years agoUse ioctl() to get correct media size so that we can locate
simokawa [Tue, 7 Aug 2007 12:42:03 +0000 (12:42 +0000)]
Use ioctl() to get correct media size so that we can locate
ZFS labels in the tail of the media.

Approved by: re (kensmith), pjd

16 years agoMFP4(123687): Closing another LOR by dropping the driver lock around calls
avatar [Tue, 7 Aug 2007 12:26:19 +0000 (12:26 +0000)]
MFP4(123687): Closing another LOR by dropping the driver lock around calls
to if_input().

Reviewed by: ambrisko
Tested by: dhw
Approved by: re (kensmith)

16 years agoIn msdosfs_read() and msdosfs_write(), don't check explicitly for
bde [Tue, 7 Aug 2007 10:35:27 +0000 (10:35 +0000)]
In msdosfs_read() and msdosfs_write(), don't check explicitly for
(uio_offset < 0) since this can't happen.  If this happens, then the
general code handles the problem safely (better than before for reading,
returning 0 (EOF) instead of the bogus errno EINVAL, and the same as
before for writing, returning EFBIG).

In msdosfs_read(), don't check for (uio_resid < 0).  msdosfs_write()
already didn't check.

In msdosfs_read(), document in a comment our assumptions that the caller
passed a valid uio_offset and uio_resid.  ffs checks using KASSERT(),
and that is enough sanity checking.  In the same comment, partly document
there is no need to check for the EOVERFLOW case, unlike in ffs where this
case can happen at least in theory.

In msdosfs_write(), add a comment about why the checking of
(uio_resid == 0) is explicit, unlike in ffs.

In msdosfs_write(), check for impossibly large final offsets before
checking if the file size rlimit would be exceeded, so that we don't
have an overflow bug in the rlimit check and are consistent with ffs.
We now return EFBIG instead of EFBIG plus a SIGXFSZ signal if the final
offset would be impossibly large but not so large as to cause overflow.
Overflow normally gave the benign behaviour of no signal.

Approved by: re (kensmith) (blanket)